Compare commits

..

2 Commits

2 changed files with 13 additions and 8 deletions

View File

@ -124,6 +124,8 @@ go install opslag.de/schobers/tins2020/cmd/tins2020 -tags static,allegro -ldflag
``` ```
In this case the SDL 2.0 prerequisite is replaced by the Allegro 5.2 (development libraries must be available for your C compiler). In this case the SDL 2.0 prerequisite is replaced by the Allegro 5.2 (development libraries must be available for your C compiler).
## Command line interface
You can extract all resources embedded in the executable by running it from the command line with the `--extract-resources` flag. The resources will be extract in the current working directory. Note that the game will use the resources on disk first if they are available.
## Sources ## Sources
Can be found at https://opslag.de/schobers/tins2020 (Git repository). Can be found at https://opslag.de/schobers/tins2020 (Git repository).

View File

@ -7,8 +7,11 @@ else
version="$1" version="$1"
fi fi
version_safe=${version//\./_}
echo "Creating ${version} release" echo "Creating ${version} release"
rm -rf build/linux* rm -rf build/linux*
rm -rf build/windows* rm -rf build/windows*
@ -20,30 +23,30 @@ mkdir -p build/linux
go build -tags static -ldflags "-s -w" -o build/linux/botanim ../cmd/tins2020 go build -tags static -ldflags "-s -w" -o build/linux/botanim ../cmd/tins2020
cp ../README.md build/linux cp ../README.md build/linux
cd build/linux cd build/linux
zip -9 -q ../release/botanim_${version}_linux_amd64.zip * zip -9 -q ../release/botanim_${version_safe}_linux_amd64.zip *
echo "Created Linux release: build/release/botanim_${version}_linux_amd64.zip" echo "Created Linux release: build/release/botanim_${version_safe}_linux_amd64.zip"
cd ../.. cd ../..
mkdir -p build/linux-allegro mkdir -p build/linux-allegro
go build -tags static,allegro -ldflags "-s -w" -o build/linux-allegro/botanim ../cmd/tins2020 go build -tags static,allegro -ldflags "-s -w" -o build/linux-allegro/botanim ../cmd/tins2020
cp ../README.md build/linux-allegro cp ../README.md build/linux-allegro
cd build/linux-allegro cd build/linux-allegro
zip -9 -q ../release/botanim_allegro_${version}_linux_amd64.zip * zip -9 -q ../release/botanim_allegro_${version_safe}_linux_amd64.zip *
echo "Created Linux (Allegro) release: build/release/botanim_allegro_${version}_linux_amd64.zip" echo "Created Linux (Allegro) release: build/release/botanim_allegro_${version_safe}_linux_amd64.zip"
cd ../.. cd ../..
mkdir -p build/windows mkdir -p build/windows
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w" -o build/windows/botanim.exe ../cmd/tins2020 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w" -o build/windows/botanim.exe ../cmd/tins2020
cp ../README.md build/windows cp ../README.md build/windows
cd build/windows cd build/windows
zip -9 -q ../release/botanim_${version}_windows_amd64.zip * zip -9 -q ../release/botanim_${version_safe}_windows_amd64.zip *
echo "Created Windows release: build/release/botanim_${version}_windows_amd64.zip" echo "Created Windows release: build/release/botanim_${version_safe}_windows_amd64.zip"
cd ../.. cd ../..
mkdir -p build/windows-allegro mkdir -p build/windows-allegro
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static,allegro,mingw64_7_3 -ldflags "-s -w" -o build/windows-allegro/botanim.exe ../cmd/tins2020 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static,allegro,mingw64_7_3 -ldflags "-s -w" -o build/windows-allegro/botanim.exe ../cmd/tins2020
cp ../README.md build/windows-allegro cp ../README.md build/windows-allegro
cd build/windows-allegro cd build/windows-allegro
zip -9 -q ../release/botanim_allegro_${version}_windows_amd64.zip * zip -9 -q ../release/botanim_allegro_${version_safe}_windows_amd64.zip *
echo "Created Windows (Allegro) release: build/release/botanim_allegro_${version}_windows_amd64.zip" echo "Created Windows (Allegro) release: build/release/botanim_allegro_${version_safe}_windows_amd64.zip"
cd ../.. cd ../..