Created
October 26, 2023 20:42
-
-
Save shagr4th/2139cfa271c222386039d705e2260dd7 to your computer and use it in GitHub Desktop.
task for wails3 universal macos app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package-universal-darwin: | |
summary: Packages a production build of the application into an universal `.app` bundle | |
platform: darwin | |
cmds: | |
- task: pre-build | |
- task: build-frontend | |
- GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -tags production -a -ldflags="-w -s" -o bin/{{.APP_NAME}}_amd64 | |
- GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -tags production -a -ldflags="-w -s" -o bin/{{.APP_NAME}}_arm64 | |
- task: post-build | |
- task: generate-icons | |
- lipo -create -output bin/{{.APP_NAME}} bin/{{.APP_NAME}}_amd64 bin/{{.APP_NAME}}_arm64 | |
- rm -f bin/{{.APP_NAME}}_amd64 bin/{{.APP_NAME}}_arm64 | |
- task: create-app-bundle | |
env: | |
CGO_CFLAGS: "-mmacosx-version-min=10.13" | |
CGO_LDFLAGS: "-mmacosx-version-min=10.13" | |
MACOSX_DEPLOYMENT_TARGET: "10.13" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment