comparison mk-dist @ 2992:4b450c162e39

Add ability to create simple NSIS installer * makeinst-script.sh: New script * mk-dist: added --installer option, which will add nsis to the applications to build, and create an installer instead of a zip file.
author John Donoghue <john.donoghue@ieee.org>
date Sat, 18 May 2013 18:15:43 -0400
parents eb1643bd900c
children 8ac67219c241
comparison
equal deleted inserted replaced
2991:07a5901747ae 2992:4b450c162e39
5 jobs=9 5 jobs=9
6 6
7 OCTAVE_TARGET=octave 7 OCTAVE_TARGET=octave
8 8
9 strip=yes 9 strip=yes
10 installer=no
10 while [ $# -gt 0 ]; do 11 while [ $# -gt 0 ]; do
11 case "$1" in 12 case "$1" in
12 --jobs) 13 --jobs)
13 shift 14 shift
14 if [ $# -gt 0 ]; then 15 if [ $# -gt 0 ]; then
25 ;; 26 ;;
26 --no-strip) 27 --no-strip)
27 strip=no 28 strip=no
28 shift 29 shift
29 ;; 30 ;;
31 --installer)
32 installer=yes
33 echo "making installer"
34 shift
35 ;;
30 *) 36 *)
31 echo "mk-dist: unrecognized option: $1" 1>&2 37 echo "mk-dist: unrecognized option: $1" 1>&2
32 exit 1 38 exit 1
33 ;; 39 ;;
34 esac 40 esac
40 TARGET=i686-pc-mingw32 46 TARGET=i686-pc-mingw32
41 BUILD=x86_64-unwknown-linux-gnu 47 BUILD=x86_64-unwknown-linux-gnu
42 STRIP=$TARGET-strip 48 STRIP=$TARGET-strip
43 DATE=$(date +%Y-%m-%d-%H-%M) 49 DATE=$(date +%Y-%m-%d-%H-%M)
44 OCTAVE_DIST_DIR=$TOPDIR/dist/$OCTAVE_TARGET-$DATE 50 OCTAVE_DIST_DIR=$TOPDIR/dist/$OCTAVE_TARGET-$DATE
51 INSTALLER_PKG=
52
53 if [ $installer = "yes" ]; then
54 echo "Adding installer to build dependancies"
55 INSTALLER_PKG="nsis"
56 fi
45 57
46 echo "deleting previous dist directory..." 58 echo "deleting previous dist directory..."
47 rm -rf $TOPDIR/dist 59 rm -rf $TOPDIR/dist
48 mkdir -p $OCTAVE_DIST_DIR 60 mkdir -p $OCTAVE_DIST_DIR
49 61
50 echo "building octave and dependencies..." 62 echo "building octave and dependencies..."
51 make $OCTAVE_TARGET msys-base native-gcc native-binutils octave-forge-packages npp JOBS=$jobs 63 make $OCTAVE_TARGET $INSTALLER_PKG msys-base native-gcc native-binutils octave-forge-packages npp JOBS=$jobs
52 64
53 echo "generating lists of files to exclude..." 65 echo "generating lists of files to exclude..."
54 66
55 echo " native files..." 67 echo " native files..."
56 cat > $TOPDIR/excluded-native-files << EOF 68 cat > $TOPDIR/excluded-native-files << EOF
103 115
104 #echo "creating tar file..." 116 #echo "creating tar file..."
105 #cd $TOPDIR/dist 117 #cd $TOPDIR/dist
106 #tar -c -j -f $OCTAVE_TARGET-$DATE.tar.bz2 $OCTAVE_TARGET-$DATE 118 #tar -c -j -f $OCTAVE_TARGET-$DATE.tar.bz2 $OCTAVE_TARGET-$DATE
107 119
108 echo "creating zip file..."
109 cd $TOPDIR/dist 120 cd $TOPDIR/dist
110 zip -q -9 -r $OCTAVE_TARGET-$DATE.zip $OCTAVE_TARGET-$DATE 121
122 if [ $installer = "yes" ]; then
123 sh ../makeinst-script.sh $OCTAVE_TARGET-$DATE
124
125 echo "Generating installer ..."
126 $TOPDIR/usr/bin/$TARGET-makensis octave.nsi > /dev/null
127
128 if [ -e Octave-Installer.exe ]; then
129 rm octave.nsi
130 fi
131
132 else
133 echo "creating zip file..."
134 zip -q -9 -r $OCTAVE_TARGET-$DATE.zip $OCTAVE_TARGET-$DATE
135 fi
136