Skip to content
Permalink
Browse files

8236132: Add missing properties to msi installers

Reviewed-by: herrick, almatvee
  • Loading branch information
Alexey Semenyuk
Alexey Semenyuk committed Jan 16, 2020
1 parent a544090 commit 163875d24bea376a3d6262ff1a9029b4f89852c4
@@ -350,6 +350,21 @@ private void prepareProto(Map<String, ? super Object> params)
MSI_IMAGE_DIR.fetchFrom(params), true);
}

// Configure installer icon
if (StandardBundlerParam.isRuntimeInstaller(params)) {
// Use icon from java launcher.
// Assume java.exe exists in Java Runtime being packed.
// Ignore custom icon if any as we don't want to copy anything in
// Java Runtime image.
installerIcon = ApplicationLayout.javaRuntime()
.runtimeDirectory()
.resolve(Path.of("bin", "java.exe"));
} else {
installerIcon = ApplicationLayout.windowsAppImage()
.launchersDirectory()
.resolve(APP_NAME.fetchFrom(params) + ".exe");
}

params.put(WIN_APP_IMAGE.getID(), appDir);

String licenseFile = LICENSE_FILE.fetchFrom(params);
@@ -420,6 +435,7 @@ public File bundle(Map<String, ? super Object> params, File outdir)
data.put("JpAppDescription", DESCRIPTION.fetchFrom(params));
data.put("JpAppVendor", VENDOR.fetchFrom(params));
data.put("JpAppVersion", PRODUCT_VERSION.fetchFrom(params));
data.put("JpIcon", installerIcon.toString());

final Path configDir = CONFIG_ROOT.fetchFrom(params).toPath();

@@ -586,6 +602,7 @@ public static void ensureByMutationFileIsRTF(File f) {

}

private Path installerIcon;
private Map<WixTool, WixTool.ToolInfo> wixToolset;
private WixSourcesBuilder wixSourcesBuilder = new WixSourcesBuilder();

@@ -86,6 +86,11 @@
<CustomAction Id="JpCheckInstallDir" BinaryKey="JpCaDll" DllEntry="CheckInstallDir" />
<?endif?>

<CustomAction Id="JpSetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
<?ifdef JpIcon ?>
<CustomAction Id="JpSetARPPRODUCTICON" Property="ARPPRODUCTICON" Value="[INSTALLDIR]$(var.JpIcon)" />
<?endif?>

<UI>
<?ifdef JpInstallDirChooser ?>
<Dialog Id="JpInvalidInstallDir" Width="300" Height="85" Title="[ProductName] Setup" NoMinimize="yes">
@@ -133,5 +138,11 @@
<WixVariable Id="WixUILicenseRtf" Value="$(var.JpLicenseRtf)"/>
<?endif?>

<InstallExecuteSequence>
<Custom Action="JpSetARPINSTALLLOCATION" After="CostFinalize">Not Installed</Custom>
<?ifdef JpIcon ?>
<Custom Action="JpSetARPPRODUCTICON" After="JpSetARPINSTALLLOCATION">Not Installed</Custom>
<?endif?>
</InstallExecuteSequence>
</Product>
</Wix>

0 comments on commit 163875d

Please sign in to comment.