JAL-3247 Added AppleScript based App to run old Jalview uninstaller if present
authorBen Soares <bsoares@dundee.ac.uk>
Mon, 27 May 2019 14:50:37 +0000 (15:50 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Mon, 27 May 2019 14:50:37 +0000 (15:50 +0100)
17 files changed:
build.gradle
gradle.properties
utils/install4j/DS_Store
utils/install4j/DS_Store_1 [new file with mode: 0644]
utils/install4j/DS_Store_2 [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.app/Contents/Info.plist [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.app/Contents/MacOS/applet [new file with mode: 0755]
utils/install4j/Uninstall Old Jalview.app/Contents/PkgInfo [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.app/Contents/Resources/Scripts/main.scpt [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.icns [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.rsrc [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.app/Contents/Resources/description.rtfd/TXT.rtf [new file with mode: 0644]
utils/install4j/Uninstall Old Jalview.scpt [new file with mode: 0644]
utils/install4j/install4j_template.install4j
utils/install4j/uninstall_app_dmg_file_inclusions.sh [new file with mode: 0644]
utils/install4j/uninstall_old_jalview.icns [new file with mode: 0644]
utils/install4j/uninstall_old_jalview_files.xml [new file with mode: 0644]

index 07a4095..fb311a4 100644 (file)
@@ -846,15 +846,26 @@ task copyInstall4jTemplate(type: Copy) {
   outputs.files(install4jConf)
 
   doLast {
+    // include file associations in installer
     def installerFileAssociationsXml = file("$install4jDir/$install4jInstallerFileAssociations").text
     ant.replaceregexp(
       byline: false,
       flags: "s",
       match: '<action name="EXTENSIONS_REPLACED_BY_GRADLE".*?</action>',
-      //match: '<action.*?EXTENSIONS_REPLACED_BY_GRADLE.*?</action>',
       replace: installerFileAssociationsXml,
       file: install4jConf
     )
+    /*
+    // include uninstaller applescript app files in dmg
+    def installerDMGUninstallerXml = file("$install4jDir/$install4jDMGUninstallerAppFiles").text
+    ant.replaceregexp(
+      byline: false,
+      flags: "s",
+      match: '<file name="UNINSTALL_OLD_JALVIEW_APP_REPLACED_IN_GRADLE" file=.*?>',
+      replace: installerDMGUninstallerXml,
+      file: install4jConf
+    )
+    */
   }
 }
 
index 3063eb7..57119cb 100644 (file)
@@ -100,6 +100,7 @@ install4jResourceDir = utils/install4j
 install4jTemplate = install4j_template.install4j
 install4jInfoPlistFileAssociations = file_associations_auto-Info_plist.xml
 install4jInstallerFileAssociations = file_associations_auto-install4j.xml
+install4jDMGUninstallerAppFiles = uninstall_old_jalview_files.xml
 install4jBuildDir = build/install4j
 install4jMediaTypes = windows,macosArchive,linuxRPM,linuxDeb,unixArchive,unixInstaller
 install4jFaster = false
index 374da46..2eafdbc 100644 (file)
Binary files a/utils/install4j/DS_Store and b/utils/install4j/DS_Store differ
diff --git a/utils/install4j/DS_Store_1 b/utils/install4j/DS_Store_1
new file mode 100644 (file)
index 0000000..374da46
Binary files /dev/null and b/utils/install4j/DS_Store_1 differ
diff --git a/utils/install4j/DS_Store_2 b/utils/install4j/DS_Store_2
new file mode 100644 (file)
index 0000000..2eafdbc
Binary files /dev/null and b/utils/install4j/DS_Store_2 differ
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/Info.plist b/utils/install4j/Uninstall Old Jalview.app/Contents/Info.plist
new file mode 100644 (file)
index 0000000..c10a834
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleAllowMixedLocalizations</key>
+       <true/>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>applet</string>
+       <key>CFBundleIconFile</key>
+       <string>applet</string>
+       <key>CFBundleIdentifier</key>
+       <string>com.apple.ScriptEditor.id.Uninstall-Old-Jalview</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>Uninstall Old Jalview</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>1.0</string>
+       <key>CFBundleSignature</key>
+       <string>aplt</string>
+       <key>LSMinimumSystemVersionByArchitecture</key>
+       <dict>
+               <key>x86_64</key>
+               <string>10.6</string>
+       </dict>
+       <key>LSRequiresCarbon</key>
+       <true/>
+       <key>WindowState</key>
+       <dict>
+               <key>bundleDividerCollapsed</key>
+               <true/>
+               <key>bundlePositionOfDivider</key>
+               <real>0.0</real>
+               <key>dividerCollapsed</key>
+               <false/>
+               <key>eventLogLevel</key>
+               <integer>2</integer>
+               <key>name</key>
+               <string>ScriptWindowState</string>
+               <key>positionOfDivider</key>
+               <real>223</real>
+               <key>savedFrame</key>
+               <string>329 957 700 672 0 0 3360 1867 </string>
+               <key>selectedTab</key>
+               <string>description</string>
+       </dict>
+</dict>
+</plist>
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/MacOS/applet b/utils/install4j/Uninstall Old Jalview.app/Contents/MacOS/applet
new file mode 100755 (executable)
index 0000000..171d0cc
Binary files /dev/null and b/utils/install4j/Uninstall Old Jalview.app/Contents/MacOS/applet differ
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/PkgInfo b/utils/install4j/Uninstall Old Jalview.app/Contents/PkgInfo
new file mode 100644 (file)
index 0000000..3253614
--- /dev/null
@@ -0,0 +1 @@
+APPLaplt
\ No newline at end of file
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/Scripts/main.scpt b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/Scripts/main.scpt
new file mode 100644 (file)
index 0000000..1dce96c
Binary files /dev/null and b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/Scripts/main.scpt differ
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.icns b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.icns
new file mode 100644 (file)
index 0000000..67a2cbd
Binary files /dev/null and b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.icns differ
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.rsrc b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.rsrc
new file mode 100644 (file)
index 0000000..c41bb4e
Binary files /dev/null and b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/applet.rsrc differ
diff --git a/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/description.rtfd/TXT.rtf b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/description.rtfd/TXT.rtf
new file mode 100644 (file)
index 0000000..76ac711
--- /dev/null
@@ -0,0 +1,5 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600
+{\fonttbl}
+{\colortbl;\red255\green255\blue255;}
+{\*\expandedcolortbl;;}
+}
\ No newline at end of file
diff --git a/utils/install4j/Uninstall Old Jalview.scpt b/utils/install4j/Uninstall Old Jalview.scpt
new file mode 100644 (file)
index 0000000..1692009
Binary files /dev/null and b/utils/install4j/Uninstall Old Jalview.scpt differ
index f6a0051..2f65f51 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<install4j version="7.0.11" transformSequenceNumber="7">
-  <directoryPresets config="../../../../../buildtools/jre/openjdk-java_vm/macos-jdk8u202-b08-jre" />
+<install4j version="7.0.9" transformSequenceNumber="7">
+  <directoryPresets config="." />
   <application name="Jalview" distributionSourceDir="" applicationId="6595-2347-1923-0725" mediaDir="../../build/install4j" mediaFilePattern="${compiler:sys.shortName}_${compiler:sys.platform}_${compiler:sys.version}" compression="6" lzmaCompression="true" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="Jalview" publisher="University of Dundee" publisherWeb="http://www.jalview.org/" version="$$VERSION$$" allPathsRelative="true" backupOnSave="false" autoSave="false" convertDotsToUnderscores="true" macSignature="????" macVolumeId="5aac4968c304f65" javaMinVersion="9999999999" javaMaxVersion="" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
     <languages skipLanguageSelection="false" languageSelectionInPrincipalLanguage="false">
       <principalLanguage id="en" customLocalizationFile="" />
       <fileset name="Mac OS X JRE" id="880" customizedId="" />
       <fileset name="Windows JRE" id="882" customizedId="" />
       <fileset name="Jalview application" id="1873" customizedId="" />
+      <fileset name="MacOS Old Jalview Uninstaller" id="2105" customizedId="" />
     </filesets>
     <roots>
       <root id="735" fileset="734" location="" />
       <root id="881" fileset="880" location="" />
       <root id="883" fileset="882" location="" />
       <root id="1874" fileset="1873" location="" />
+      <root id="2106" fileset="2105" location="" />
     </roots>
     <mountPoints>
       <mountPoint id="454" root="" location="" mode="755" />
@@ -41,6 +43,7 @@
       <mountPoint id="884" root="881" location="" mode="755" />
       <mountPoint id="885" root="883" location="" mode="755" />
       <mountPoint id="1875" root="1874" location="" mode="755" />
+      <mountPoint id="2107" root="2106" location="" mode="755" />
     </mountPoints>
     <entries>
       <dirEntry mountPoint="454" file="../../getdown/files/$$JAVA_VERSION$$" overwriteMode="4" shared="false" fileMode="644" uninstallMode="2" overrideFileMode="false" overrideOverwriteMode="true" overrideUninstallMode="true" entryMode="direct" subDirectory="files" excludeSuffixes="" dirMode="755" overrideDirMode="false">
@@ -58,6 +61,9 @@
       <dirEntry mountPoint="1875" file="../../getdown/website/$$JAVA_VERSION$$/dist" overwriteMode="1" shared="false" fileMode="644" uninstallMode="2" overrideFileMode="true" overrideOverwriteMode="true" overrideUninstallMode="true" entryMode="subdir" subDirectory="dist" excludeSuffixes="" dirMode="755" overrideDirMode="true">
         <exclude />
       </dirEntry>
+      <dirEntry mountPoint="2107" file="Uninstall Old Jalview.app" overwriteMode="4" shared="false" fileMode="755" uninstallMode="0" overrideFileMode="true" overrideOverwriteMode="false" overrideUninstallMode="false" entryMode="subdir" subDirectory="Uninstall Old Jalview.app" excludeSuffixes="" dirMode="755" overrideDirMode="true">
+        <exclude />
+      </dirEntry>
     </entries>
     <components>
       <component name="jalview_getdown" id="1031" customizedId="" displayDescription="false" hideHelpButton="false" selected="true" changeable="true" downloadable="false" hidden="false">
         </include>
         <dependencies />
       </component>
+      <component name="macos_old_jalview_uninstaller" id="2110" customizedId="" displayDescription="false" hideHelpButton="false" selected="true" changeable="true" downloadable="false" hidden="false">
+        <description />
+        <include all="false">
+          <entry location=".i4j_fileset_2105" fileType="regular" />
+        </include>
+        <dependencies />
+      </component>
     </components>
   </files>
   <launchers>
@@ -1524,7 +1537,7 @@ return console.askYesNo(message, true);
               <group name="" id="49" customizedId="" beanClass="com.install4j.runtime.beans.groups.VerticalFormComponentGroup" enabled="true" commentSet="false" comment="" actionElevationType="inherit" useExternalParametrization="true" externalParametrizationName="Customize title bar" externalParametrizationMode="include">
                 <serializedBean>
                   <java class="java.beans.XMLDecoder">
-                    <object class="com.install4j.runtime.beans.groups.VerticalFormComponentGroup" id="VerticalFormComponentGroup0">
+                    <object class="com.install4j.runtime.beans.groups.VerticalFormComponentGroup">
                       <void property="backgroundColor">
                         <object class="java.awt.Color">
                           <int>255</int>
@@ -1554,21 +1567,19 @@ return console.askYesNo(message, true);
                           <string>icon:${installer:sys.installerApplicationMode}_header.png</string>
                         </object>
                       </void>
-                      <void id="Integer0" property="cellSpacing" />
-                      <void id="Integer1" property="borderWidth" />
                       <void property="imageInsets">
                         <object class="java.awt.Insets">
-                          <object idref="Integer0" />
+                          <int>0</int>
                           <int>5</int>
-                          <object idref="Integer1" />
-                          <object idref="Integer1" />
+                          <int>1</int>
+                          <int>1</int>
                         </object>
                       </void>
                       <void property="insets">
                         <object class="java.awt.Insets">
-                          <object idref="Integer0" />
+                          <int>0</int>
                           <int>20</int>
-                          <object idref="Integer0" />
+                          <int>0</int>
                           <int>10</int>
                         </object>
                       </void>
@@ -1650,17 +1661,16 @@ return console.askYesNo(message, true);
               <group name="" id="53" customizedId="" beanClass="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup" enabled="true" commentSet="false" comment="" actionElevationType="inherit" useExternalParametrization="false" externalParametrizationName="" externalParametrizationMode="all">
                 <serializedBean>
                   <java class="java.beans.XMLDecoder">
-                    <object class="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup" id="HorizontalFormComponentGroup0">
+                    <object class="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup">
                       <void property="alignFirstLabel">
                         <boolean>false</boolean>
                       </void>
-                      <void id="Integer0" property="cellSpacing" />
                       <void property="insets">
                         <object class="java.awt.Insets">
                           <int>3</int>
-                          <object idref="Integer0" />
+                          <int>5</int>
                           <int>8</int>
-                          <object idref="Integer0" />
+                          <int>5</int>
                         </object>
                       </void>
                     </object>
@@ -1747,12 +1757,13 @@ return console.askYesNo(message, true);
     </styles>
   </installerGui>
   <mediaSets>
-    <linuxDeb name="Linux Deb Package" id="153" customizedId="" mediaFileName="jalview-$$VERSION$$" installDir="/opt/${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" overwriteNeverAsConfigFiles="false" dependencies="openjdk-8-jre" bzip="true" description="Jalview Desktop" maintainerEmail="help@jalview.org" architectureSet="false" architecture="">
+    <linuxDeb name="Jalview .deb Package" id="153" customizedId="" mediaFileName="jalview-$$VERSION$$" installDir="/opt/${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" overwriteNeverAsConfigFiles="false" dependencies="openjdk-8-jre" bzip="true" description="Jalview Desktop" maintainerEmail="help@jalview.org" architectureSet="false" architecture="">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
         <component id="1156" />
         <component id="1276" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers>
@@ -1785,12 +1796,13 @@ return console.askYesNo(message, true);
         <content />
       </postUninstallScript>
     </linuxDeb>
-    <linuxRPM name="Linux RPM Package" id="570" customizedId="" mediaFileName="jalview-$$VERSION$$" installDir="/opt/${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" overwriteNeverAsConfigFiles="false" dependencies="java-1.8.0-openjdk" os="linux" arch="noarch">
+    <linuxRPM name="Jalview RPM Package" id="570" customizedId="" mediaFileName="jalview-$$VERSION$$" installDir="/opt/${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" overwriteNeverAsConfigFiles="false" dependencies="java-1.8.0-openjdk" os="linux" arch="noarch">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
         <component id="1156" />
         <component id="1276" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers>
@@ -1823,12 +1835,13 @@ return console.askYesNo(message, true);
         <content />
       </postUninstallScript>
     </linuxRPM>
-    <windows name="Windows Offline Installer" id="743" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="$$WINDOWS_JAVA_VM_TGZ$$" manualJREEntry="true" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/AppData/Local" contentFilesType="1" verifyIntegrity="true">
+    <windows name="Offline Windows x64 Installer" id="743" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="$$WINDOWS_JAVA_VM_TGZ$$" manualJREEntry="true" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/AppData/Local" contentFilesType="1" verifyIntegrity="true">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
         <component id="1276" />
         <component id="1881" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers>
@@ -1848,12 +1861,13 @@ return console.askYesNo(message, true);
         <customAttributes />
       </autoUpdate>
     </windows>
-    <windows name="Windows Network Installer" id="1862" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="$$WINDOWS_JAVA_VM_TGZ$$" manualJREEntry="true" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/AppData/Local" contentFilesType="1" verifyIntegrity="true">
+    <windows name="Network Windows x64 Installer" id="1862" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="$$WINDOWS_JAVA_VM_TGZ$$" manualJREEntry="true" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/AppData/Local" contentFilesType="1" verifyIntegrity="true">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
         <component id="1156" />
         <component id="1881" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers />
@@ -1870,7 +1884,7 @@ return console.askYesNo(message, true);
         <customAttributes />
       </autoUpdate>
     </windows>
-    <macosArchive name="macOS Offline DMG" id="878" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}-app_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" archiveType="dmg" volumeName="${compiler:sys.shortName} Installer" launcherId="737">
+    <macosArchive name="Offline macOS Disk Image" id="878" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}-app_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" archiveType="dmg" volumeName="${compiler:sys.shortName} Installer" launcherId="737">
       <excludedComponents>
         <component id="1156" />
         <component id="1276" />
@@ -1896,9 +1910,10 @@ return console.askYesNo(message, true);
         <symlink name="Jalview.app/Contents/Resources/app/${compiler:JRE_DIR}/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
         <file name="Jalview.app/Contents/Resources/Jalview-File.icns" file="./Jalview-File.icns" />
         <file name="Jalview.app/Contents/Resources/Jalview-Version-Locator.icns" file="Jalview-Version-Locator.icns" />
+        <symlink name="Uninstall Old Jalview.app" target="Jalview.app/Contents/Resources/app/Uninstall Old Jalview.app" />
       </topLevelFiles>
     </macosArchive>
-    <macosArchive name="macOS Network DMG" id="1274" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}-app_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" archiveType="dmg" volumeName="${compiler:sys.shortName} Installer" launcherId="1402">
+    <macosArchive name="Network macOS Disk Image" id="1274" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}-app_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false" archiveType="dmg" volumeName="${compiler:sys.shortName} Installer" launcherId="1402">
       <excludedComponents>
         <component id="1031" />
         <component id="1156" />
@@ -1924,14 +1939,16 @@ return console.askYesNo(message, true);
         <symlink name="Jalview.app/Contents/Resources/app/${compiler:JRE_DIR}/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
         <file name="Jalview.app/Contents/Resources/Jalview-Version-Locator.icns" file="Jalview-Version-Locator.icns" />
         <file name="Jalview.app/Contents/Resources/Jalview-File.icns" file="Jalview-File.icns" />
+        <symlink name="Uninstall Old Jalview.app" target="Jalview.app/Contents/Resources/app/Uninstall Old Jalview.app" />
       </topLevelFiles>
     </macosArchive>
-    <unixInstaller name="Unix Offline Installer" id="1595" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="" manualJREEntry="false" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/opt/" contentFilesType="1">
+    <unixInstaller name="Offline Unix Shell Installer" id="1595" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="" manualJREEntry="false" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/opt/" contentFilesType="1">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
         <component id="1276" />
         <component id="1881" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers>
@@ -1954,12 +1971,13 @@ return console.askYesNo(message, true);
         <content />
       </installerScript>
     </unixInstaller>
-    <unixInstaller name="Unix Network Installer" id="1867" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="" manualJREEntry="false" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/opt/" contentFilesType="1">
+    <unixInstaller name="Network Unix Shell Installer" id="1867" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="" manualJREEntry="false" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/opt/" contentFilesType="1">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
         <component id="1156" />
         <component id="1881" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers />
@@ -1980,12 +1998,13 @@ return console.askYesNo(message, true);
         <content />
       </installerScript>
     </unixInstaller>
-    <unixArchive name="Unix Offline Archive" id="1596" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_archive_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false">
+    <unixArchive name="Offline Unix .tar.gz Archive" id="1596" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_archive_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
         <component id="1276" />
         <component id="1881" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers>
@@ -2005,12 +2024,13 @@ return console.askYesNo(message, true);
         <customAttributes />
       </autoUpdate>
     </unixArchive>
-    <unixArchive name="Unix Network Archive" id="1871" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_archive_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false">
+    <unixArchive name="Network Unix .tar.gz Archive" id="1871" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_archive_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="true" includedJRE="" manualJREEntry="false">
       <excludedComponents>
         <component id="1031" />
         <component id="1155" />
         <component id="1156" />
         <component id="1881" />
+        <component id="2110" />
       </excludedComponents>
       <includedDownloadableComponents />
       <excludedLaunchers />
diff --git a/utils/install4j/uninstall_app_dmg_file_inclusions.sh b/utils/install4j/uninstall_app_dmg_file_inclusions.sh
new file mode 100644 (file)
index 0000000..f5bed50
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+find Uninstall\ Old\ Jalview.app | perl -p -e 'chomp;$_=qq(            <file name=").$_.qq(" file="./).$_.qq(" />\n);' > uninstall_old_jalview_files.xml
+
+# makes the file used to replace the line
+# <file name="UNINSTALL_OLD_JALVIEW_APP_REPLACED_IN_GRADLE" file="./Uninstall Old Jalview.app" />
+# (replacement happens in gradle)
diff --git a/utils/install4j/uninstall_old_jalview.icns b/utils/install4j/uninstall_old_jalview.icns
new file mode 100644 (file)
index 0000000..67a2cbd
Binary files /dev/null and b/utils/install4j/uninstall_old_jalview.icns differ
diff --git a/utils/install4j/uninstall_old_jalview_files.xml b/utils/install4j/uninstall_old_jalview_files.xml
new file mode 100644 (file)
index 0000000..342fd90
--- /dev/null
@@ -0,0 +1,13 @@
+            <file name="Uninstall Old Jalview.app" file="./Uninstall Old Jalview.app" />
+            <file name="Uninstall Old Jalview.app/Contents" file="./Uninstall Old Jalview.app/Contents" />
+            <file name="Uninstall Old Jalview.app/Contents/MacOS" file="./Uninstall Old Jalview.app/Contents/MacOS" />
+            <file name="Uninstall Old Jalview.app/Contents/MacOS/applet" file="./Uninstall Old Jalview.app/Contents/MacOS/applet" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources" file="./Uninstall Old Jalview.app/Contents/Resources" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources/applet.rsrc" file="./Uninstall Old Jalview.app/Contents/Resources/applet.rsrc" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources/description.rtfd" file="./Uninstall Old Jalview.app/Contents/Resources/description.rtfd" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources/description.rtfd/TXT.rtf" file="./Uninstall Old Jalview.app/Contents/Resources/description.rtfd/TXT.rtf" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources/Scripts" file="./Uninstall Old Jalview.app/Contents/Resources/Scripts" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources/Scripts/main.scpt" file="./Uninstall Old Jalview.app/Contents/Resources/Scripts/main.scpt" />
+            <file name="Uninstall Old Jalview.app/Contents/Resources/applet.icns" file="./Uninstall Old Jalview.app/Contents/Resources/applet.icns" />
+            <file name="Uninstall Old Jalview.app/Contents/Info.plist" file="./Uninstall Old Jalview.app/Contents/Info.plist" />
+            <file name="Uninstall Old Jalview.app/Contents/PkgInfo" file="./Uninstall Old Jalview.app/Contents/PkgInfo" />