javawixjpackage

jpackage (java15) can't create a Windows x86 Installer


I tried a lot of different approaches but always failed.

I successfully generated an x64 installer for my java jar (spring boot runnable), but I'm unable to create the x86 version of the installer.

After moving to a x86 virtual machine, I downloaded the zulu jdk 15 whom is able to run my software (manually), so I tried to run the jpackage tool, but it creates an installer for an x64 system.

As I could not find any additional parameter, i tried to verbose log the jpackage tool and found that 'candle' is called with the wrong arch (I replaced paths and variables to shorten path!

 [candle.exe, -nologo, TMPDIR\config\main.wxs,
 -ext, WixUtilExtension, -arch, x64, 
 -out, TMPDIR\wixobj\main.wixobj,
 -dJpAppDescription=DESCRIPTION, -dJpProductCode=UUID, -dJpAppName=APPNAME, 
 -dJpIsSystemWide=yes, -dJpAllowDowngrades=yes, -dJpIcon=TMPDIR\images\win-msi.image\APPNAME\APPNAME.exe, 
 -dJpAppVersion=1.0.0, -dJpInstallDirChooser=yes, -dJpAllowUpgrades=yes, -dJpProductUpgradeCode=UUID2,
 -dJpAppVendor=VENDOR, -dJpConfigDir=TMPDIR\config]

if I manually launch the command with -arch x86 it fails telling that Intelx64 files are missing (there is a preparation of wxs file before candle i suppose).

Does anyone fixed this issue?


Solution

  • I ended up using a different software for preparing the installer following the guide of the SweetHome3D ( https://sweethome3d.com/ ) creator:

    http://www.eteks.com/tips/tipCreationExe.html

    It did not work using candle and wxs so there is no real solution, just the alternative for 32bit.