diff --git a/installer/installbuilder/createbundledmg.xml b/installer/installbuilder/createbundledmg.xml new file mode 100644 index 000000000..5532cf1f2 --- /dev/null +++ b/installer/installbuilder/createbundledmg.xml @@ -0,0 +1,132 @@ + + createBundleDmg + + + %Y%m%d%H%M%S + timestamp + + + tempDir + /tmp/.tmpDir${timestamp} + + + installerBasename + (swift-installer-osx-\d+-\d.\d.\d).app + \1 + ${project.installerFilename} + + + dmgName + ${project.outputDirectory}/${installerBasename}.dmg + + + tempDmgFile + ${tempDir}/tmp.dmg + + + ${project.outputDirectory}/${installerBasename}.dmg + + + ${tempDir} + + + ${tempDir}/output + + + ${tempDir}/mnt + + + ${tempDir}/output + ${project.outputDirectory}/${project.installerFilename} + + + + + + + ${tempDir}/output/.background + + + ${tempDir}/output/.background/background.png + ${build_project_directory}/../images/background.png + + + + + + + + hdiutil + create -srcfolder "${tempDir}/output" -volname "${project.fullName}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${tempDmgFile}" + + + + + 0 + hdiutil + detach "/Volumes/${project.fullName}" + 0 + + + hdiutil + attach -readwrite -noverify -noautoopen "${tempDmgFile}" + + + osascript + -e 'tell application "Finder" +tell disk "${project.fullName}" +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 the bounds of container window to {${dmgWindowBounds}} +set theViewOptions to the icon view options of container window +set arrangement of theViewOptions to not arranged +set icon size of theViewOptions to ${dmgIconSize} +delay 5 +update without registering applications +set position of item "${project.installerFilename}" of container window to {${dmgIconPosition}} +update without registering applications +delay 5 +end tell +end tell' + + + + hdiutil + detach "/Volumes/${project.fullName}" + + + + + hdiutil + convert "${tempDmgFile}" -format UDZO -imagekey zlib-level=9 -o "${dmgName}" + + + ${tempDir} + + + + + + + + 1 + 40 + + + + + + 1 + 40 + + + + + + 1 + 40 + + + diff --git a/installer/installbuilder/project.xml b/installer/installbuilder/project.xml index 3b8f437bd..1e29c2cad 100644 --- a/installer/installbuilder/project.xml +++ b/installer/installbuilder/project.xml @@ -6,6 +6,11 @@ ../images/leftimage.png ../images/logo.png ../images/splashscreen.png + + + createbundledmg.xml + + 0 @@ -21,6 +26,18 @@ vcredist.xml + + + 186, 186 + 128 + 400, 100, 765, 465 + + + osx + + + + /usr/local/var/lib/dbus @@ -108,7 +125,7 @@ lzma - 1 + 0 0