#11 Improve the build instructions

This commit is contained in:
Iván Izaguirre 2021-03-30 21:27:47 +02:00
parent 8e1bbdef0e
commit c3c1a262fc
2 changed files with 20 additions and 5 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
.vscode
SDL2.dll
a2sdl.exe

View File

@ -240,15 +240,30 @@ Only valid on SDL mode
## Building from source
Besides having a working Go installation, install the SDL2 developer files. Valid for any platform
### Linux
Besides having a working Go installation, install the SDL2 developer files. Run:
``` terminal
git clone github.com/ivanizag/izapple2
cd izapple2/frontend/a2sdl
go build .
```
### Windows
On Windows, CGO needs a gcc compiler. Install [mingw-w64](http://mingw-w64.org/doku.php/download/mingw-builds) and the [SDL2 developer files](https://www.libsdl.org/release/) for mingw-64.
Run:
``` terminal
go get github.com/ivanizag/izapple2/frontend/a2sdl
go build github.com/ivanizag/izapple2/frontend/a2sdl
git clone github.com/ivanizag/izapple2
cd izapple2\frontend\a2sdl
go build .
```
To run in Windows, copy the file `SDL2.dll` on the same folder as `a2sdl.exe`. The latest `SDL2.dll` can be found in the [Runtime binary for Windows 64-bit](https://www.libsdl.org/download-2.0.php).
### Use docker to cross compile for Linux and Windows
To create executables for Linux and Windows without installing Go, SDL2 or the Windows cross compilation toosl, run:
@ -257,5 +272,3 @@ To create executables for Linux and Windows without installing Go, SDL2 or the W
cd docker
./build.sh
```
To run in Windows, copy the file `SDL2.dll` on the same folder as `izapple2sdl.exe`. The latest `SDL2.dll` can be found in the [Runtime binary for Windows 64-bit](https://www.libsdl.org/download-2.0.php).