JAL-3394 Changed most of the token replacement for adding compiler variables
authorBen Soares <bsoares@dundee.ac.uk>
Fri, 6 Dec 2019 17:34:55 +0000 (17:34 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Fri, 6 Dec 2019 17:34:55 +0000 (17:34 +0000)
build.gradle
utils/install4j/install4j8_template.install4j

index 336bc42..cdea714 100644 (file)
@@ -17,7 +17,7 @@ plugins {
   id 'application'
   id 'eclipse'
   id 'com.github.johnrengelman.shadow' version '4.0.3'
-  id 'com.install4j.gradle' version '7.0.9'
+  id 'com.install4j.gradle' version '8.0.2'
   id 'com.dorongold.task-tree' version '1.4' // only needed to display task dependency tree with  gradle task1 [task2 ...] taskTree
 }
 
@@ -1208,7 +1208,7 @@ install4j {
   installDir(file(install4jHomeDir))
 
   mediaTypes = Arrays.asList(install4j_media_types.split(","))
-  if (install4j_faster.equals("true")) {
+  if (install4j_faster.equals("true") || CHANNEL.startsWith("DEVELOP") || CHANNEL.startsWith("LOCAL")) {
     faster = true
   }
 }
@@ -1238,6 +1238,7 @@ task copyInstall4jTemplate(type: Copy) {
   from (install4jDir) {
     include install4j_template
     rename (install4j_template, install4jConfFileName)
+    /*
     filter(ReplaceTokens,
       beginToken: '',
       endToken: '',
@@ -1268,6 +1269,7 @@ task copyInstall4jTemplate(type: Copy) {
         'GETDOWN_INSTALL_DIR': getdown_install_dir
       ]
     )
+    */
     if (OSX_KEYPASS == "") {
       filter(ReplaceTokens,
         beginToken: 'codeSigning macEnabled="',
@@ -1325,7 +1327,43 @@ task installers(type: com.install4j.gradle.Install4jTask) {
   dependsOn getdown
   dependsOn copyInstall4jTemplate
   projectFile = file(install4jConfFile)
-  variables = [majorVersion: version.substring(2, 11), build: 001, OSX_KEYSTORE: OSX_KEYSTORE, JSIGN_SH: JSIGN_SH]
+
+  def install4jTemplateMd5 = ""
+  def digest = MessageDigest.getInstance("MD5")
+  digest.update(
+    (file("${install4jDir}/${install4j_template}").text + 
+    file("${install4jDir}/${install4j_info_plist_file_associations}").text +
+    file("${install4jDir}/${install4j_installer_file_associations}").text).bytes)
+  def filesMd5 = new BigInteger(1, digest.digest()).toString(16)
+  if (filesMd5.length() >= 8) {
+    filesMd5 = filesMd5.substring(0,8)
+  }
+  install4jTemplateMd5 += filesMd5
+  install4jTemplateMd5 += "_${gitHash}"
+  def install4jTemplateVersion = "${JALVIEW_VERSION}_${install4jTemplateMd5}"
+
+  variables = [
+   'OSX_KEYSTORE': OSX_KEYSTORE,
+   'JSIGN_SH': JSIGN_SH,
+   'JALVIEW_VERSION': JALVIEW_VERSION,
+   'JAVA_MIN_VERSION': JAVA_MIN_VERSION,
+   'JAVA_MAX_VERSION': JAVA_MAX_VERSION,
+   'JAVA_VERSION': JAVA_VERSION,
+   'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION,
+   'VERSION': JALVIEW_VERSION,
+   'MACOS_JAVA_VM_DIR': macosJavaVMDir,
+   'MACOS_JAVA_VM_TGZ': macosJavaVMTgz,
+   'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir,
+   'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz,
+   'INSTALL4JINFOPLISTFILEASSOCIATIONS': install4j_info_plist_file_associations,
+   'INSTALLER_TEMPLATE_VERSION': install4jTemplateVersion,
+   'COPYRIGHT_MESSAGE': install4j_copyright_message,
+   'MACOS_BUNDLE_ID': install4j_macOS_bundle_id,
+   'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
+   'GETDOWN_DIST_DIR': getdown_app_dir,
+   'GETDOWN_ALT_DIR': getdown_app_dir_alt,
+   'GETDOWN_INSTALL_DIR': getdown_install_dir
+  ]
   destination = "${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}"
   buildSelected = true
 
index 7860656..de8b133 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <install4j version="8.0.2" transformSequenceNumber="8">
   <directoryPresets config="." />
-  <application name="Jalview" applicationId="6595-2347-1923-0725" mediaDir="../../build/install4j" lzmaCompression="true" shortName="Jalview" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="$$VERSION$$" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="0000000000" javaMaxVersion="9999999999" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
+  <application name="Jalview" applicationId="6595-2347-1923-0725" mediaDir="../../build/install4j" lzmaCompression="true" shortName="Jalview" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="9999999999${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
     <searchSequence>
       <directory location="${compiler:JRE_DIR}" />
       <registry />
       <variable name="OSX_KEYSTORE" />
       <variable name="JSIGN_SH" />
       <variable name="JRE_DIR" value="jre" description="The folder under the app folder that the JRE will be either copied or unpacked into" />
-      <variable name="INSTALLER_VERSION" value="2.11.1_$$INSTALLER_TEMPLATE_MD5$$" />
+      <variable name="INSTALLER_TEMPLATE_VERSION" />
+      <variable name="JALVIEW_VERSION" />
+      <variable name="JAVA_MIN_VERSION" />
+      <variable name="JAVA_MAX_VERSION" />
+      <variable name="JAVA_VERSION" />
+      <variable name="JAVA_INTEGER_VERSION" />
+      <variable name="VERSION" />
+      <variable name="MACOS_JAVA_VM_DIR" />
+      <variable name="MACOS_JAVA_VM_TGZ" />
+      <variable name="WINDOWS_JAVA_VM_DIR" />
+      <variable name="WINDOWS_JAVA_VM_TGZ" />
+      <variable name="INSTALL4JINFOPLISTFILEASSOCIATIONS" />
+      <variable name="COPYRIGHT_MESSAGE" />
+      <variable name="MACOS_BUNDLE_ID" />
+      <variable name="GETDOWN_RESOURCE_DIR" />
+      <variable name="GETDOWN_DIST_DIR" />
+      <variable name="GETDOWN_ALT_DIR" />
+      <variable name="GETDOWN_INSTALL_DIR" />
     </variables>
     <codeSigning macEnabled="true" macPkcs12File="${compiler:OSX_KEYSTORE}" />
   </application>
       <mountPoint id="2107" root="2106" />
     </mountPoints>
     <entries>
-      <dirEntry mountPoint="454" file="../../getdown/files/$$JAVA_VERSION$$" uninstallMode="2" overrideOverwriteMode="true" overrideUninstallMode="true" subDirectory="files" />
-      <dirEntry mountPoint="736" file="../../getdown/website/$$JAVA_VERSION$$" uninstallMode="2" overrideOverwriteMode="true" overrideUninstallMode="true" subDirectory="files" />
-      <dirEntry mountPoint="884" file="$$MACOS_JAVA_VM_DIR$$" fileMode="755" overrideFileMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:JRE_DIR}" />
-      <dirEntry mountPoint="885" file="$$WINDOWS_JAVA_VM_DIR$$" fileMode="755" overrideFileMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:JRE_DIR}" />
-      <dirEntry mountPoint="1875" file="../../getdown/website/$$JAVA_VERSION$$/$$GETDOWN_DIST_DIR$$" overwriteMode="1" uninstallMode="2" overrideFileMode="true" overrideOverwriteMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="$$GETDOWN_DIST_DIR$$" overrideDirMode="true" />
+      <dirEntry mountPoint="454" file="../../getdown/files/${compiler:JAVA_VERSION}" uninstallMode="2" overrideOverwriteMode="true" overrideUninstallMode="true" subDirectory="files" />
+      <dirEntry mountPoint="736" file="../../getdown/website/${compiler:JAVA_VERSION}" uninstallMode="2" overrideOverwriteMode="true" overrideUninstallMode="true" subDirectory="files" />
+      <dirEntry mountPoint="884" file="${compiler:MACOS_JAVA_VM_DIR}" fileMode="755" overrideFileMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:JRE_DIR}" />
+      <dirEntry mountPoint="885" file="${compiler:WINDOWS_JAVA_VM_DIR}" fileMode="755" overrideFileMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:JRE_DIR}" />
+      <dirEntry mountPoint="1875" file="../../getdown/website/${compiler:JAVA_VERSION}/${compiler:GETDOWN_DIST_DIR}" overwriteMode="1" uninstallMode="2" overrideFileMode="true" overrideOverwriteMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:GETDOWN_DIST_DIR}" overrideDirMode="true" />
       <dirEntry mountPoint="2107" file="Uninstall Old Jalview.app" fileMode="755" overrideFileMode="true" entryMode="subdir" subDirectory="Uninstall Old Jalview.app" overrideDirMode="true" />
     </entries>
     <components>
@@ -80,9 +97,9 @@
     </components>
   </files>
   <launchers>
-    <launcher name="Offline Jalview Launcher" id="737" menuName="${compiler:sys.shortName}" icnsFile="../../resources/images/jalview_logos.icns" customMacBundleIdentifier="true" macBundleIdentifier="$$MACOS_BUNDLE_ID$$" fileset="734" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}">
-      <executable name="${compiler:sys.shortName}" iconSet="true" iconFile="../../resources/images/jalview_logos.ico" executableDir="." redirectStdout="true" executableMode="gui" singleInstance="true" checkConsoleParameter="true">
-        <versionInfo include="true" fileDescription="${compiler:sys.shortName}" legalCopyright="$$COPYRIGHT_MESSAGE$$" internalName="${compiler:sys.shortName}" productName="${compiler:sys.shortName}" />
+    <launcher name="Offline Jalview Launcher" id="737" menuName="${compiler:sys.shortName}" icnsFile="../../resources/images/jalview_logos.icns" customMacBundleIdentifier="true" macBundleIdentifier="${compiler:MACOS_BUNDLE_ID}" fileset="734" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}">
+      <executable name="${compiler:sys.shortName}" iconSet="true" iconFile="../../resources/images/jalview_logos.ico" executableDir="." redirectStdout="true" executableMode="gui" singleInstance="true" checkConsoleParameter="true" dpiAware="false">
+        <versionInfo include="true" fileDescription="${compiler:sys.shortName}" legalCopyright="${compiler:COPYRIGHT_MESSAGE}" internalName="${compiler:sys.shortName}" productName="${compiler:sys.shortName}" />
       </executable>
       <splashScreen width="640" height="480" bitmapFile="../../resources/images/jalview_logo_background_fade-640x480.png" textOverlay="true">
         <text>
           <versionLine x="85" y="109" text="version ${compiler:sys.version}" />
         </text>
       </splashScreen>
