mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 20:29:37 +08:00
[v3 windows] Add package:windows task
This commit is contained in:
parent
1a12890556
commit
04d5842124
@ -20,6 +20,7 @@ tasks:
|
||||
|
||||
generate-icons:
|
||||
summary: Generates Windows `.ico` and Mac `.icns` files from an image
|
||||
dir: build
|
||||
cmds:
|
||||
# Generates both .ico and .icns files
|
||||
- wails generate icons -input appicon.png
|
||||
@ -29,7 +30,7 @@ tasks:
|
||||
cmds:
|
||||
- go build -tags production -ldflags="-w -s" -o bin/testapp
|
||||
|
||||
package-darwin:
|
||||
package:darwin:
|
||||
summary: Packages a production build of the application into a `.app` bundle
|
||||
deps:
|
||||
- build-prod
|
||||
@ -39,3 +40,17 @@ tasks:
|
||||
- cp build/icons.icns buildtest.app/Contents/Resources
|
||||
- cp bin/testapp buildtest.app/Contents/MacOS
|
||||
- cp build/Info.plist buildtest.app/Contents
|
||||
|
||||
windows:generate:syso:
|
||||
dir: build
|
||||
cmds:
|
||||
- wails generate syso -arch amd64 -icon icons.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: windows:generate:syso
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/testapp.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
@ -36,7 +36,9 @@ func main() {
|
||||
|
||||
// Create a custom menu
|
||||
menu := app.NewMenu()
|
||||
menu.AddRole(application.AppMenu)
|
||||
if runtime.GOOS == "darwin" {
|
||||
menu.AddRole(application.AppMenu)
|
||||
}
|
||||
|
||||
windowCounter := 1
|
||||
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
@ -83,3 +83,23 @@ tasks:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: create-app-bundle
|
||||
|
||||
generate:syso:
|
||||
dir: build
|
||||
platform: windows
|
||||
cmds:
|
||||
- wails generate syso -arch {{ "{{.ARCH}}" }} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
|
||||
vars:
|
||||
ARCH: $GOARCH
|
||||
|
||||
package:windows:
|
||||
summary: Packages a production build of the application into a `.exe` bundle
|
||||
platform: windows
|
||||
deps:
|
||||
- generate-icons
|
||||
cmds:
|
||||
- task: generate:syso
|
||||
vars:
|
||||
ARCH: amd64
|
||||
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
|
||||
- powershell Remove-item wails.syso
|
||||
|
Loading…
Reference in New Issue
Block a user