mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-07 19:12:00 +08:00

* Update nsis template * Move app data into config.yml * mac support * Add FileAssociations application config option Support `ApplicationOpenedWithFile` event on Windows Add docs * Add FileAssociations application config option Support `ApplicationOpenedWithFile` event on Windows Add docs Add test project * Update example & docs. Fix show window bug. * Fix window show event bug * Update changelog
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
version: '3'
|
|
|
|
includes:
|
|
common: Taskfile.common.yml
|
|
|
|
tasks:
|
|
build:
|
|
summary: Creates a production build of the application
|
|
deps:
|
|
- task: common:go:mod:tidy
|
|
- task: common:build:frontend
|
|
- task: common:generate:icons
|
|
cmds:
|
|
- go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/{{.APP_NAME}}
|
|
vars:
|
|
BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production -trimpath -ldflags="-w -s"{{else}}-gcflags=all="-l"{{end}}'
|
|
env:
|
|
GOOS: darwin
|
|
CGO_ENABLED: 1
|
|
GOARCH: '{{.ARCH | default ARCH}}'
|
|
CGO_CFLAGS: "-mmacosx-version-min=10.15"
|
|
CGO_LDFLAGS: "-mmacosx-version-min=10.15"
|
|
MACOSX_DEPLOYMENT_TARGET: "10.15"
|
|
PRODUCTION: '{{.PRODUCTION | default "false"}}'
|
|
|
|
package:
|
|
summary: Packages a production build of the application into a `.app` bundle
|
|
deps:
|
|
- task: build
|
|
vars:
|
|
PRODUCTION: "true"
|
|
cmds:
|
|
- task: create:app:bundle
|
|
|
|
create:app:bundle:
|
|
summary: Creates an `.app` bundle
|
|
cmds:
|
|
- mkdir -p {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/{MacOS,Resources}
|
|
- cp build/icons.icns {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/Resources
|
|
- cp {{.BIN_DIR}}/{{.APP_NAME}} {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/MacOS
|
|
- cp build/Info.plist {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents
|
|
|
|
run:
|
|
cmds:
|
|
- '{{.BIN_DIR}}/{{.APP_NAME}}'
|