mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-10 23:15:55 +08:00
Added Cross Compiling For Windows from source
parent
9c1e39a841
commit
e8c33415d3
1 changed files with 28 additions and 0 deletions
|
@ -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
|
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
|
## Using Docker Image
|
||||||
|
|
||||||
To use Docker image, you can pull the latest automated build from Docker Hub :
|
To use Docker image, you can pull the latest automated build from Docker Hub :
|
||||||
|
|
Loading…
Add table
Reference in a new issue