From: Ben Soares Date: Mon, 27 May 2019 14:50:37 +0000 (+0100) Subject: JAL-3247 Added AppleScript based App to run old Jalview uninstaller if present X-Git-Tag: Release_2_11_1_0~53^2~11^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=90cdc6b3f35ec9f98121a0e9c74e9ca4f7923cd3;p=jalview.git JAL-3247 Added AppleScript based App to run old Jalview uninstaller if present --- diff --git a/build.gradle b/build.gradle index 07a4095..fb311a4 100644 --- a/build.gradle +++ b/build.gradle @@ -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: '', - //match: '', replace: installerFileAssociationsXml, file: install4jConf ) + /* + // include uninstaller applescript app files in dmg + def installerDMGUninstallerXml = file("$install4jDir/$install4jDMGUninstallerAppFiles").text + ant.replaceregexp( + byline: false, + flags: "s", + match: '', + replace: installerDMGUninstallerXml, + file: install4jConf + ) + */ } } diff --git a/gradle.properties b/gradle.properties index 3063eb7..57119cb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/utils/install4j/DS_Store b/utils/install4j/DS_Store index 374da46..2eafdbc 100644 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 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 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 index 0000000..c10a834 --- /dev/null +++ b/utils/install4j/Uninstall Old Jalview.app/Contents/Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + English + CFBundleExecutable + applet + CFBundleIconFile + applet + CFBundleIdentifier + com.apple.ScriptEditor.id.Uninstall-Old-Jalview + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Uninstall Old Jalview + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + aplt + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6 + + LSRequiresCarbon + + WindowState + + bundleDividerCollapsed + + bundlePositionOfDivider + 0.0 + dividerCollapsed + + eventLogLevel + 2 + name + ScriptWindowState + positionOfDivider + 223 + savedFrame + 329 957 700 672 0 0 3360 1867 + selectedTab + description + + + 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 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 index 0000000..3253614 --- /dev/null +++ b/utils/install4j/Uninstall Old Jalview.app/Contents/PkgInfo @@ -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 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 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 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 index 0000000..76ac711 --- /dev/null +++ b/utils/install4j/Uninstall Old Jalview.app/Contents/Resources/description.rtfd/TXT.rtf @@ -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 index 0000000..1692009 Binary files /dev/null and b/utils/install4j/Uninstall Old Jalview.scpt differ diff --git a/utils/install4j/install4j_template.install4j b/utils/install4j/install4j_template.install4j index f6a0051..2f65f51 100644 --- a/utils/install4j/install4j_template.install4j +++ b/utils/install4j/install4j_template.install4j @@ -1,6 +1,6 @@ - - + + @@ -28,12 +28,14 @@ + + @@ -41,6 +43,7 @@ + @@ -58,6 +61,9 @@ + + + + @@ -1524,7 +1537,7 @@ return console.askYesNo(message, true); - + 255 @@ -1554,21 +1567,19 @@ return console.askYesNo(message, true); icon:${installer:sys.installerApplicationMode}_header.png - - - + 0 5 - - + 1 + 1 - + 0 20 - + 0 10 @@ -1650,17 +1661,16 @@ return console.askYesNo(message, true); - + false - 3 - + 5 8 - + 5 @@ -1747,12 +1757,13 @@ return console.askYesNo(message, true); - + + @@ -1785,12 +1796,13 @@ return console.askYesNo(message, true); - + + @@ -1823,12 +1835,13 @@ return console.askYesNo(message, true); - + + @@ -1848,12 +1861,13 @@ return console.askYesNo(message, true); - + + @@ -1870,7 +1884,7 @@ return console.askYesNo(message, true); - + @@ -1896,9 +1910,10 @@ return console.askYesNo(message, true); + - + @@ -1924,14 +1939,16 @@ return console.askYesNo(message, true); + - + + @@ -1954,12 +1971,13 @@ return console.askYesNo(message, true); - + + @@ -1980,12 +1998,13 @@ return console.askYesNo(message, true); - + + @@ -2005,12 +2024,13 @@ return console.askYesNo(message, true); - + + diff --git a/utils/install4j/uninstall_app_dmg_file_inclusions.sh b/utils/install4j/uninstall_app_dmg_file_inclusions.sh new file mode 100644 index 0000000..f5bed50 --- /dev/null +++ b/utils/install4j/uninstall_app_dmg_file_inclusions.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +find Uninstall\ Old\ Jalview.app | perl -p -e 'chomp;$_=qq( \n);' > uninstall_old_jalview_files.xml + +# makes the file used to replace the line +# +# (replacement happens in gradle) diff --git a/utils/install4j/uninstall_old_jalview.icns b/utils/install4j/uninstall_old_jalview.icns new file mode 100644 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 index 0000000..342fd90 --- /dev/null +++ b/utils/install4j/uninstall_old_jalview_files.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + +