diff --git a/Installation.md b/Installation.md index 172d6f4..f92c994 100644 --- a/Installation.md +++ b/Installation.md @@ -32,6 +32,34 @@ Shiori uses Go module so make sure you have `go >= 1.11` installed, then run: go get -u -v github.com/go-shiori/shiori ``` +### Cross Compiling For Windows: + +1. You need mousetrap and go-windows-terminal-sequences: + +``` +go get github.com/inconshreveable/mousetrap +go get github.com/konsorten/go-windows-terminal-sequences +``` +2. Now you need to install mingw-w64 for cross compiling: + +``` +$ sudo apt-get install gcc-mingw-w64 +``` + +Now you can build for windows amd64 and i386 arch: + +#### Winodws amd64 Build: + +``` +GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CGO_ENABLED=1 go build -o shiori_windows_amd64.exe github.com/go-shiori/shiori +``` + +#### Winodws i386 Build: + +``` +GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CGO_ENABLED=1 go build -o shiori_windows_i386.exe github.com/go-shiori/shiori +``` + ## Using Docker Image To use Docker image, you can pull the latest automated build from Docker Hub :