-      <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_VERSION}" arguments=". jalview">
+      <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_TEMPLATE_VERSION}" arguments=". jalview">
         <classPath>
           <archive location="getdown-launcher.jar" />
-          <scanDirectory location="$$GETDOWN_INSTALL_DIR$$" failOnError="false" />
+          <scanDirectory location="${compiler:GETDOWN_INSTALL_DIR}" failOnError="false" />
         </classPath>
       </java>
       <iconImageFiles>
         <file path="../../resources/images/JalviewLogo_Huge.png" />
       </iconImageFiles>
     </launcher>
-    <launcher name="Network Jalview Launcher" id="1402" menuName="${compiler:sys.shortName}" icnsFile="../../resources/images/jalview_logos.icns" customMacBundleIdentifier="true" macBundleIdentifier="$$MACOS_BUNDLE_ID$$" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}">
+    <launcher name="Network Jalview Launcher" id="1402" menuName="${compiler:sys.shortName}" icnsFile="../../resources/images/jalview_logos.icns" customMacBundleIdentifier="true" macBundleIdentifier="${compiler:MACOS_BUNDLE_ID}" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}">
       <executable name="Jalview" iconSet="true" iconFile="../../resources/images/jalview_logos.ico" executableDir="." redirectStdout="true" executableMode="gui" singleInstance="true" checkConsoleParameter="true">
