8215020: create-jre-installer exe fails when --runtime-image is specified. JDK-8200758-branch
authorherrick
Mon, 10 Dec 2018 16:49:54 -0500
branchJDK-8200758-branch
changeset 57068 eb6d315c4e39
parent 57067 9c17d779808e
child 57069 b8385a806d2b
8215020: create-jre-installer exe fails when --runtime-image is specified. Reviewed-by: almatvee, kcr
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java	Mon Dec 10 16:48:25 2018 -0500
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java	Mon Dec 10 16:49:54 2018 -0500
@@ -610,6 +610,12 @@
         data.put("STOP_ON_UNINSTALL", "");
         data.put("RUN_AT_STARTUP", "");
 
+        String imagePathString =
+                WIN_APP_IMAGE.fetchFrom(p).toPath().toAbsolutePath().toString();
+        data.put("APPLICATION_IMAGE", innosetupEscape(imagePathString));
+        Log.verbose("setting APPLICATION_IMAGE to " +
+                innosetupEscape(imagePathString) + " for InnoSetup");
+
         StringBuilder secondaryLaunchersCfg = new StringBuilder();
         for (Map<String, ? super Object>
                 launcher : SECONDARY_LAUNCHERS.fetchFrom(p)) {
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss	Mon Dec 10 16:48:25 2018 -0500
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss	Mon Dec 10 16:49:54 2018 -0500
@@ -36,7 +36,7 @@
 Name: "english"; MessagesFile: "compiler:Default.isl"
 
 [Files]
-Source: "INSTALLER_NAME\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "APPLICATION_IMAGE\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
 
 [Code]
 function returnTrue(): Boolean;