Skip to content

Integrate launch4j into maven build process#1200

Open
ralfgerlich wants to merge 2 commits intohneemann:masterfrom
ralfgerlich:integrate_launch4j
Open

Integrate launch4j into maven build process#1200
ralfgerlich wants to merge 2 commits intohneemann:masterfrom
ralfgerlich:integrate_launch4j

Conversation

@ralfgerlich
Copy link
Copy Markdown

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 the distribution 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 is false by default, but was kept for documentation purposes.
  • <bundledJreAsFallback> had been removed, it had been set to false 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 is false by default.

@ralfgerlich
Copy link
Copy Markdown
Author

Just checked with Adoptium Eclipse Temurin 17.0.8.1+1 (after uninstalling the Microsoft openjdk), and the exes also work (even for opening .dig files by associating them with Digital.exe).

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.5%. Comparing base (1204c26) to head (8da3db9).
⚠️ Report is 53 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##             master   #1200   +/-   ##
========================================
  Coverage      56.5%   56.5%           
  Complexity     6579    6579           
========================================
  Files           680     680           
  Lines         35565   35565           
  Branches       4802    4802           
========================================
+ Hits          20113   20119    +6     
+ Misses        14242   14237    -5     
+ Partials       1210    1209    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants