fixes : bins were lacking exec bit & version.py was not instantiated
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 14 Mar 2011 21:05:15 +0000 (22:05 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 14 Mar 2011 21:05:15 +0000 (22:05 +0100)
macos/build-dmg.sh

index a861e86..930d55f 100755 (executable)
@@ -105,7 +105,7 @@ Also make sure to trash the current one before retrying"
     [ -d $skel_mnt ] || die "Could not mount skeleton $skel_dmg"
 
     # if image already mounted, it's an old run
     [ -d $skel_mnt ] || die "Could not mount skeleton $skel_dmg"
 
     # if image already mounted, it's an old run
-    [ -d $img_mnt ] && die "Image already mounted on $img_mount"
+    [ -d $img_mnt ] && die "Image already mounted on $img_mnt"
 
     hdiutil create -size $DISK_SIZE -fs HFS+J -volname ${img_name} $img_raw_dmg
     hdiutil attach -readwrite -mount required $img_raw_dmg 
 
     hdiutil create -size $DISK_SIZE -fs HFS+J -volname ${img_name} $img_raw_dmg
     hdiutil attach -readwrite -mount required $img_raw_dmg 
@@ -123,7 +123,8 @@ Also make sure to trash the current one before retrying"
     git_retrieve $sface_GITPATH sface $img_mnt/$resource_path/
     # copy binaries from sface to the bin dir
     for bin in sface.bin sface-run; do 
     git_retrieve $sface_GITPATH sface $img_mnt/$resource_path/
     # copy binaries from sface to the bin dir
     for bin in sface.bin sface-run; do 
-       git_retrieve --file $sface_GITPATH $bin $img_mnt/$bin_path/$bin
+       # don't use the --file mode as this loses the executable bit
+       git_retrieve $sface_GITPATH $bin $img_mnt/$bin_path
     done
     # install background and app icons
     git_retrieve --file $sface_GITPATH macos/background.png $img_mnt/$background_path/background.png
     done
     # install background and app icons
     git_retrieve --file $sface_GITPATH macos/background.png $img_mnt/$background_path/background.png
@@ -131,8 +132,15 @@ Also make sure to trash the current one before retrying"
     # xxx ?
     git_retrieve --file $sface_GITPATH macos/appIcon.icns $img_mnt/.VolumeIcon.icns
 
     # xxx ?
     git_retrieve --file $sface_GITPATH macos/appIcon.icns $img_mnt/.VolumeIcon.icns
 
+    # instantiate version
+    sed -e "s,@VERSIONTAG@,$sfa_release,g" -e "s,@SCMURL@,${sfa_GITPATH},g" \
+       $img_mnt/$resource_path/sfa/util/version.py.in > $img_mnt/$resource_path/sfa/util/version.py
+
     # this apparently requires xcode
     /Developer/Tools/SetFile -a V $img_mnt/$background_path
     # this apparently requires xcode
     /Developer/Tools/SetFile -a V $img_mnt/$background_path
+
+
+
     # clean up just in case
     find $img_mnt -name '*pyc' | xargs rm -f
     find $img_mnt -name '*~' | xargs rm -f
     # clean up just in case
     find $img_mnt -name '*pyc' | xargs rm -f
     find $img_mnt -name '*~' | xargs rm -f