mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Remove the workaround to create MacOS disk images
BitRock meanwhile fixed the issue, so use that option again instead of the manual process.
This commit is contained in:
@@ -1,133 +0,0 @@
|
||||
<actionDefinition>
|
||||
<name>createBundleDmg</name>
|
||||
<actionList>
|
||||
<createTimeStamp>
|
||||
<format>%Y%m%d%H%M%S</format>
|
||||
<variable>timestamp</variable>
|
||||
</createTimeStamp>
|
||||
<setInstallerVariable>
|
||||
<name>tempDir</name>
|
||||
<value>/tmp/.tmpDir${timestamp}</value>
|
||||
</setInstallerVariable>
|
||||
<setInstallerVariableFromRegEx>
|
||||
<name>installerBasename</name>
|
||||
<pattern>(swiftinstaller-macos-\d+-\d.\d.\d).app</pattern>
|
||||
<substitution>\1</substitution>
|
||||
<text>${project.installerFilename}</text>
|
||||
</setInstallerVariableFromRegEx>
|
||||
<setInstallerVariable>
|
||||
<name>dmgName</name>
|
||||
<value>${project.outputDirectory}/${installerBasename}.dmg</value>
|
||||
</setInstallerVariable>
|
||||
<setInstallerVariable>
|
||||
<name>tempDmgFile</name>
|
||||
<value>${tempDir}/tmp.dmg</value>
|
||||
</setInstallerVariable>
|
||||
<deleteFile>
|
||||
<path>${project.outputDirectory}/${installerBasename}.dmg</path>
|
||||
</deleteFile>
|
||||
<deleteFile>
|
||||
<path>${tempDir}</path>
|
||||
</deleteFile>
|
||||
<createDirectory>
|
||||
<path>${tempDir}/output</path>
|
||||
</createDirectory>
|
||||
<createDirectory>
|
||||
<path>${tempDir}/mnt</path>
|
||||
</createDirectory>
|
||||
<copyFile>
|
||||
<destination>${tempDir}/output</destination>
|
||||
<origin>${project.outputDirectory}/${project.installerFilename}</origin>
|
||||
</copyFile>
|
||||
|
||||
<!-- Volume Icon -->
|
||||
<actionGroup>
|
||||
<actionList>
|
||||
<createDirectory>
|
||||
<path>${tempDir}/output/.background</path>
|
||||
</createDirectory>
|
||||
<copyFile>
|
||||
<destination>${tempDir}/output/.background/background.png</destination>
|
||||
<origin>${build_project_directory}/../images/background.png</origin>
|
||||
</copyFile>
|
||||
</actionList>
|
||||
<ruleList>
|
||||
<fileExists path="${build_project_directory}/../images/background.png"/>
|
||||
</ruleList>
|
||||
</actionGroup>
|
||||
<runProgram>
|
||||
<program>hdiutil</program>
|
||||
<programArguments>create -srcfolder "${tempDir}/output" -volname "${project.fullName}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${tempDmgFile}"</programArguments>
|
||||
</runProgram>
|
||||
<actionGroup>
|
||||
<actionList>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>hdiutil</program>
|
||||
<programArguments>detach "/Volumes/${project.fullName}"</programArguments>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
</runProgram>
|
||||
<runProgram>
|
||||
<program>hdiutil</program>
|
||||
<programArguments>attach -readwrite -noverify -noautoopen "${tempDmgFile}"</programArguments>
|
||||
</runProgram>
|
||||
<!-- Apple script cannot talk to Finder when running via ssh -->
|
||||
<!-- <runProgram>
|
||||
<program>osascript</program>
|
||||
<programArguments>-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'
|
||||
</programArguments>
|
||||
</runProgram> -->
|
||||
<runProgram>
|
||||
<program>hdiutil</program>
|
||||
<programArguments>detach "/Volumes/${project.fullName}"</programArguments>
|
||||
</runProgram>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
<runProgram>
|
||||
<program>hdiutil</program>
|
||||
<programArguments>convert "${tempDmgFile}" -format UDZO -imagekey zlib-level=9 -o "${dmgName}"</programArguments>
|
||||
</runProgram>
|
||||
<deleteFile>
|
||||
<path>${tempDir}</path>
|
||||
</deleteFile>
|
||||
</actionList>
|
||||
<parameterList>
|
||||
<stringParameter name="dmgIconPosition" value="186, 186" ask="0">
|
||||
<description></description>
|
||||
<explanation></explanation>
|
||||
<default></default>
|
||||
<allowEmptyValue>1</allowEmptyValue>
|
||||
<width>40</width>
|
||||
</stringParameter>
|
||||
<stringParameter name="dmgWindowBounds" value="400, 100, 765, 465" ask="0">
|
||||
<description></description>
|
||||
<explanation></explanation>
|
||||
<default></default>
|
||||
<allowEmptyValue>1</allowEmptyValue>
|
||||
<width>40</width>
|
||||
</stringParameter>
|
||||
<stringParameter name="dmgIconSize" value="128" ask="0">
|
||||
<description></description>
|
||||
<explanation></explanation>
|
||||
<default></default>
|
||||
<allowEmptyValue>1</allowEmptyValue>
|
||||
<width>40</width>
|
||||
</stringParameter>
|
||||
</parameterList>
|
||||
</actionDefinition>
|
||||
@@ -9,11 +9,6 @@
|
||||
<logoImage>../images/logo.png</logoImage>
|
||||
<splashImage>../images/splashscreen.png</splashImage>
|
||||
<wmImage>../images/logo.png</wmImage>
|
||||
<functionDefinitionList>
|
||||
<include>
|
||||
<file>createbundledmg.xml</file>
|
||||
</include>
|
||||
</functionDefinitionList>
|
||||
<componentList>
|
||||
<include>
|
||||
<file>swift.xml</file>
|
||||
@@ -25,18 +20,6 @@
|
||||
<file>vcredist.xml</file>
|
||||
</include>
|
||||
</componentList>
|
||||
<postBuildActionList>
|
||||
<createBundleDmg>
|
||||
<dmgIconPosition>186, 186</dmgIconPosition>
|
||||
<dmgIconSize>128</dmgIconSize>
|
||||
<dmgWindowBounds>400, 100, 765, 465</dmgWindowBounds>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</createBundleDmg>
|
||||
</postBuildActionList>
|
||||
<preInstallationActionList>
|
||||
<!-- TODO Linux/MacOS: Save and load last install dir -->
|
||||
<setInstallerVariable>
|
||||
@@ -171,7 +154,7 @@
|
||||
<compressionAlgorithm>lzma</compressionAlgorithm>
|
||||
|
||||
<!-- Generate a DMG for MacOS Installer -->
|
||||
<createOsxBundleDmg>0</createOsxBundleDmg>
|
||||
<createOsxBundleDmg>1</createOsxBundleDmg>
|
||||
|
||||
<!-- <allowedLanguages>en fr es it de ja nl ru zh_CN no pt_BR</allowedLanguages> -->
|
||||
<enableRollback>0</enableRollback>
|
||||
|
||||
Reference in New Issue
Block a user