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