izapple2/dockerbuild/buildindocker.sh

44 lines
1.5 KiB
Bash
Raw Normal View History

2019-12-26 22:11:32 +00:00
#!/bin/bash
cd /tmp
2020-10-03 21:38:26 +00:00
git clone https://github.com/ivanizag/izapple2
2019-12-26 22:11:32 +00:00
2020-10-03 21:38:26 +00:00
# Build izapple2console for Linux
2020-10-17 21:59:52 +00:00
cd /tmp/izapple2/frontend/console
2019-12-26 22:11:32 +00:00
go build .
2020-10-17 21:59:52 +00:00
chown --reference /build console
cp console /build/izapple2console
2019-12-26 22:11:32 +00:00
2020-10-03 21:38:26 +00:00
# Build izapple2console.exe for Windows
2020-10-17 21:59:52 +00:00
cd /tmp/izapple2/frontend/console
2020-10-03 21:38:26 +00:00
env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows CGO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib" CGO_FLAGS="-I/usr/x86_64-w64-mingw32/include -D_REENTRANT" go build -o izapple2console.exe .
chown --reference /build izapple2console.exe
cp izapple2console.exe /build
2019-12-26 22:11:32 +00:00
2020-10-03 21:38:26 +00:00
# Build izapple2sdl for Linux
2020-10-17 21:59:52 +00:00
cd /tmp/izapple2/frontend/a2sdl
2019-12-26 22:11:32 +00:00
go build .
2020-10-17 21:59:52 +00:00
chown --reference /build a2sdl
cp a2sdl /build/izapple2sdl
2019-12-26 22:11:32 +00:00
2020-10-03 21:38:26 +00:00
# Build izapple2sdl.exe for Windows
2020-10-17 21:59:52 +00:00
cd /tmp/izapple2/frontend/a2sdl
2020-10-03 21:38:26 +00:00
env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows CGO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib -lSDL2" CGO_FLAGS="-I/usr/x86_64-w64-mingw32/include -D_REENTRANT" go build -o izapple2sdl.exe .
chown --reference /build izapple2sdl.exe
cp izapple2sdl.exe /build
2020-10-04 13:45:23 +00:00
2020-10-17 22:29:45 +00:00
# Build izapple2fyne for Linux
cd /tmp/izapple2/frontend/a2fyne
go build .
chown --reference /build a2fyne
cp a2fyne /build/izapple2fyne
# Build izapple2fyne.exe for Windows
cd /tmp/izapple2/frontend/a2fyne
env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows CGO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib " CGO_FLAGS="-I/usr/x86_64-w64-mingw32/include -D_REENTRANT" go build -o izapple2fyne.exe .
chown --reference /build izapple2fyne.exe
cp izapple2fyne.exe /build
2020-10-04 13:45:23 +00:00
# Copy SDL2 Runtime
cp /sdl2runtime/* /build