wiverson / maven-jpackage-template

Sample project illustrating building nice, small cross-platform JavaFX or Swing desktop apps with native installers while still using the standard Maven dependency system.
Apache License 2.0
351 stars 53 forks source link

add-launch-to-msi.js fails #44

Closed hrzafer closed 2 years ago

hrzafer commented 2 years ago

For some reason, the script fails for my project but works on the template project. Her is the error I see in msi-result.log.

add-launch-to-msi.js(11, 1) Microsoft JScript runtime error: 'view.Fetch()' is null or not an object

I compared everything I can btw the two projects but couldn't find any difference which might cause this problem.

From the error message, I can see that the following query returns null:

"SELECT File FROM File WHERE FileName='${app.name}.exe'"
wiverson commented 2 years ago

Looks like the app name (set in the Maven config) isn't matching the .exe name that the JavaScript is expecting. Could try just hardcoding in the name of the executable instead of relying on the Maven property.

BTW, I have no idea what happens if you have spaces in the exe name and or the path. Lots of tools get confused by spaces in the path.