Skip to content

Commit 45c85dd

Browse files
authored
Create build-zig-ape
1 parent 590ca26 commit 45c85dd

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

build-zig-ape

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
set -ex
3+
4+
if [ -z "$TAGVER" ]; then
5+
echo "env TAGVER not set"
6+
exit 1
7+
fi
8+
9+
mkdir tmp
10+
11+
cp -r zig-linux-aarch64-$TAGVER tmp/zig-common
12+
rm tmp/zig-common/zig
13+
14+
cp zig-linux-aarch64-$TAGVER/zig tmp/zig-linux-aarch64
15+
cp zig-linux-x86_64-$TAGVER/zig tmp/zig-linux-x86_64
16+
cp zig-windows-x86_64-$TAGVER/zig.exe tmp/zig-windows-x86_64.exe
17+
cp zig-windows-aarch64-$TAGVER/zig.exe tmp/zig-windows-aarch64.exe
18+
cp zig-macos-aarch64-$TAGVER/zig tmp/zig-macos-aarch64
19+
cp zig-macos-x86_64-$TAGVER/zig tmp/zig-macos-x86_64
20+
cp zig-freebsd-x86_64-$TAGVER/zig tmp/zig-freebsd-x86_64
21+
22+
mkdir zig-ape-$TAGVER
23+
cosmoc++ -std=c++23 -fexceptions -DTAGVER=\"$TAGVER\" -o zig-ape-$TAGVER/zig zig-ape.cpp
24+
rm zig-ape-$TAGVER/zig.aarch64.elf
25+
rm zig-ape-$TAGVER/zig.com.dbg
26+
27+
cd tmp
28+
zip -Ar ../zig-ape-$TAGVER/zig zig-common zig-windows-x86_64.exe zig-windows-aarch64.exe zig-macos-aarch64 zig-macos-x86_64 zig-linux-x86_64 zig-linux-aarch64 zig-freebsd-x86_64
29+
cd ..
30+
31+
rm -rf tmp

0 commit comments

Comments
 (0)