[133] | 1 | #!/bin/sh -x |
---|
[301] | 2 | |
---|
| 3 | function makeDMG() { |
---|
| 4 | export backgroundPictureName=background.png |
---|
| 5 | export applicationName=QCG-Icon |
---|
| 6 | export title=QCG-Icon |
---|
| 7 | |
---|
| 8 | echo ' |
---|
| 9 | tell application "Finder" |
---|
| 10 | tell disk "'${title}'" |
---|
| 11 | open |
---|
[307] | 12 | do shell script "/Applications/Xcode.app/Contents/Developer/Tools/SetFile -a v " & "'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'" |
---|
[301] | 13 | set current view of container window to icon view |
---|
| 14 | set toolbar visible of container window to false |
---|
| 15 | set statusbar visible of container window to false |
---|
| 16 | set the bounds of container window to {400, 100, 1100, 500} |
---|
| 17 | set theViewOptions to the icon view options of container window |
---|
| 18 | set arrangement of theViewOptions to not arranged |
---|
| 19 | set icon size of theViewOptions to 96 |
---|
| 20 | -- set background picture of theViewOptions to POSIX file ("'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'") as alias |
---|
| 21 | set background picture of theViewOptions to file "'${backgroundPictureName}'" |
---|
| 22 | set position of item "'${applicationName}'" of container window to {180, 190} |
---|
| 23 | set position of item "Applications" of container window to {525, 190} |
---|
| 24 | close |
---|
| 25 | open |
---|
| 26 | update without registering applications |
---|
| 27 | delay 5 |
---|
[307] | 28 | do shell script "/Applications/Xcode.app/Contents/Developer/Tools/SetFile -a V " & "'/Volumes/'" & "'${title}'" & "'/${backgroundPictureName}'" |
---|
[301] | 29 | eject |
---|
| 30 | end tell |
---|
| 31 | end tell |
---|
| 32 | ' | osascript |
---|
| 33 | |
---|
| 34 | #make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | |
---|
[222] | 38 | if [ -d /Volumes/QCG-Icon/ ] |
---|
| 39 | then |
---|
| 40 | echo "/Volumes/QCG-Icon/ exists" |
---|
| 41 | exit 4 |
---|
| 42 | fi |
---|
| 43 | |
---|
[269] | 44 | if ! diff -x .svn -r libs dist_macosx/QCG-Icon.app/Contents/Resources/Java/lib |
---|
| 45 | then |
---|
| 46 | echo "libs inconsistency" |
---|
| 47 | exit 4 |
---|
| 48 | fi |
---|
| 49 | |
---|
[107] | 50 | svn up |
---|
| 51 | ant jar |
---|
[266] | 52 | cp dist/QCG-Icon.jar dist_macosx/QCG-Icon.app/Contents/Resources/Java/QCG-Icon.jar |
---|
[107] | 53 | cp -v *.properties dist_macosx/QCG-Icon.app/Contents/Resources/Java/ |
---|
| 54 | |
---|
[115] | 55 | open dist_macosx/dmg/QCG-Icon.dmg |
---|
[301] | 56 | sleep 10 |
---|
[107] | 57 | rm -rf /Volumes/QCG-Icon/QCG-Icon.app |
---|
[133] | 58 | ls -la /Volumes/QCG-Icon/ |
---|
[107] | 59 | cp -rf dist_macosx/QCG-Icon.app /Volumes/QCG-Icon/ |
---|
[138] | 60 | find /Volumes/QCG-Icon/ -name .svn -exec rm -rf {} \; |
---|
[301] | 61 | makeDMG |
---|
[107] | 62 | umount /Volumes/QCG-Icon |
---|
| 63 | open /Applications/Utilities/Disk\ Utility.app |
---|