-        <versionInfo include="true" fileDescription="${compiler:sys.shortName}" legalCopyright="$$COPYRIGHT_MESSAGE$$" internalName="${compiler:sys.shortName}" productName="${compiler:sys.shortName}" />
+        <versionInfo include="true" fileDescription="${compiler:sys.shortName}" legalCopyright="${compiler:COPYRIGHT_MESSAGE}" internalName="${compiler:sys.shortName}" productName="${compiler:sys.shortName}" />
       </executable>
       <splashScreen width="640" height="480" bitmapFile="../../resources/images/jalview_logo_background_fade-640x480.png" textOverlay="true">
         <text>
           <versionLine x="85" y="109" text="version ${compiler:sys.version}" />
         </text>
       </splashScreen>
-      <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_VERSION}" arguments=". jalview">
+      <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_TEMPLATE_VERSION}" arguments=". jalview">
         <classPath>
           <archive location="getdown-launcher.jar" />
-          <scanDirectory location="$$GETDOWN_INSTALL_DIR$$" failOnError="false" />
+          <scanDirectory location="${compiler:GETDOWN_INSTALL_DIR}" failOnError="false" />
         </classPath>
       </java>
       <iconImageFiles>
         <file path="../../resources/images/JalviewLogo_Huge.png" />
       </iconImageFiles>
     </launcher>
