diff --git a/build.gradle b/build.gradle index b9d15f7a..b4f78213 100644 --- a/build.gradle +++ b/build.gradle @@ -139,10 +139,12 @@ runtime { ] resourceDir = file("resources-linux") } else if (osName.contains('mac')) { - imageOptions += ['--copyright', '(c) 2020, Red & Black Games'] - imageOptions += ["--icon", file("icons/icon.icns")] + imageOptions += ['--copyright', '(c) 2020, Red & Black Games', "--icon", file("icons/icon.icns") + , '--resource-dir', "${projectDir}/resources-macos"] jvmArgs = ['-XstartOnFirstThread', '-Djava.awt.headless=true'] + installerOptions += ['--verbose','--app-version', getVersion(), '--vendor', 'Red & Black Games', '--resource-dir', "${projectDir}/resources-macos" ] installerType = 'dmg' + resourceDir = file("resources-macos") } } } \ No newline at end of file diff --git a/resources-macos/HyperLap2D-background.tiff b/resources-macos/HyperLap2D-background.tiff new file mode 100644 index 00000000..e0d3d014 Binary files /dev/null and b/resources-macos/HyperLap2D-background.tiff differ diff --git a/resources-macos/HyperLap2D-dmg-setup.scpt b/resources-macos/HyperLap2D-dmg-setup.scpt new file mode 100644 index 00000000..5d491bc5 --- /dev/null +++ b/resources-macos/HyperLap2D-dmg-setup.scpt @@ -0,0 +1,39 @@ +tell application "Finder" + tell disk "HyperLap2D" + 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 + + -- size of window should match size of background + set the bounds of container window to {400, 100, 1000, 475} + + 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" + + -- Create alias for install location + make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} + + 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 "/HyperLap2D.app" + -- Position application location + set position of item theFile of container window to {155, 190} + else if theFilePath is "/Applications" + -- Position install location + set position of item theFile of container window to {445, 190} + 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 {1000, 0} + end + end repeat + + close + open + update without registering applications + delay 5 + end tell +end tell \ No newline at end of file diff --git a/resources-macos/HyperLap2D-volume.icns b/resources-macos/HyperLap2D-volume.icns new file mode 100644 index 00000000..26c57900 Binary files /dev/null and b/resources-macos/HyperLap2D-volume.icns differ