It has been a year and a half since Microsoft closed the accidentally caught in a basket with Xamarin-th RoboVM. Already the official robovm.com has sunk into oblivion. The last opensource version 1.8 has been forked by the MobiVM group and is supported on artificial respiration in working condition and now.
RoboVM itself (I will call MobiVM fork here and hereafter) is closely intertwined with MacOSX and in its original form, being launched in Windows / Linux, it encounters a message that you can not write code, you cannot compile. Meeting in the cmake files / network mention of Windows, took the challenge and decided to bring the matter to any result.
It will take:
With the first four points there were no special questions:
cygwin
;backup
method from MacOSX;For the proof of concept (or the quickest break-in), the source code was roughly chopped, everything was crossed on the knee, and the first executable file from Windows was linked back in August. With the signing of the code is not so fun. Attempting to sign everything with ambulance using saucelabs / isign did not lead to success: the utility could re-sign only already signed applications (with a dedicated LC_CODE_SIGNATURE), dragged in openssl dependencies and was generally written in the best python traditions. It is worth noting that Apple’s codesign source code is not closed, but building it not under the Mac platform is complicated and full of unresolved dependencies.
The solution to the problem came by itself: it was written own bicycle Java codesign . Based on isign. For a better understanding, a signature verifier was written first, and then, turning it 180 degrees, a signer was obtained.
First success! A simple application that does not require utilities from Xcode (also all the interfering parts of the code were mercilessly cut) was launched on the device. October ended.
Then the routine began: bringing the source code to life, carrying out platform-dependent code from the facade, forming a surrogate set of utilities (similar to Xcode), pain and tears of cross-compilation, and long assembly hours. Diluted the routine in a peculiar way: ported the linker from cygwin
to an assembly under MinGW
well-known method - replacing the posix
functionality with an accessible surrogate, which added new side effects, for example, dragged a path limit of 260 characters. But now the whole bestiary was gathering in one place, from under Linux.
The result is the following set:
actool
from facebook / xcbuildplutil
from facebook / xcbuildxib2nib
(similar to ibtool
) with a big creak from a non-working Microsoft / WinObjC (probably, it will not work in most cases)codesign_allocate
, lipo
, nm
, otool
, strip
from the tpoechtrager / cctools-port linker projectdsymutil
from LLVM5, had to be collected separately, because dsymutil
compiled by dsymutil for RoboVM turned out to be outdated and incompatible (v3.6)file
utility for Windows. The code RoboVM is used to determine the type of libraries. It turned out to be easier to build under Windows than to change the logic.The result was a fun project, currently limited to a license to use the iOS SDK outside of Apple hardware. But you can also put Windows on the poppy and fully cross-compile from under it!
References:
Source: https://habr.com/ru/post/345348/
All Articles