-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmakeapp_windows.sh
50 lines (38 loc) · 1 KB
/
makeapp_windows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
if [[ $# < 1 ]]; then
echo "Usage: $0 <version>"
exit 1
fi
DIR="lifish_BOOM_${1}_windows_x64"
mkdir -p "$DIR"
if [[ -n $(ls "$DIR") ]]; then
echo "Directory $DIR not empty!"
exit 2
fi
[[ -d assets ]] || {
echo Missing assets directory!
exit 3
}
[[ -x Release/lifish ]] || {
echo Missing lifish executable! Did you compile the game?
exit 3
}
mkdir "$DIR"/{assets,saves}
cp -r assets/{fonts,graphics,l10n,levels.json,music,screens,sounds} "$DIR/assets"
cp Release/lifish "$DIR"
cp windows/libs/* "$DIR"
pushd "$DIR"
cat > README.txt <<'EOF'
------------------------------------
BOOM Remake by silverweed
https://github.com/silverweed/lifish
------------------------------------
The game will only work on a 64bit Windows.
EOF
popd
echo "Created app in $DIR."
echo Compressing...
rm -f "$DIR.zip" 2>/dev/null
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('$DIR', '$DIR.zip'); }"
rm -rf "$DIR"
echo Done.