I am encountering the problem with running jpackage task on CD agent. I am getting following errors:
light.exe : error LGHT0217 : Error executing ICE action 'ICE01'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
I did some research and basically the issue can be solved by:
- Adding admin privleges to agent's user
- veryfing size of env variables size (for some people, env variables with size greater than 32KB causes similiar error)
- suppressing ICE validation
Each of this solution is either irrelevant or problematic in my case.
- I am not able to use admin user on CD
- env variables are way less than 32KB (10KB)
- I cannot find a way to suppress the ICE validation using jpackage - I know that it can be done by passing -sval to light.exe or specyfing property in wixproj file, but I have no idea how to input light.exe params to jpackage (if possible) and wixproj file passed in --resource-dir doesn't seem to do any change.
To be clear, it's working perfectly fine in my local environment.
So most likely my issue can be boiled down to the question whether it's possible to suppress ICE validation from jpackage level.
I am using badass-runtime-plugin for gradle and trying to build an installer for an javafx + spring boot application. Here is my build.gradel related part:
runtime {
modules = ['java.management', 'java.naming', 'java.instrument', 'java.sql', 'jdk.unsupported', 'jdk.security.jgss', 'java.desktop', 'java.logging', 'jdk.jfr', 'java.xml', 'java.scripting', 'jdk.crypto.cryptoki']
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
noConsole = false
}
jpackage {
mainClass = 'org.springframework.boot.loader.JarLauncher'
imageOptions += ['--icon', "src/main/resources/graphics/icon.ico"]
imageOptions += ['--win-console']
installerOptions += ['--resource-dir', "src/main/resources"]
installerOptions += ['--vendor', 'XYZ']
installerOptions += ['--type', 'msi']
installerOptions += ['--verbose']
installerOptions += ['--resource-dir', "src/main/resources/wix"]
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
}
}