aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-04 00:22:21 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-04 00:22:21 -0700
commit2a1da6ad597f36964c8c4cbc02ea47b0be58a303 (patch)
treeb196366c763e21cbfc2a524b4baee12094d5f6d6
parentaa9e0b0ba619560916437ead720dbbfba2ca6433 (diff)
downloadabc80sim-2a1da6ad597f36964c8c4cbc02ea47b0be58a303.tar.gz
abc80sim-2a1da6ad597f36964c8c4cbc02ea47b0be58a303.tar.xz
abc80sim-2a1da6ad597f36964c8c4cbc02ea47b0be58a303.zip
mkrel: script to create all release files
-rwxr-xr-xmkrel42
1 files changed, 42 insertions, 0 deletions
diff --git a/mkrel b/mkrel
new file mode 100755
index 0000000..938c329
--- /dev/null
+++ b/mkrel
@@ -0,0 +1,42 @@
+#!/bin/bash -xe
+
+project=abc80sim
+pv="$(git describe --abbrev=4)"
+
+mkdir -p rel/"$pv"
+cd rel/"$pv"
+
+( cd ../.. && git archive --format=tar --prefix="$pv"/ HEAD ) | \
+ tar xvvf -
+cd "$pv"
+./autogen.sh
+cd ..
+tar cvvf "$pv".tar "$pv"
+xz -9ek "$pv".tar
+gzip -9 "$pv".tar
+
+for target in x86_64-w64-mingw32 i686-w64-mingw32; do
+ mkdir "$target"
+ cd "$target"
+ dlldir="/usr/$target/sys-root/mingw/bin"
+ tar xfz ../"$pv".tar.gz
+ cd "$pv"
+ ./configure --host="$target"
+ make clean
+ make -j
+ cd ..
+ mv "$pv" _build
+ mkdir "$pv"
+ cp $(find _build -type f -name '*.exe') "$pv"/
+ for f in $(find _build -type f name '*.txt'); do
+ todos < "$f" > "$pv"/"$(basename "$f")"
+ done
+ for d in SDL.dll libwinpthread-1.dll libpng16-16.dll zlib1.dll; do
+ cp "$dlldir"/"$d" "$pv"/
+ done
+ zip -9r -o "$pv".zip "$pv"
+ cd ..
+done
+
+ln x86_64-w64-mingw32/"$pv".zip "$pv"-win64.zip
+ln i686-w64-mingw32/"$pv".zip "$pv"-win32.zip