windows build instructions; fixes #48

This commit is contained in:
Felix Angell 2018-05-06 15:27:35 +01:00
parent c383c81178
commit 2e82561a89
2 changed files with 31 additions and 7 deletions

View File

@ -78,10 +78,10 @@ Here's an example for Ubuntu:
```bash
$ sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev xclip
$ go get github.com/felixangell/phi-editor
$ cd $GOPATH/src/github.com/felixangell/phi-editor
$ go get github.com/felixangell/phi
$ cd $GOPATH/src/github.com/felixangell/phi
$ go build
$ ./phi-editor
$ ./phi
```
### macOS
@ -89,14 +89,38 @@ If you're on macOS, you can do something like this, using homebrew:
```bash
$ brew install sdl2 sdl2_image sdl2_ttf pkg-config
$ go get github.com/felixangell/phi-editor
$ cd $GOPATH/src/github.com/felixangell/phi-editor
$ go get github.com/felixangell/phi
$ cd $GOPATH/src/github.com/felixangell/phi
$ go build
$ ./phi-editor
$ ./phi
```
### windows
If you're on windows, you have my condolences.
Building on Windows is a bit more involved. It's the same process, though you will need a bit
more software:
* Install mingw-w64 from [mingw-builds](http://mingw-w64.org/doku.php/download/mingw-builds)
* Version: `latest` (e.g. `7.3.0`);
* Architecture: `x86_64`;
* Threads: `win32`;
* Exceptions: `seh`;
* Build Revision: `latest`;
* Destination folder: any folder your user owns, e.g. `C:/Users/yourname/documents`
* Install SDL2, SDL2_img, and SDL2_ttf from here: [sdl2](http://libsdl.org/download-2.0.php), [sdl2_image](https://www.libsdl.org/projects/SDL_image), [sdl2_ttf](https://www.libsdl.org/projects/SDL_ttf)
* Extract these zip files;
* Copy the `x86_64-w64-mingw32` into your mingw folder specified when installing mingw-w64.
* Add the `mingw` bin folder to the `PATH`
Once this is complete, open up a terminal and type the following:
```bash
$ go get github.com/felixangell/phi
$ cd $GOPATH/src/github.com/felixangell/phi
$ go build
$ ./phi
```
Note that you should run `go install` so that the dependencies aren't being rebuilt for faster compile times.
## configuration
Configuration files are stored in `$HOME/.phi-editor/config.toml`. Note that

0
test Normal file
View File