-    <launcher name="Jalview package" id="1876" menuName="${compiler:sys.shortName} $$VERSION$$" fileset="1873">
+    <launcher name="Jalview package" id="1876" menuName="${compiler:sys.shortName} ${compiler:JALVIEW_VERSION}" fileset="1873">
       <executable name="${compiler:sys.shortName}" iconSet="true" redirectStderr="false" failOnStderrOutput="false" executableMode="gui" changeWorkingDirectory="false" singleInstance="true" />
-      <java mainClass="jalview.bin.Launcher" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_VERSION}">
+      <java mainClass="jalview.bin.Launcher" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_TEMPLATE_VERSION}">
         <classPath>
-          <scanDirectory location="$$GETDOWN_DIST_DIR$$" failOnError="false" />
+          <scanDirectory location="${compiler:GETDOWN_DIST_DIR}" failOnError="false" />
         </classPath>
       </java>
       <macStaticAssociationActions mode="selected" />
@@ -635,17 +652,17 @@ return console.askYesNo(message, true);
                     </element>
                     <element index="3">
                       <object class="java.io.File">
-                        <string>$$GETDOWN_DIST_DIR$$</string>
+                        <string>${compiler:GETDOWN_DIST_DIR}</string>
                       </object>
                     </element>
                     <element index="4">
                       <object class="java.io.File">
-                        <string>$$GETDOWN_ALT_DIR$$</string>
+                        <string>${compiler:GETDOWN_ALT_DIR}</string>
                       </object>
                     </element>
                     <element index="5">
                       <object class="java.io.File">
-                        <string>$$GETDOWN_RESOURCE_DIR$$</string>
+                        <string>${compiler:GETDOWN_RESOURCE_DIR}</string>
                       </object>
                     </element>
                     <element index="6">
@@ -1024,7 +1041,7 @@ return console.askYesNo(message, true);
     </styles>
   </installerGui>
   <mediaSets>
-    <linuxDeb name="Jalview .deb Package" id="153" mediaFileName="jalview-$$VERSION$$" dependencies="openjdk-8-jre" bzip="true" description="Jalview Desktop" maintainerEmail="help@jalview.org">
+    <linuxDeb name="Jalview .deb Package" id="153" mediaFileName="jalview-${compiler:JALVIEW_VERSION}" dependencies="openjdk-8-jre" bzip="true" description="Jalview Desktop" maintainerEmail="help@jalview.org">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
@@ -1043,7 +1060,7 @@ return console.askYesNo(message, true);
         <entry filesetId="882" />
       </exclude>
     </linuxDeb>
-    <linuxRPM name="Jalview RPM Package" id="570" mediaFileName="jalview-$$VERSION$$" dependencies="java-1.8.0-openjdk" arch="noarch">
+    <linuxRPM name="Jalview RPM Package" id="570" mediaFileName="jalview-${compiler:JALVIEW_VERSION}" dependencies="java-1.8.0-openjdk" arch="noarch">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
@@ -1062,7 +1079,7 @@ return console.askYesNo(message, true);
         <entry filesetId="882" />
       </exclude>
     </linuxRPM>
