From c3c1a262fc0c220d30667c5c8df8b00cc0687fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Izaguirre?= Date: Tue, 30 Mar 2021 21:27:47 +0200 Subject: [PATCH] #11 Improve the build instructions --- .gitignore | 2 ++ README.md | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 722d5e7..d5d60b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .vscode +SDL2.dll +a2sdl.exe \ No newline at end of file diff --git a/README.md b/README.md index 3f0a6a5..ff6a07c 100644 --- a/README.md +++ b/README.md @@ -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).