create_sis.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. #
  3. # DO NOT TRY TO GENERATE THE SIS FILE IF YOUR PATH CONTAINS SPACES.
  4. # ENSYMBLE DOES NOT SUPPORT THEM ! COPY THIS PROJECT TO C:\
  5. # BEFORE RUNNING THIS SCRIPT.
  6. #
  7. if [ -z "$1" ]; then
  8. echo "Sintaxe: $0 VERSION"
  9. exit 1
  10. fi
  11. PYTHON=python2.5
  12. APPNAME=Milkshake
  13. CAPBLS=NetworkServices+LocalServices+ReadUserData+WriteUserData+UserEnvironment
  14. SRCDIR=src
  15. TMPDIR=src.tmp
  16. ICON=img/none.svg
  17. PYS60DIR=../PyS60-1.9.6
  18. OPTS="--verbose --version=$1 --appname=\"$APPNAME\" --extrasdir=extras --heapsize=4k,5M --caps=$CAPBLS --icon=$ICON"
  19. echo "Populating temp dir"
  20. [ -d $TMPDIR ] && rm -fR $TMPDIR
  21. mkdir -p $TMPDIR/extras/data/python/milkshakedir/
  22. cp -a $SRCDIR/lib/* $TMPDIR/extras/data/python/milkshakedir/
  23. cp -a $SRCDIR/plugins $TMPDIR/extras/data/python/milkshakedir/
  24. cp $SRCDIR/default.py $TMPDIR/
  25. find $TMPDIR/ -name .svn -exec rm -fR {} \;
  26. [ ! -d ./module-repo/ ] && cp -a $PYS60DIR/module-repo .
  27. [ ! -d ./templates/ ] && cp -a $PYS60DIR/templates .
  28. [ ! -f ensymble.py ] && cp $PYS60DIR/ensymble.py .
  29. $PYTHON ensymble.py py2sis $OPTS "$TMPDIR" "$APPNAME-$1.sis"
  30. echo "Zipping source files"
  31. tar --exclude=.svn -cvzf $APPNAME-$1-tar.gz src
  32. zip -r $APPNAME-$1.zip src -x \*.svn\*