2007-05-19 16:36:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Make a new distribution archive. Command line specification of the tag
|
|
|
|
#
|
|
|
|
# For now, just windows. Others will follow.
|
|
|
|
#
|
2007-05-19 16:42:58 +01:00
|
|
|
# Usage will be:
|
|
|
|
#
|
|
|
|
# gitdist ARCH TAG
|
|
|
|
#
|
|
|
|
ARCH=w32
|
|
|
|
TAG="v1.0-beta7.1"
|
2007-05-19 16:36:50 +01:00
|
|
|
|
|
|
|
DOCDIR=doc/manual
|
|
|
|
MANUAL=scyther-manual.pdf
|
2007-05-19 16:42:58 +01:00
|
|
|
ZIPNAME=scyther-$ARCH-$TAG.zip
|
2007-05-19 16:36:50 +01:00
|
|
|
|
|
|
|
DNAM="scyther-$TAG"
|
|
|
|
TMPDIR="/tmp"
|
|
|
|
RESDIR="$TMPDIR/$DNAM"
|
|
|
|
rm -rf $RESDIR
|
|
|
|
|
|
|
|
cd .. && git-archive --format=tar --prefix=$DNAM/ $TAG | (cd $TMPDIR && tar xf -)
|
|
|
|
|
|
|
|
ls $RESDIR
|
|
|
|
|
|
|
|
# Windows binary
|
|
|
|
cd $RESDIR/src
|
|
|
|
|
|
|
|
# Where is stuff going to
|
|
|
|
DESTDIR=$RESDIR/gui
|
|
|
|
|
|
|
|
# Prepare version.h with the correct flag (tag)
|
|
|
|
echo "#define SVNVERSION \"Unknown\"" >$RESDIR/src/version.h
|
|
|
|
echo "#define TAGVERSION \"$TAG\"" >>$RESDIR/src/version.h
|
|
|
|
echo "" >>$RESDIR/src/version.h
|
|
|
|
|
|
|
|
# Manual
|
|
|
|
cp $RESDIR/$DOCDIR/$MANUAL $DESTDIR
|
|
|
|
|
|
|
|
# Default flags
|
|
|
|
CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release"
|
|
|
|
# Make for windows and linux
|
|
|
|
cmake $CMFLAGS -D TARGETOS=Win32 . && make
|
|
|
|
#cmake $CMFLAGS . && make
|
|
|
|
|
|
|
|
cp scyther-w32.exe $RESDIR/gui/Scyther/Bin
|
|
|
|
|
|
|
|
# Prepare tag for gui version
|
|
|
|
echo "SCYTHER_GUI_VERSION = \"$TAG\"" >$DESTDIR/Gui/Version.py
|
|
|
|
|
|
|
|
# Make archive out of the result
|
|
|
|
WORKNAME="scyther-$TAG"
|
|
|
|
cd $RESDIR
|
|
|
|
mv gui $WORKNAME
|
2007-05-19 16:42:58 +01:00
|
|
|
|
|
|
|
zip -r ../$ZIPNAME $WORKNAME
|
|
|
|
rm -rf $RESDIR
|
|
|
|
|
2007-05-19 16:36:50 +01:00
|
|
|
|