summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 08ba57f)
raw | patch | inline | side by side (parent: 08ba57f)
author | jiho-sf <jiho-sf@users.sourceforge.net> | |
Tue, 1 May 2007 21:27:14 +0000 (21:27 +0000) | ||
committer | jiho-sf <jiho-sf@users.sourceforge.net> | |
Tue, 1 May 2007 21:27:14 +0000 (21:27 +0000) |
- additional file existence checks in osx-build.sh
- added checks for success of each step of osx-build before proceeding to the next one (via exit status)
- split the PACKAGE action into a new PACKAGE action (creates the app bundle) and a DISTRIB action (creates the dmg image)
- added an exit status for osx-app and osx-dmg
- removed the old call to osx-dmg at the end of osx-app (it has been commented for a while anyway)
- added checks for success of each step of osx-build before proceeding to the next one (via exit status)
- split the PACKAGE action into a new PACKAGE action (creates the app bundle) and a DISTRIB action (creates the dmg image)
- added an exit status for osx-app and osx-dmg
- removed the old call to osx-dmg at the end of osx-app (it has been commented for a while anyway)
packaging/macosx/osx-app.sh | patch | blob | history | |
packaging/macosx/osx-build.sh | patch | blob | history | |
packaging/macosx/osx-dmg.sh | patch | blob | history |
index 6fc9980c6f777d0d02c1e42817b754baf31aabc0..fe093d18b2eb86d114ba516a2448ff60422bdf8e 100755 (executable)
pkg=Inkscape
package="$pkg.app"
+# Remove a previously existing package
+if [ -d $package ]; then
+ echo "Removing previous Inkscape.app"
+ rm -Rf $package
+fi
strip=false
while getopts 's' flag; do
# done)
# Get all the icons and the rest of the script framework
-rsync -av $resdir/Resources/* $package/Contents/Resources/
+rsync -av --exclude ".svn" $resdir/Resources/* $package/Contents/Resources/
-# Make an image
-#/usr/bin/hdiutil create -srcfolder "$pkg.app" "$pkg.dmg"
-# ./osx-dmg.sh
+exit 0
index ad7a2eff642fa54627a8047ee83ffc71da416956..f532287c48ee2331b7ed79f2013a8e52bf58f252 100755 (executable)
install the build products locally, inside the source
directory (run make install)
\033[1mp,pack,package\033[0m
- package Inkscape in a double clickable .app bundle and
- store it in a .dmg image for distribution
+ package Inkscape in a double clickable .app bundle
\033[1m-s,--strip\033[0m remove debugging information in Inkscape package
+ \033[1md,dist,distrib\033[0m
+ store Inkscape.app in a disk image (dmg) for distribution
\033[1m-py,--with-python\033[0m specify python packages path for inclusion into the dmg image
\033[1mEXAMPLES\033[0m
SRCROOT=$HERE/../.. # we are currently in packaging/macosx
# Defaults
-INSTALLPREFIX=$SRCROOT/Build/
+if [ "$INSTALLPREFIX" = "" ]
+then
+ INSTALLPREFIX=$SRCROOT/Build/
+fi
SVNUPDATE="f"
AUTOGEN="f"
CONFIGURE="f"
BUILD="f"
INSTALL="f"
PACKAGE="f"
+DISTRIB="f"
STRIP="f"
PYTHON="f"
h|help)
help
exit 1 ;;
- u|up|update)
+ u|up|update)
SVNUPDATE="t" ;;
- a|auto|autogen)
+ a|auto|autogen)
AUTOGEN="t" ;;
c|conf|configure)
CONFIGURE="t" ;;
INSTALL="t" ;;
p|pack|package)
PACKAGE="t" ;;
+ d|dist|distrib)
+ DISTRIB="t" ;;
# -p|--prefix)
- #INSTALLPREFIX=$2
- #shift 1 ;;
+ # INSTALLPREFIX=$2
+ # shift 1 ;;
-s|-strip)
STRIP="t" ;;
-py|--with-python)
then
cd $SRCROOT
svn up
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nSVN update failed"
+ exit $status
+ fi
cd $HERE
fi
then
cd $SRCROOT
./autogen.sh
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nautogen failed"
+ exit $status
+ fi
cd $HERE
fi
then
ALLCONFFLAGS=`echo "$CONFFLAGS --prefix=$INSTALLPREFIX"`
cd $SRCROOT
+ if [ ! -f configure ]
+ then
+ echo "Configure script not found in $SRCROOT. Run autogen.sh first"
+ exit 1
+ fi
./configure $ALLCONFFLAGS
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nConfigure failed"
+ exit $status
+ fi
cd $HERE
fi
then
cd $SRCROOT
make
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nBuild failed"
+ exit $status
+ fi
cd $HERE
fi
then
cd $SRCROOT
make install
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nInstall failed"
+ exit $status
+ fi
cd $HERE
fi
-if [[ "$PACKAGE" == "t" ]]; then
+if [[ "$PACKAGE" == "t" ]]
+then
+
+ # Detect strip parameter
if [[ "$STRIP" == "t" ]]; then
STRIPPARAM="-s"
else
STRIPPARAM=""
fi
+
+ # Test the existence of required files
+ if [ ! -e $INSTALLPREFIX/bin/inkscape ]
+ then
+ echo "The inkscape executable \"$INSTALLPREFIX/bin/inkscape\" cound not be found."
+ exit 1
+ fi
+ if [ ! -e $SRCROOT/Info.plist ]
+ then
+ echo "The file \"$SRCROOT/Info.plist\" could not be found, please re-run configure."
+ exit 1
+ fi
+
+ # Create app bundle
./osx-app.sh $STRIPPARAM $INSTALLPREFIX/bin/inkscape $SRCROOT/Info.plist
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nApplication bundle creation failed"
+ exit $status
+ fi
+fi
+if [[ "$DISTRIB" == "t" ]]
+then
+ # Create dmg bundle
if [[ "$PYTHON" == "t" ]]; then
- ./osx-dmg.sh -py "$PYTHONDIR"
+ PYTHONOPTS="-py \"$PYTHONDIR\""
else
- ./osx-dmg.sh
+ PYTHONOPTS=""
+ fi
+ ./osx-dmg.sh $PYTHONOPTS
+ status=$?
+ if [[ $status -ne 0 ]]; then
+ echo -e "\nDisk image creation failed"
+ exit $status
fi
DATE=`date "+%Y%m%d"`
Pango `pkg-config --modversion pango`
Configure options:
$CONFFLAGS" > $INFOFILE
-
if [[ "$STRIP" == "t" ]]; then
echo "Debug info
no" >> $INFOFILE
fi
exit 0
-
index d1645344d416ba4eb5d52ca330e953394a0c0e48..a8d2932ad11bbdcc359507ce98531345a694252e 100755 (executable)
case $1 in
-s)
set_ds_store=true ;;
- -py|--with-python)
+ -py|--with-python)
add_python=true
python_dir=$2
ds_store_file="inkscape_python.ds_store"
/usr/bin/hdiutil convert "$RWNAME" -format UDZO -imagekey zlib-level=9 -o "Inkscape.dmg"
rm -f "$RWNAME"
+exit 0