Integrate launch4j into maven build process #1200
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, there are two open issues (#991 and #670), which seem to be related to non-up-to-date launch4j artefacts (
Digital.exe
,Digital_nod3d.exe
). It seems that in the current build process these two artefacts are generated manually and imported into thedistribution
subdirectory.There is a maven plugin (https://github.com/orphan-oss/launch4j-maven-plugin) that allows running launch4j from maven, and thus possibly also in the CI/CD pipeline.
This PR introduces launch4j into the Maven build, building both exes in the target directory and pulling them in appropriately for assembly. It also fixes a few warnings from the assembly plugin regarding superfluous slashes in
<outputDirectory>
settings.So far, I have tested it successfully on a Windows 11 Professional install (Version 22H2, build 22621.2283) with openjdk 17.0.8.1 (Microsoft Build). The generated launchers find my installed JRE and run Digital.
mvn verify
also runs through, which to me would imply that Digital would be usable with this JRE version.Some of the configuration for launch4j had to be adapted, as there have been changes leading up to Version 3.50:
<path>
needs to be explicitly set, with the default suggested by launch4j being%JAVA_HOME%;%PATH%
.<bundledJre64Bit>
and<runtimeBits>
have been removed and replaced by<requires64Bit>
, which isfalse
by default, but was kept for documentation purposes.<bundledJreAsFallback>
had been removed, it had been set tofalse
anyway as no JRE is included. If a JRE were to be included, changing the<path>
setting appropriately would introduce the fallback.<jdkPreference>
has been replaced by<requiresJdk>
, which isfalse
by default.