diff --git a/x/examples/fyne-tools/README.md b/x/examples/fyne-tools/README.md index 57e71dbb..4ace1b5b 100644 --- a/x/examples/fyne-tools/README.md +++ b/x/examples/fyne-tools/README.md @@ -6,6 +6,8 @@ To run: go run github.com/Jigsaw-Code/outline-sdk/x/examples/fyne-tools@latest ``` +## Android + Package for Android and install on emulator or device: ``` go run fyne.io/fyne/v2/cmd/fyne package -os android && adb install Net_Tools.apk @@ -14,6 +16,35 @@ go run fyne.io/fyne/v2/cmd/fyne package -os android && adb install Net_Tools.apk Note: the generated APK is around 85MB. +## Windows + +If you are on Windows, you can just use the regular `go build` or `go run` command. + +Because the app uses cgo, we need to cross-compilation tools to build from other platforms. + +If you are on macOS, you can build the Windows app with [MinGW-x64](https://www.mingw-w64.org/). + +First install MinGW-w64. MacPorts is the [official channel](https://www.mingw-w64.org/downloads/#macports): + +``` +sudo port install x86_64-w64-mingw32-gcc +``` + +With Homebrew (unofficial): + +``` +brew install mingw-w64 +``` + +Build the app (64-bit): + +``` +GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC="x86_64-w64-mingw32-gcc" go build . +``` + +The first build will take minutes, since there's a lot of platform code to be built. +Subsequent builds will be incremental and take a few seconds. + ## Screenshots image