JAL-3393 Added version number to DMG Volume name. New jalview_dmg_DS_Store and docume...
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 10 Mar 2022 01:47:31 +0000 (01:47 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 10 Mar 2022 01:47:31 +0000 (01:47 +0000)
build.gradle
doc/README-DMG_creation.md
utils/channels/release/images/jalview_dmg_DS_Store
utils/install4j/set_relative_dmg_background_image.applescript [new file with mode: 0644]

index 9b1eb69..97061b0 100644 (file)
@@ -231,7 +231,7 @@ ext {
     getdownAppDistDir = getdown_app_dir_release
     reportRsyncCommand = true
     install4jSuffix = ""
-    install4jInstallerName = "${jalview_name} Installer"
+    install4jInstallerName = "${jalview_name} Installer (${JALVIEW_VERSION})"
     break
 
     case "ARCHIVE":
index 13f4bf9..dff74bb 100644 (file)
@@ -42,6 +42,13 @@ See file `README-DMG_background_image_creation.md` on how to create the backgrou
 See https://www.ej-technologies.com/resources/install4j/help/doc/concepts/dmgStyling.html which describes how to add the background image to your DMG file
 using macOS Finder.
 
+### update 2022-03-10
+Adding the background image in this way sets a full path from `/` in the `.DS_Store`, meaning the DMG Volume name cannot change (or if it does then the background image isn't found and so not displayed).
+It should now be set (only needs to be done once) to a relative path, e.g. `.background/jalview_dmg_background.png` using the AppleScript in `utils/install4j/set_relative_dmg_background_image.applescript` with, e.g.
+```
+/usr/bin/osascript ./applescript.applescript Jalview\ Installer\ \(2.11.2.0\)
+```
+
 Worth exploring further:
 * https://github.com/create-dmg/create-dmg
 * and the AppleScript on https://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools
index 8af46f4..d9ad296 100644 (file)
Binary files a/utils/channels/release/images/jalview_dmg_DS_Store and b/utils/channels/release/images/jalview_dmg_DS_Store differ
diff --git a/utils/install4j/set_relative_dmg_background_image.applescript b/utils/install4j/set_relative_dmg_background_image.applescript
new file mode 100644 (file)
index 0000000..1e9cbd2
--- /dev/null
@@ -0,0 +1,12 @@
+on run (volumeName)
+       tell application "Finder"
+               tell disk (volumeName as string)
+                       open
+
+                       set dsStore to "\"" & "/Volumes/" & volumeName & "/" & ".DS_STORE\""
+                       set opts to the icon view options of container window                   
+                       set background picture of opts to file ".background:jalview_dmg_background.png"
+                       
+               end tell
+       end tell
+end run
\ No newline at end of file