Search code examples
javafxgluon

Does Gluon Mobile support cross compilation?


I know Gluon uses GraalVM Native Image features to create native executable packages. But... What I need to know is:

  • Can it can deploy native packages (executable) for Apple OS based devices (macOS and iOS) in Linux? Or Is it OS specific dependent like jpackage?

What about deploying Windows ".exe" packages in Linux, Is it possible?


Solution

  • If you check the documentation for the Client plugin, there are some requisites to be met in order to create a native image.

    So far, the following hosts are required for the possible native image targets:

    • Linux: targets Linux (x86_64 desktop) and Android (aarch64). Embedded support is still experimental.

    • Windows: targets Windows (x86_64 desktop). Optionally WSL 2 (Windows Subsystem for Linux) can be used to target Linux/Android.

    • MacOS X 10: targets Mac (x86_64 desktop) and iOS (arm64).

    For each host you need a specific GraalVM build.

    See the different samples, and the tutorials (like this one) to know more about each scenario.