-    <windows name="Offline Windows x64 Installer" id="743" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" customInstallBaseDir="~/AppData/Local">
+    <windows name="Offline Windows x64 Installer" id="743" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" customInstallBaseDir="~/AppData/Local">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
@@ -1079,9 +1096,9 @@ return console.askYesNo(message, true);
         <entry filesetId="882" />
         <entry filesetId="1873" />
       </exclude>
-      <jreBundle jreBundleSource="preCreated" includedJre="$$WINDOWS_JAVA_VM_TGZ$$" manualJreEntry="true" />
+      <jreBundle jreBundleSource="preCreated" includedJre="${compiler:WINDOWS_JAVA_VM_TGZ}" manualJreEntry="true" />
     </windows>
-    <windows name="Network Windows x64 Installer" id="1862" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" customInstallBaseDir="~/AppData/Local">
+    <windows name="Network Windows x64 Installer" id="1862" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" customInstallBaseDir="~/AppData/Local">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
@@ -1094,9 +1111,9 @@ return console.askYesNo(message, true);
         <entry filesetId="880" />
         <entry filesetId="1873" />
       </exclude>
-      <jreBundle jreBundleSource="preCreated" includedJre="$$WINDOWS_JAVA_VM_TGZ$$" manualJreEntry="true" />
+      <jreBundle jreBundleSource="preCreated" includedJre="${compiler:WINDOWS_JAVA_VM_TGZ}" manualJreEntry="true" />
     </windows>
-    <macosArchive name="Offline macOS Disk Image" id="878" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}-app_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" volumeName="${compiler:sys.shortName} Installer" launcherId="737">
+    <macosArchive name="Offline macOS Disk Image" id="878" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}-app_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}" volumeName="${compiler:sys.shortName} Installer" launcherId="737">
       <excludedComponents>
         <component id="1156" />
         <component id="1276" />
@@ -1117,7 +1134,7 @@ return console.askYesNo(message, true);
         <symlink name="Uninstall Old Jalview (optional).app" target="Jalview.app/Contents/Resources/app/Uninstall Old Jalview.app" />
       </topLevelFiles>
     </macosArchive>
-    <macosArchive name="Network macOS Disk Image" id="1274" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}-app_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" volumeName="${compiler:sys.shortName} Installer" launcherId="1402">
+    <macosArchive name="Network macOS Disk Image" id="1274" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}-app_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}" volumeName="${compiler:sys.shortName} Installer" launcherId="1402">
       <excludedComponents>
         <component id="1031" />
         <component id="1156" />
@@ -1138,7 +1155,7 @@ return console.askYesNo(message, true);
         <symlink name="Uninstall Old Jalview (optional).app" target="Jalview.app/Contents/Resources/app/Uninstall Old Jalview.app" />
       </topLevelFiles>
     </macosArchive>
-    <unixInstaller name="Offline Unix Shell Installer" id="1595" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" customInstallBaseDir="~/opt/">
+    <unixInstaller name="Offline Unix Shell Installer" id="1595" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_installer_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}" customInstallBaseDir="~/opt/">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
@@ -1156,7 +1173,7 @@ return console.askYesNo(message, true);
         <entry filesetId="1873" />
       </exclude>
     </unixInstaller>
-    <unixInstaller name="Network Unix Shell Installer" id="1867" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" customInstallBaseDir="~/opt/">
+    <unixInstaller name="Network Unix Shell Installer" id="1867" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_installer_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}" customInstallBaseDir="~/opt/">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
@@ -1171,7 +1188,7 @@ return console.askYesNo(message, true);
         <entry filesetId="1873" />
       </exclude>
     </unixInstaller>
-    <unixArchive name="Offline Unix .tar.gz Archive" id="1596" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_archive_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$">
+    <unixArchive name="Offline Unix .tar.gz Archive" id="1596" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_archive_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
@@ -1189,7 +1206,7 @@ return console.askYesNo(message, true);
         <entry filesetId="1873" />
       </exclude>
     </unixArchive>
-    <unixArchive name="Network Unix .tar.gz Archive" id="1871" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_archive_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$">
+    <unixArchive name="Network Unix .tar.gz Archive" id="1871" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_archive_${compiler:sys.version}-j${compiler:JAVA_INTEGER_VERSION}">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />