source: branches/new_jglobus/makeMacDist2.sh @ 316

Revision 316, 2.3 KB checked in by bartek, 9 years ago (diff)

fix for Yosemite and a new Java

  • Property svn:executable set to *
Line 
1#!/bin/sh -x
2
3function 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
40if [ -d /Volumes/QCG-Icon/ ]
41then
42  echo "/Volumes/QCG-Icon/ exists"
43  exit 4
44fi
45
46if ! diff -x .svn  -r libs dist_macosx/QCG-Icon.app/Contents/Resources/Java/lib
47then
48  echo "libs inconsistency"
49#  exit 4
50fi
51
52echo "Updating from svn..."
53svn up
54ant bundle
55cp -r dist_macosx/resources/* dist_macosx/QCG-Icon.app/Contents/Resources
56
57open dist_macosx/dmg/QCG-Icon.dmg
58sleep 10
59rm -rf /Volumes/QCG-Icon/QCG-Icon.app
60ls -la /Volumes/QCG-Icon/
61cp -rf dist_macosx/QCG-Icon.app /Volumes/QCG-Icon/
62find  /Volumes/QCG-Icon/ -name .svn -exec rm -rf {} \;
63makeDMG
64umount /Volumes/QCG-Icon
65open /Applications/Utilities/Disk\ Utility.app
Note: See TracBrowser for help on using the repository browser.