I got a script (just a simplified excerpt for brevity) to build and package my app, but it boils down to generating WiX installer with:
jpackage \
--type msi \
--dest "$(cygpath -w "${base[build:dist]}")" \
--name "${appDisplayName}" \
--app-version "${version}" \
--app-image "$(cygpath -w "${base[build:app]}")" \
--license-file "$(cygpath -w resources/app/legal/LICENSE)" \
--vendor "${vendor}" \
--verbose \
--temp 'W:\_tmp_' \
--win-shortcut;
It fails with enigmatic: Command [light.exe, (...)] in (...) exited with 94 code
. Which I found is about unresolved reference and particularly a reference to a shortcut icon: ...\config\bundle.wxf(10) : error LGHT0094 : Unresolved reference to symbol 'Icon:icon1798580986' in section 'Fragment:'
.
When I examined generated WiX XML, I found this:
<?xml version="1.0" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
...
<DirectoryRef Id="DesktopFolder">
<Component Win64="yes" Id="cshortcut9906e12cdacb303ebb5e48c888cf6949" Guid="{9906e12c-dacb-303e-bb5e-48c888cf6949}">
...
<Shortcut Id="shortcut9906e12cdacb303ebb5e48c888cf6949" Name="..." WorkingDirectory="INSTALLDIR" Advertise="no" IconIndex="0" Target="[#filed2065cdc42e13
55f8bdbbefc93d540f3]" Icon="icon1798580986"></Shortcut>
</Component>
</DirectoryRef>
...
</Wix>
And indeed there's this "icon1798580986" value, which does not tell me anything and even WiX is lost here (after reading this this https://stackoverflow.com/a/21019152/2024692 I checked and confirmed that I actually do have WixUIExtension.dll
in WiX bin
folder).
When I remove --win-shortcut
option, then MSI installer is generated, but unfortunately w/o shortcut icon on the desktop (the app has it's proper icons, thou, as I generated application image with --icon
switch and with --resource-dir
pointing to a.o. app icons).
As you probably guessed, this is called from Cygwin, so sometimes it needs fiddling with paths, especially when one calls Windows executables (hence these cygpath
things).
Well, I wasn't able to find any constructive approaches how to simply allow my Java application packed with jpackage
(from both JDK-14/15 EA with no success) to have nice shortcut icon after it gets installed. Does anyone knows how to fix this? Thanks in advance.