amath/buildwin

48 lines
1.0 KiB
Plaintext
Raw Normal View History

2017-02-27 22:23:06 +00:00
#!/bin/sh
2017-08-03 20:03:35 +00:00
#
# This file is public domain
#
# Project homepage:
# https://amath.innolan.net
#
2017-02-27 22:23:06 +00:00
2017-03-11 22:37:45 +00:00
set -e
2018-08-05 20:38:42 +00:00
version="1.8.4"
2017-02-27 22:23:06 +00:00
echo "Building amath ${version} for Windows ..."
2017-03-11 22:37:45 +00:00
rm -f amath-${version}.zip
2017-02-27 22:23:06 +00:00
rm -Rf amath
rm -Rf dist
mkdir dist
2017-03-24 19:09:05 +00:00
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-DWINDOWS" LDFLAGS="-static -static-libgcc -static-libstdc++"
2017-03-11 22:37:45 +00:00
make clean
2017-02-27 22:23:06 +00:00
make static
mv amath dist/amath-${version}-x86.exe
make clean
2017-03-24 19:09:05 +00:00
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-DWINDOWS" LDFLAGS="-static -static-libgcc -static-libstdc++"
2017-02-27 22:23:06 +00:00
make static
mv amath dist/amath-${version}-x64.exe
make clean
2017-04-12 22:50:51 +00:00
#cd dist
#touch hashkeys.txt
#sha1sum amath-${version}-x86.exe >>hashkeys.txt
#sha1sum amath-${version}-x86.exe >>hashkeys.txt
#sha256sum amath-${version}-x86.exe >>hashkeys.txt
#sha256sum amath-${version}-x86.exe >>hashkeys.txt
#cd ..
2017-02-27 22:23:06 +00:00
2017-04-12 22:50:51 +00:00
tr '\n' '\r' <LICENSE >dist/license.txt
tr '\n' '\r' <HISTORY >dist/changes.txt
2017-02-27 22:23:06 +00:00
mkdir dist/script
cp script/* dist/script/
2017-04-12 22:50:51 +00:00
date -Ru >dist/build.txt
2017-02-27 22:23:06 +00:00
mv dist amath
zip -r amath-${version}.zip amath/*