summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/build-scripts/build-asymptote.dos
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/build-scripts/build-asymptote.dos')
-rwxr-xr-xBuild/source/utils/asymptote/build-scripts/build-asymptote.dos78
1 files changed, 78 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/build-scripts/build-asymptote.dos b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos
new file mode 100755
index 00000000000..376e0da0558
--- /dev/null
+++ b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos
@@ -0,0 +1,78 @@
+#!/bin/sh -x
+GC=7.6.2
+
+SHARED=~/shared/asy
+MAKEFLAGS=-j8
+export MAKEFLAGS
+VERSION=$1
+if [ -z $VERSION ]; then
+VERSION=`grep AC_INIT configure.ac | cut -s -d[ -f3 | cut -s -d] -f1`
+if [ -z $VERSION ]; then
+echo Usage: $0 VERSION
+exit
+fi
+else
+echo Building asymptote-$VERSION
+cd ~/
+rm -rf asymptote-$VERSION
+mkdir -p CTAN
+rm -rf CTAN/asymptote-$VERSION
+tar -zxf $SHARED/asymptote-$VERSION.src.tgz -C CTAN
+tar -zxf $SHARED/asymptote-$VERSION.src.tgz
+mkdir -p CTAN/asymptote-$VERSION/binaries/i386-win32/texlive
+cd asymptote-$VERSION
+fi
+BUILD=build-$VERSION
+ln -sf ../gc-$GC.tar.gz .
+ln -sf ../gc-$GC .
+make -n MSDOS=1 >& /dev/null || ./configure OSTYPE=msdos --enable-gc=$GC --with-latex=/usr/local/share --with-context=/usr/local/share
+rm -rf $BUILD
+mkdir -p $BUILD
+cp -a $HOME/dll/cygwin/*.dll $HOME/dll/*.dll $BUILD
+chmod 0644 $BUILD/*.dll
+cp -a $BUILD/*.dll ~/CTAN/asymptote-$VERSION/binaries/i386-win32/
+cp -a $HOME/dll/*.dll .
+make MSDOS=1 DESTDIR="$BUILD/" docdir="$BUILD/"
+test -f asy.list || make MSDOS=1 keywords DESTDIR="$BUILD/" docdir="$BUILD/"
+make MSDOS=1 install-asy DESTDIR="$BUILD/" docdir="$BUILD/"
+cp asy.ico README LICENSE* $BUILD
+pushd $BUILD
+mv usr/local/bin/* .
+mv usr/local/share/asymptote/GUI/*.py .
+rm -rf usr/local/share/asymptote/GUI
+mv usr/local/share/asymptote/* .
+cp $SHARED/asydoc/*.pdf .
+rm -rf bin share doc usr
+popd
+echo \!define PRODUCT_VERSION \"$VERSION\" > AsymptoteInstallInfo.nsi
+# generate uninstallation commands
+ls -p1 $BUILD \
+ | awk '{ if(index($0,"/")==length($0)) print "RMDir /r $INSTDIR\\" substr($0,0,length($0)-1); else print "Delete $INSTDIR\\" $0 }' \
+ > AsymptoteUninstallList.nsi
+
+/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe asymptote.nsi
+cp -a --no-preserve=mode asymptote-$VERSION-setup.exe $SHARED
+mv asymptote-$VERSION-setup.exe ~/
+
+cd ~/
+rm -rf asymptote-${VERSION}TL || exit
+cp -a asymptote-$VERSION asymptote-${VERSION}TL
+sed asymptote-$VERSION/config.h -e 's/ASYMPTOTE_SYSDIR ".*"/ASYMPTOTE_SYSDIR ""/g' > asymptote-${VERSION}TL/config.h
+sed asymptote-$VERSION/configure.ac -e 's/\-std=c++11//g' > asymptote-${VERSION}TL/configure.ac
+touch -r asymptote-$VERSION/config.h asymptote-${VERSION}TL/config.h
+touch -r asymptote-$VERSION/configure.ac asymptote-${VERSION}TL/configure.ac
+cd asymptote-${VERSION}TL
+rm settings.o
+rm -f doc/*.aux doc/*.log doc/*.dvi
+make MSDOS=1 DESTDIR="$BUILD/"
+make MSDOS=1 install-asy DESTDIR="$BUILD/"
+mv $BUILD/usr/local/bin/asy.exe $BUILD
+cp $BUILD/asy.exe ~/CTAN/asymptote-$VERSION/binaries/i386-win32/texlive
+cp -a configure.ac ~/CTAN/asymptote-$VERSION/
+cp -a $SHARED/asydoc/* ~/CTAN/asymptote-$VERSION/doc
+cd ~/CTAN/asymptote-$VERSION/binaries/i386-win32
+ln -sf ../../README .
+cd ~/CTAN
+cp -a ~/asymptote/build-scripts/README-binaries asymptote-$VERSION/binaries/i386-win32/texlive/README
+tar cfz asymptote-$VERSION-CTAN.tgz asymptote-$VERSION
+cp -a --no-preserve=mode asymptote-$VERSION-CTAN.tgz $SHARED