Mercurial > mxe-octave
view mk-dist @ 3387:0779856e1186
Add desktop shortcut and octave-versionxxxxx-installer.exe naming.
* makeinst-script.mk: change installer name to octave-VERSION.exe,
add checkbox option to create deskyop shortcuts.
* mk-dist: when in stable mode use folder name of octave-VERSION.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Fri, 03 Jan 2014 02:14:54 -0500 |
parents | 7b62537d0f8a |
children | 58b5ed5a0247 |
line wrap: on
line source
#! /bin/bash set -e ## Override with --jobs option or set JOBS variable in settings.mk jobs=0 OCTAVE_TARGET=octave TOPDIR=$(pwd) PATH=$TOPDIR/usr/bin:$PATH TARGET=i686-pc-mingw32 PREFIX=/usr/$TARGET STRIP=$TARGET-strip DATE=$(date +%Y-%m-%d-%H-%M) OCTAVE_DIST_DIR=$TOPDIR/dist/octave-$DATE INSTALLER_PKG= OCTAVE_VERSION=`head -1 $TOPDIR/octave/octave-version` strip=yes installer=no while [ $# -gt 0 ]; do case "$1" in --jobs) shift if [ $# -gt 0 ]; then jobs=$1 shift else echo "mk-dist: expecting argument for --jobs option" 1>&2 exit 1 fi ;; --stable) # for stable, use octave-version as the folder OCTAVE_TARGET=stable-octave OCTAVE_DIST_DIR=$TOPDIR/dist/octave-$OCTAVE_VERSION shift ;; --no-strip) strip=no shift ;; --installer) installer=yes echo "making installer" shift ;; *) echo "mk-dist: unrecognized option: $1" 1>&2 exit 1 ;; esac done if [ $installer = "yes" ]; then echo "Adding installer to build dependancies" INSTALLER_PKG="nsis" fi echo "deleting previous dist directory..." rm -rf $TOPDIR/dist mkdir -p $OCTAVE_DIST_DIR echo "building octave and dependencies..." if [ $jobs -gt 0 ]; then make $OCTAVE_TARGET $INSTALLER_PKG msys-base native-gcc native-binutils octave-forge-packages npp units transfig JOBS=$jobs else make $OCTAVE_TARGET $INSTALLER_PKG msys-base native-gcc native-binutils octave-forge-packages npp units transfig fi echo "generating lists of files to exclude..." echo " native files..." cat > $TOPDIR/excluded-native-files << EOF ./$TARGET ./bin/$TARGET-*.exe EOF echo " gcc cross compiler files..." cd $TOPDIR/cross-tools/$TOPDIR/$PREFIX find . -type f -o -type l | sed "s,./,," > $TOPDIR/excluded-gcc-files echo "copying files..." echo " octave and dependencies..." cd $TOPDIR/$PREFIX tar -c -h -X $TOPDIR/excluded-gcc-files -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) cp $TOPDIR/build_packages.m $OCTAVE_DIST_DIR/src echo " octaverc file..." cp $TOPDIR/octaverc $OCTAVE_DIST_DIR/share/octave/site/m/startup/octaverc echo " native tools..." cd $TOPDIR/native-tools/usr tar -c -h -X $TOPDIR/excluded-native-files -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) echo " libgcc_s_dw2-1.dll to bin directory" cd $OCTAVE_DIST_DIR cp lib/gcc/i686-pc-mingw32/libgcc_s_dw2-1.dll bin echo " msys base files..." cd $TOPDIR/msys-base tar -c -h -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) echo " msys extension files..." cd $TOPDIR/msys-extension tar -c -h -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) echo " notepad++..." cd $TOPDIR tar -c -h -f - notepad++ | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) cp $TOPDIR/build_packages.m $OCTAVE_DIST_DIR/src echo "making all files writable by user..." chmod -R u+w $OCTAVE_DIST_DIR if [ $strip = "yes" ]; then echo "stripping files..." cd $OCTAVE_DIST_DIR for f in $(find . -name '*.dll' -o -name '*.exe'); do echo " $f" $STRIP $f done fi #echo "creating tar file..." #cd $TOPDIR/dist #tar -c -j -f $OCTAVE_TARGET-$DATE.tar.bz2 $OCTAVE_TARGET-$DATE cd $TOPDIR/dist if [ $installer = "yes" ]; then ../makeinst-script.sh $OCTAVE_DIST_DIR echo "Generating installer ..." $TOPDIR/usr/bin/$TARGET-makensis octave.nsi > /dev/null if [ -e octave-$OCTAVE_VERSION-installer.exe ]; then echo "Installer created" rm octave.nsi fi else echo "creating zip file..." zip -q -9 -r $OCTAVE_DIST_DIR.zip $OCTAVE_DIST_DIR fi