aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 11:54:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 11:54:45 -0700
commit0a696a214c509f0e43187fd18a7555371c5aad73 (patch)
treef1ab1a811f873bf06e33439b3abf0eb41c43c9aa
parent3dd0c0cfae9890be98d6b2593bf58a6f53011a0a (diff)
downloadgrv-0a696a214c509f0e43187fd18a7555371c5aad73.tar.gz
grv-0a696a214c509f0e43187fd18a7555371c5aad73.tar.xz
grv-0a696a214c509f0e43187fd18a7555371c5aad73.zip
release script, fix to bullets.h
bullets.c: apparently hyper is a macro on Windows?
-rw-r--r--.gitignore1
-rw-r--r--bullets.c12
-rwxr-xr-xmkrel43
3 files changed, 50 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index d03e5ed..72f6606 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ grvfont.c
/autoconf/aux
/autoconf/aclocal.m4
/Makefile
+/rel
diff --git a/bullets.c b/bullets.c
index 3eac94c..3331464 100644
--- a/bullets.c
+++ b/bullets.c
@@ -97,16 +97,16 @@ void run_bullets(void)
live = 0;
break;
case 'H':
- hpp = 0; goto hyper;
+ hpp = 0; goto hyperspace;
case 'Y':
- hpp = 1; goto hyper;
+ hpp = 1; goto hyperspace;
case 'P':
- hpp = 2; goto hyper;
+ hpp = 2; goto hyperspace;
case 'E':
- hpp = 3; goto hyper;
+ hpp = 3; goto hyperspace;
case 'R':
- hpp = 4; goto hyper;
- hyper:
+ hpp = 4; goto hyperspace;
+ hyperspace:
gp.Hyp++;
color(15,gp.c);
lprintf(25, 31+hpp*2, "%c", s);
diff --git a/mkrel b/mkrel
new file mode 100755
index 0000000..71a900f
--- /dev/null
+++ b/mkrel
@@ -0,0 +1,43 @@
+#!/bin/bash -xe
+
+project=grv
+pv="$(git describe --abbrev=4)"
+windll='SDL.dll libwinpthread-1.dll'
+
+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 $windll; 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