Skip to content

Commit

Permalink
dmg release script to work with jpackage jdk 16
Browse files Browse the repository at this point in the history
  • Loading branch information
torakiki committed Apr 24, 2021
1 parent 7de5a3c commit a2f642b
Showing 1 changed file with 31 additions and 32 deletions.
63 changes: 31 additions & 32 deletions pdfsam-basic/src/dmg/resources/PDFsam Basic-dmg-setup.scpt
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
tell application "Finder"
tell disk "DEPLOY_ACTUAL_VOLUME_NAME"
open
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
set theDisk to a reference to (disks whose URL = "DEPLOY_VOLUME_URL")
open theDisk

-- size of window should match size of background
set the bounds of container window to {130, 220, (130 + 1080), (220 + 760)}
set theWindow to a reference to (container window of disks whose URL = "DEPLOY_VOLUME_URL")

set theViewOptions to the icon view options of container window
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 128
set background picture of theViewOptions to file ".background:background.tiff"
set current view of theWindow to icon view
set toolbar visible of theWindow to false
set statusbar visible of theWindow to false

-- Create alias for install location
make new alias file at container window to DEPLOY_INSTALL_LOCATION with properties {name:"DEPLOY_INSTALL_NAME"}
-- size of window should fit the size of background
set the bounds of theWindow to {130, 220, 1210, 980}

set allTheFiles to the name of every item of container window
repeat with theFile in allTheFiles
set theFilePath to POSIX Path of theFile
if theFilePath is "/PDFsam Basic.app"
-- Position application location
set position of item theFile of container window to {240, 440}
else if theFilePath is "/DEPLOY_INSTALL_NAME"
-- Position install location
set position of item theFile of container window to {820, 440}
else
-- Move all other files far enough to be not visible if user has "show hidden files" option set
set position of item theFile of container window to {2000, 130}
end
end repeat
set theViewOptions to a reference to the icon view options of theWindow
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 128
set background picture of theViewOptions to POSIX file "DEPLOY_BG_FILE"

update without registering applications
delay 5
close
end tell
end tell
-- Create alias for install location
make new alias file at POSIX file "DEPLOY_VOLUME_PATH" to POSIX file "DEPLOY_INSTALL_LOCATION" with properties {name:"DEPLOY_INSTALL_LOCATION"}

set allTheFiles to the name of every item of theWindow
repeat with theFile in allTheFiles
set theFilePath to POSIX path of theFile
if theFilePath is "DEPLOY_INSTALL_LOCATION" then
-- Position install location
set position of item theFile of theWindow to {820, 440}
else
-- Position application or runtime
set position of item theFile of theWindow to {240, 440}
end if
end repeat

update theDisk without registering applications
delay 5
close (get window of theDisk)
end tell

0 comments on commit a2f642b

Please sign in to comment.