OmicronProject / BakeoutController

Backend application to control the temperature and pressure control for introduction into a vacuum chamber
MIT License
0 stars 1 forks source link

Launch4j Bundling #21

Closed MichalKononenko closed 7 years ago

MichalKononenko commented 8 years ago

Something like launch4j is the final stop on the build pipe. I want to use this to turn our jar into binaries for Windows and Linux that will be capable of running on a control PC.

Building of the .exe needs to be bundled into gradle. Build portability will also need to be investigated. Can we use this to build our app for Windows on a Linux machine?

MichalKononenko commented 8 years ago

Launch4j has an Ant task and a Maven Plugin. @gramjoe , how did you use to build your applications? Can we integrate this into Gradle easily?

MichalKononenko commented 8 years ago

launch4j also has a Gradle plugin. I'm not sure if this creates just Windows executables, or whether it makes Linux binaries as well.

gramjoe commented 8 years ago

Gradle was integrated into android studio so it saved me from worrying about building executables, also portability wasn't an issue because everything was meant for android. Just reading your links it looks like its for Windows only doesn't it? Sorry I've never tried to build anything cross-platform, but if there's already a plugin shouldn't it be pretty easy? And if we are going for portability shouldn't we use something that can wrap to all of the platforms?

MichalKononenko commented 8 years ago

Cross-platform code is one of the strong points of Java. One can always run a .jar from the command line by typing in java <program>.jar, as long as they have a JRE installed. This issue is a matter of presentation, allowing someone to run it straight from their desktop.

The reason I asked about integration into Gradle is that there isn't an official Gradle plugin. There is a Maven plugin, and Gradle is well-integrated with Maven. Setup should consist of a few config settings in build.gradle and an extra .xml file for configuring launch4j.

For release, we would be building three executables.

And don't worry about cross-platform building, I've never done it either :smile:

MichalKononenko commented 8 years ago

The third-party Gradle plugin will be the best place to start. No sense in reinventing the wheel.