JFX build and deployment - squeaking wheel

Josh Marinacci joshua at marinacci.org
Fri Nov 2 22:45:20 PDT 2012


> > > - Need to install third party native packagers that then get magically
> > > picked up from the environment, no way to configure this
> > > 
> > 
> 
> 
> Yep that is awkward. Anyone want to rewrite WiX in pure Java + JNA?
> 
> > > - Need to run a separate build on each target platform to produce the
> > > native installer for that platform (not very "Java")
> > > 
> > 
> 
> 
> A non-issue, since you have to test on those platforms anyway and therefore have them available.

It *is* an issue, actually.  Once you get into production most people use build servers, usually on linux.  It is quite often that my test system and my build system are different machines.
 
> > As I've mentioned before (and during the keynote at JavaOne 2012), this is where I want to put my effort. The difficult problem is being able to build installers from any system for any other system, but baring that, the rest is pretty solvable.
> 
> 
> Application Bundles for Mac should be easy to make from any platform, if the launcher stub binary is part of the cross-platform javafxpackager. It's the .dmg that is tricker, but zips of app bundles work well too.. I'm guessing Linux packages could be done in a pure Java way if someone had the time to write the tool to create the RPM or DEB from pure Java (maybe it's easy?). At least the C source would be available for reference - and contamination via GPL :(. 
> Windows .msi files would be hardest to deal with I think because I know of no way to make them without Windows.
> If you are going to bundle an embedded JRE you will at least need to download the JRE for each platform. Are there copies of all of the platform-specific JREs that aren't exe's or msi's or dmgs or rpms so they can be extracted and embedded by a tool that runs on any platform? Or would you include the raw JRE installer/package and have the installer bootstrap code just run it first somehow?


My AppBundler tool (different from the Java.net AppBundler) can create Mac bundles on my Linux build server. The same with windows using izpack (EXE, no installer).  Instead of DMGs I use Zips, which work just fine (with one little trick to ensure the executable bit is set correctly).  I've never bothered to create Linux specific builds. I just point those users to the WebStart version.

I just tried using the AppBundler (the other one from Java.net) to create a Mac bundle with an embedded JRE and it worked pretty well.  For Windows is an MSI file a requirement or could some other installer system work? I just found NSIS which can generate Windows installers from linux.

http://nsis.sourceforge.net/Screenshots

Seems like something we could integrate.  As for actually embedding a JRE into an EXE, I don't know how to do that yet.

- J
> > We're open sourcing the javafx packager, which hopefully helps make this a little easier to contribute to.
> 
> 
> I hope some nerds with a lot of free time take an interest in it. :-)
> The rest of us probably don't have the time to spend making javafxpackager do what needs to be done when we have our main product to be working on. The installers are always an after-thought so no employer is going to let me spend much time contributing to javafxpackager when I could be improving the main product. (For Oracle at least it is part of the "main product")
> 
> 
> 
> Cheers,
> 
> Scott P. 



More information about the openjfx-dev mailing list