5 # script for pulling together a MacOSX app bundle.
7 GTKSTACK_ROOT=$HOME/gtk/inst
8 ARDOURSTACK_ROOT=$HOME/a3/inst
11 # where harvid and xjadeo binaries are cached
12 if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then
26 while [ $# -gt 0 ] ; do
31 # top level build targets
38 PRODUCT_PKG_DIR=ArdourSAE ;
46 PRODUCT_PKG_DIR=MixBus;
52 PRODUCT_PKG_DIR=Ardour;
59 PRODUCT_PKG_DIR=Ardour ;
61 --test) SAE= ; WITH_LADSPA=; STRIP= ; shift ;;
64 # specific build flags
67 --noharvid) WITH_HARVID= ; shift ;;
68 --noladspa) WITH_LADSPA= ; shift ;;
69 --nostrip) STRIP= ; shift ;;
70 --sysdeps) PRINT_SYSDEPS=1; shift ;;
71 --nls) WITH_NLS=1 ; shift ;;
75 if test -z "$PRODUCT_PKG_DIR" -o -z "$APPNAME"; then
76 echo "application or product-name was not specified"
80 . ../define_versions.sh
81 echo "Version is $release_version"
82 if [ "x$commit" != "x" ] ; then
83 info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
85 info_string="$release_version built on `hostname` by `whoami` on `date`"
87 echo "Info string is $info_string"
89 if [ x$DEBUG = xT ]; then
91 echo "Debug build, strip disabled"
93 if test x$STRIP != x ; then
94 echo "No debug build, strip enabled"
96 echo "No debug build, but strip disabled."
100 # setup directory structure
102 APPDIR=${APPNAME}.app
103 APPROOT=$APPDIR/Contents
104 Frameworks=$APPROOT/lib
105 Resources=$APPROOT/Resources
107 # Since this is OS X, don't try to distinguish between etc and shared
108 # (machine dependent and independent data) - just put everything
113 Locale=$Resources/locale
115 # Bundled Plugins live in a top level folder
117 Plugins=$APPROOT/Plugins
118 Surfaces=$Frameworks/surfaces
119 Panners=$Frameworks/panners
120 Backends=$Frameworks/backends
121 MidiMaps=$Shared/midi_maps
122 ExportFormats=$Shared/export
123 Templates=$Shared/templates
124 PatchFiles=$Shared/patchfiles
125 MackieControl=$Shared/mcp
127 if [ x$PRINT_SYSDEPS != x ] ; then
129 # print system dependencies
132 for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Plugins/*.so ; do
133 if ! file $file | grep -qs Mach-O ; then
136 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)"
141 echo "Removing old $APPDIR tree ..."
145 echo "Building new app directory structure ..."
147 # only bother to make the longest paths
149 mkdir -p $APPROOT/MacOS
150 mkdir -p $APPROOT/Resources
156 mkdir -p $ExportFormats
158 mkdir -p $Frameworks/modules
160 mkdir -p $MackieControl
163 # maybe set variables
165 if test x$SAE != x ; then
166 appname="Ardour3/SAE"
167 env="$env<key>ARDOUR_SAE</key><string>true</string>"
169 # current default for SAE version is German keyboard layout without a keypad
171 env="$env<key>ARDOUR_KEYBOARD_LAYOUT</key><string>de-nokeypad</string>"
172 env="$env<key>ARDOUR_UI_CONF</key><string>ardour3_ui_sae.conf</string>"
173 elif test x$MIXBUS != x ; then
175 env="$env<key>ARDOUR_MIXBUS</key><string>true</string>"
177 # current default for MIXBUS version is US keyboard layout without a keypad
179 env="$env<key>ARDOUR_KEYBOARD_LAYOUT</key><string>us-nokeypad</string>"
180 env="$env<key>ARDOUR_UI_CONF</key><string>ardour3_ui.conf</string>"
186 # if we're not going to bundle JACK, make sure we can find
187 # jack in the places where it might be
190 env="$env<key>PATH</key><string>/usr/local/bin:/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>"
191 env="$env<key>DYLIB_FALLBACK_LIBRARY_PATH</key><string>/usr/local/lib:/opt/lib</string>"
193 env="<key>LSEnvironment</key><dict>$env<key>ARDOUR_BUNDLED</key><string>true</string></dict>"
196 sed -e "s?@ENV@?$env?g" \
197 -e "s?@VERSION@?$release_version?g" \
198 -e "s?@INFOSTRING@?$info_string?g" < Info.plist.in > Info.plist
200 sed -e "s?@APPNAME@?$appname?" \
201 -e "s?@ENV@?$env?g" \
202 -e "s?@VERSION@?$release_version?g" \
203 -e "s?@INFOSTRING@?$info_string?g" < InfoPlist.strings.in > Resources/InfoPlist.strings || exit 1
207 cp Info.plist $APPROOT
208 cp -R Resources $APPROOT
212 rm -f Resources/InfoPlist.strings
215 # if we build a bundle without jack, then
216 # make the Ardour3 executable a helper
217 # script that checks to see if JACK is
221 cp startup_script $APPROOT/MacOS/Ardour3
222 chmod 775 $APPROOT/MacOS/Ardour3
223 MAIN_EXECUTABLE=Ardour3.bin
225 echo "Copying ardour executable ...."
226 cp $BUILD_ROOT/gtk2_ardour/ardour-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE
227 if test x$SAE != x ; then
228 # cp $BUILD_ROOT/gtk2_ardour/evtest $APPROOT/MacOS/gtkevents
229 cp Ardour3-SAE.icns $Resources/appIcon.icns
230 elif test x$MIXBUS != x ; then
231 cp Mixbus.icns $Resources/appIcon.icns
233 cp Ardour3.icns $Resources/appIcon.icns
235 cp typeArdour.icns $Resources/
237 set +e # things below are not error-free (optional files etc) :(
240 if test x$WITH_NLS != x ; then
241 echo "NLS support ..."
242 echo "I hope you remembered to run waf i18n"
245 for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do
246 files=`find ../../$pkg -name "*.mo"`
249 # the package name is appended with a number so that
250 # it can be parallel installed during a regular install
251 # with older (and newer) versions. it is just the major
252 # number of the release (i.e. leading digits)
255 vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'`
257 if [ -z "$files" ]; then
259 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg"
266 lang=`basename $file | sed 's/\.mo//'`
267 mkdir -p $Locale/$lang/LC_MESSAGES
268 cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
269 echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
270 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
273 LINGUAS="$LINGUAS $lang"
280 if [ -d $GTKSTACK_ROOT/share/locale/$l ] ; then
281 echo "Copying GTK i18n files for $l..."
282 cp -r $GTKSTACK_ROOT/share/locale/$l $Locale
284 # try with just the language spec
285 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
286 if [ -d $GTKSTACK_ROOT/share/locale/$just_lang ] ; then
287 echo "Copying GTK i18n files for $l..."
288 cp -r $GTKSTACK_ROOT/share/locale/$just_lang $Locale
293 echo "Skipping NLS support"
297 # Copy stuff that may be dynamically loaded
300 cp -R $GTKSTACK_ROOT/etc/* $Etc
301 echo "Copying all Pango modules ..."
302 cp -R $GTKSTACK_ROOT/lib/pango/1.8.0/modules/*.so $Frameworks/modules
303 echo "Copying all GDK Pixbuf loaders ..."
304 cp -R $GTKSTACK_ROOT/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.so $Frameworks/modules
306 cp -R $GTKSTACK_ROOT/lib/charset.alias $Resources
308 # generate new Pango module file
311 ModulesPath=$GTKSTACK_ROOT/lib/pango/1.8.0/modules
313 env PANGO_RC_FILE=pangorc $GTKSTACK_ROOT/bin/pango-querymodules | sed "s?$GTKSTACK_ROOT/lib/pango/1.8.0/modules/?@executable_path/../lib/modules/?" > $Resources/pango.modules
316 # generate a new GDK pixbufs loaders file
317 gdk-pixbuf-query-loaders | sed "s?$GTKSTACK_ROOT/lib/gdk-pixbuf-2.0/2.10.0/loaders/?@executable_path/../lib/modules/?" > $Resources/gdk-pixbuf.loaders
319 # We rely on clearlooks, so include a version from our own build tree
320 # this one is special - we will set GTK_PATH to $Frameworks/gtkengines
322 GTK_ENGINE_DIR=$Frameworks/gtkengines/engines
323 mkdir -p $GTK_ENGINE_DIR
325 echo "Copying GTK engines ..."
326 cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.dylib $Frameworks
327 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.dylib . && ln -s ../../libclearlooks.dylib libclearlooks.so)
329 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Frameworks
330 (cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so)
333 if test x$WITH_LADSPA != x ; then
334 if test x$SAE != x ; then
336 elif test x$MIXBUS != x ; then
337 plugdir=mixbus_ladspa
341 if [ -d $plugdir -a "x$(ls $plugdir)" != x ] ; then
342 echo "Copying `ls $plugdir | wc -l` plugins ..."
343 cp -r $plugdir/* $Plugins
347 # Control Surface shared libraries
348 cp $BUILD_ROOT/libs/surfaces/*/libardour_*.dylib $Surfaces
349 cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp*.dylib $Frameworks
352 cp $BUILD_ROOT/libs/panners/*/lib*.dylib $Panners
355 for backend in jack wavesaudio dummy; do
356 cp $BUILD_ROOT/libs/backends/$backend/lib*.dylib $Backends
359 # Export Formats/Presets
360 for f in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
361 cp "$f" $ExportFormats ;
364 # Session and Route templates
365 #for f in $BUILD_ROOT/../templates/* ; do
366 # if [ -d "$f" ] ; then
367 # cp -r "$f" $Templates ;
372 # got to be careful with names here
373 for x in $BUILD_ROOT/../midi_maps/*.map ; do
378 # got to be careful with names here
379 for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
384 # got to be careful with names here
385 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
386 cp "$x" $MackieControl
389 # VAMP plugins that we use
390 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.dylib $Frameworks
392 # Suil modules (new dir 'build-stack')
393 if test -d $GTKSTACK_ROOT/lib/suil-0/ ; then
394 cp $GTKSTACK_ROOT/lib/suil-0/lib* $Frameworks
397 # Suil modules (old dir 'build-ardour-stack')
398 if test -d $ARDOURSTACK_ROOT/lib/suil-0/ ; then
399 cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Frameworks
402 # VST scanner app and wrapper script, if they exist
403 if test -d $BUILD_ROOT/libs/fst ; then
404 cp $BUILD_ROOT/libs/fst/ardour-vst-scanner* $Frameworks/
408 if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
409 mkdir -p $Frameworks/vfork
410 cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $Frameworks/
416 for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Panners/*.dylib $Backends/*.dylib $Surfaces/*.dylib $Plugins/*.so ; do
417 if ! file $file | grep -qs Mach-O ; then
421 if test x$STRIP != x ; then
422 strip -u -r -arch all $file &>/dev/null
425 deps=`otool -L $file | awk '{print $1}' | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.' | grep -v "$(basename $file)"`
427 for dep in $deps ; do
429 if ! test -f $Frameworks/$base; then
430 if echo $dep | grep -sq '^libs' ; then
431 cp $BUILD_ROOT/$dep $Frameworks
439 if test x$missing = xfalse ; then
440 # everything has been found
446 echo "Copying other stuff to $APPDIR ..."
448 #cp $BUILD_ROOT/gtk2_ardour/ergonomic-us.bindings $Resources
450 cp $BUILD_ROOT/gtk2_ardour/mnemonic-us.bindings $Resources
451 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Resources
452 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Resources
453 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Resources
455 # Copied directly from source tree
457 cp ../../system_config $Resources/system_config
458 cp ../../instant.xml $Resources/instant.xml
459 cp ../../gtk2_ardour/step_editing.bindings $Resources
460 cp ../../gtk2_ardour/mixer.bindings $Resources
461 cp -r ../../gtk2_ardour/icons $Resources
462 cp -r ../../gtk2_ardour/pixmaps $Resources
463 cp ../../gtk2_ardour/dark.colors $Resources
464 cp -R ../../gtk2_ardour/splash.png $Shared
465 cp -R ../../gtk2_ardour/small-splash.png $Shared
466 cp -R ../../gtk2_ardour/ArdourMono.ttf $Shared
468 # go through and recursively remove any .svn dirs in the bundle
469 for svndir in `find $APPDIR -name .svn -type dir`; do
473 # install bundled LV2s to <app>/Contents/lib/LV2/
474 cp -R $BUILD_ROOT/libs/LV2 $Frameworks/
476 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
477 if test -d $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
478 cp -R $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 $Frameworks/LV2/
479 elif test -d $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
480 cp -R $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 $Frameworks/LV2/
484 # now fix up the executables
485 echo "Fixing up executable dependency names ..."
486 executables=$MAIN_EXECUTABLE
487 if test x$SAE != x ; then
488 executables="$executables"
491 for exe in $executables; do
492 EXE=$APPROOT/MacOS/$exe
494 for lib in `otool -L $EXE | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
496 changes="$changes -change $lib @executable_path/../lib/$base"
498 if test "x$changes" != "x" ; then
499 install_name_tool $changes $EXE
503 echo "Fixing up library names ..."
504 # now do the same for all the libraries we include
505 for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners $Backends ; do
507 libbase=`basename $libdir`
509 for dylib in $libdir/*.dylib $libdir/*.so ; do
513 if test -L $dylib ; then
517 # change all the dependencies
520 for lib in `otool -L $dylib | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
522 if echo $lib | grep -s libbase; then
523 changes="$changes -change $lib @executable_path/../$libbase/$base"
525 changes="$changes -change $lib @executable_path/../lib/$base"
529 if test "x$changes" != x ; then
530 if install_name_tool $changes $dylib ; then
537 # now the change what the library thinks its own name is
539 base=`basename $dylib`
540 install_name_tool -id @executable_path/../$libbase/$base $dylib
545 # and now ... the DMG
548 rm -rf $PRODUCT_PKG_DIR
549 mkdir $PRODUCT_PKG_DIR
554 if [ x$SAE != x ] ; then
558 echo "Creating SAE packaging directory"
559 mv $APPDIR $PRODUCT_PKG_DIR/Ardour3-SAE.app
560 cp HowToInstallArdourSAE.pdf "$PRODUCT_PKG_DIR/How To Install Ardour SAE.pdf"
561 cp SAE-de-keypad.pdf "$PRODUCT_PKG_DIR/Ardour SAE Shortcuts (keypad).pdf"
562 cp SAE-de-nokeypad.pdf "$PRODUCT_PKG_DIR/Ardour SAE Shortcuts.pdf"
564 elif [ x$MIXBUS != x ] ; then
568 echo "Creating Mixbus packaging directory"
569 mv $APPDIR $PRODUCT_PKG_DIR/
570 DMGBACKGROUND=dmgbgMB
573 echo "Creating $APPNAME packaging directory"
574 mv $APPDIR $PRODUCT_PKG_DIR/
578 if test x$WITH_HARRISON_LV2 != x ; then
579 if file ${PRODUCT_PKG_DIR}/$APPROOT/MacOS/$MAIN_EXECUTABLE | grep -q x86_64; then
584 curl -s http://www.harrisonconsoles.com/mixbus/mb3/${OSX_ARCH}/harrison_lv2s.zip \
585 | bsdtar -C "${PRODUCT_PKG_DIR}/${APPROOT}/lib/LV2/" -xf -
588 if test x$WITH_HARVID != x ; then
589 echo "installing video tools.."
590 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
591 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
593 echo "copying harvid and xjadeo ..."
596 rsync://ardour.org/video-tools/harvid-osx-${HARVID_VERSION}.tgz \
597 "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
600 rsync://ardour.org/video-tools/jadeo-${XJADEO_VERSION:1}.dmg \
601 "$CACHEDIR/jadeo-${XJADEO_VERSION:1}.dmg"
604 -C $PRODUCT_PKG_DIR/$APPROOT \
605 -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
607 JADEO=$(hdiutil attach "$CACHEDIR/jadeo-${XJADEO_VERSION:1}.dmg" | grep Apple_HFS | grep dev/ | cut -f 3)
608 cp -r "${JADEO}/Jadeo.app" "$PRODUCT_PKG_DIR/"
609 hdiutil detach "${JADEO}"
612 YPOS=$[ $DMGWINBOTTOM - 300 ]
613 XJADEOPOS="set position of item \"Jadeo.app\" of container window to {310, ${YPOS}}"
615 DMGBACKGROUND=${DMGBACKGROUND}xj
618 ###################################################################
619 ### Mixbus plugins, etc
620 if test -n "$MIXBUS"; then
621 if file ${PRODUCT_PKG_DIR}/$APPROOT/MacOS/$MAIN_EXECUTABLE | grep -q x86_64; then
627 mkdir -p "${PRODUCT_PKG_DIR}/${APPROOT}/lib/LV2"
629 # TODO use rsync://gareus.org/x42/ and cache locally - see harvid/xjadeo below
630 METERS_VERSION=$(curl -s -S http://gareus.org/x42/osx/x42-meters.latest.txt)
631 curl -s http://gareus.org/x42/osx/x42-meters-lv2-osx-${METERS_VERSION}.zip \
632 | bsdtar -C "${PRODUCT_PKG_DIR}/${APPROOT}/lib/LV2/" -xf -
634 SETBFREE_VERSION=$(curl -s -S http://gareus.org/x42/osx/setBfree.latest.txt)
635 curl -s http://gareus.org/x42/osx/setBfree-lv2-osx-${SETBFREE_VERSION}.zip \
636 | bsdtar -C "${PRODUCT_PKG_DIR}/${APPROOT}/lib/LV2/" -xf -
638 MIDIFILTER_VERSION=$(curl -s -S http://gareus.org/x42/osx/x42-midifilter.latest.txt)
639 curl -s http://gareus.org/x42/osx/x42-midifilter-lv2-osx-${MIDIFILTER_VERSION}.zip \
640 | bsdtar -C "${PRODUCT_PKG_DIR}/${APPROOT}/lib/LV2/" -xf -
642 for file in ${PRODUCT_PKG_DIR}/${APPROOT}/lib/LV2/*/.dylib ; do
643 lipo -thin ${OSX_ARCH} ${file} -output ${file}.thin
644 mv ${file}.thin ${file}
648 ################################################################################
650 ( cd $PRODUCT_PKG_DIR ; find . ) > file_list.txt
652 echo "Building DMG ..."
654 # UC_DMG=$APPNAME-${release_version}-UC.dmg
655 # FINAL_DMG=$APPNAME-${release_version}.dmg
657 if [ x$DEBUG = xT ]; then
658 UC_DMG=$APPNAME-$release_version-dbg.dmg
660 UC_DMG=$APPNAME-$release_version.dmg
662 VOLNAME=$APPNAME-$release_version
664 MNTPATH=`mktemp -d -t ardourimg`
665 TMPDMG=`mktemp -t ardour`
666 ICNSTMP=`mktemp -t ardouricon`
668 DMGMEGABYTES=$[ `du -sk "$PRODUCT_PKG_DIR" | cut -f 1` * 1024 / 1048576 + $EXTRA_SPACE_MB ]
670 echo "DMG MB = " $DMGMEGABYTES
672 rm -f $UC_DMG "$TMPDMG" "${TMPDMG}.dmg" "$ICNSTMP"
676 TMPDMG="${TMPDMG}.dmg"
678 trap "rm -rf $MNTPATH $TMPDMG ${TMPDMG}.dmg $ICNSTMP" EXIT
680 hdiutil create -megabytes $DMGMEGABYTES "$TMPDMG"
681 DiskDevice=$(hdid -nomount "$TMPDMG" | grep Apple_HFS | cut -f 1 -d ' ')
682 newfs_hfs -v "${VOLNAME}" "${DiskDevice}"
683 mount -t hfs -o nobrowse "${DiskDevice}" "${MNTPATH}"
685 cp -r ${PRODUCT_PKG_DIR}/* "${MNTPATH}" || exit
686 mkdir "${MNTPATH}/.background"
687 cp -vi ${DMGBACKGROUND}.png "${MNTPATH}/.background/dmgbg.png"
689 echo "setting DMG background ..."
691 if test $(sw_vers -productVersion | cut -d '.' -f 2) -lt 9; then
695 # OSX 10.9.X and later
696 DISKNAME=`basename "${MNTPATH}"`
700 tell application "Finder"
702 tell disk "${DISKNAME}"
704 set current view of container window to icon view
705 set toolbar visible of container window to false
706 set statusbar visible of container window to false
707 set the bounds of container window to {400, 200, 800, ${DMGWINBOTTOM}}
708 set theViewOptions to the icon view options of container window
709 set arrangement of theViewOptions to not arranged
710 set icon size of theViewOptions to 64
711 set background picture of theViewOptions to file ".background:dmgbg.png"
712 make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
713 set position of item "${APPDIR}" of container window to {90, 100}
714 set position of item "Applications" of container window to {310, 100}
720 update without registering applications
727 chmod -Rf go-w "${MNTPATH}"
731 echo "compressing Image ..."
734 umount "${DiskDevice}"
735 hdiutil eject "${DiskDevice}"
736 # Create a read-only version, use zlib compression
737 hdiutil convert -format UDZO "${TMPDMG}" -imagekey zlib-level=9 -o "${UC_DMG}"
739 echo "setting file icon ..."
741 cp ${PRODUCT_PKG_DIR}/$Resources/appIcon.icns ${ICNSTMP}.icns
742 sips -i ${ICNSTMP}.icns
743 DeRez -only icns ${ICNSTMP}.icns > ${ICNSTMP}.rsrc
744 Rez -append ${ICNSTMP}.rsrc -o "$UC_DMG"
745 SetFile -a C "$UC_DMG"
747 rm ${ICNSTMP}.icns ${ICNSTMP}.rsrc
750 echo "packaging suceeded."