From 04d5842124cae9b085ca1b5e4041dbb4f83f28c7 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 5 Jun 2023 19:57:40 +1000 Subject: [PATCH] [v3 windows] Add package:windows task --- v3/examples/build/Taskfile.yml | 19 +++++++++++++-- .../build/build/icon.ico} | Bin 21017 -> 21677 bytes v3/examples/build/main.go | 4 +++- .../templates/_base/default/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/lit-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- v3/internal/templates/lit/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/preact-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/preact/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/react-swc-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/react-swc/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/react-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- v3/internal/templates/react/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/svelte-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/svelte/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/vanilla-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/vanilla/Taskfile.tmpl.yml | 22 +++++++++++++++++- .../templates/vue-ts/Taskfile.tmpl.yml | 22 +++++++++++++++++- v3/internal/templates/vue/Taskfile.tmpl.yml | 22 +++++++++++++++++- 18 files changed, 335 insertions(+), 18 deletions(-) rename v3/{internal/commands/defaults/icons.ico => examples/build/build/icon.ico} (92%) diff --git a/v3/examples/build/Taskfile.yml b/v3/examples/build/Taskfile.yml index 67e1db618..125f123fd 100644 --- a/v3/examples/build/Taskfile.yml +++ b/v3/examples/build/Taskfile.yml @@ -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 @@ -38,4 +39,18 @@ tasks: - mkdir -p buildtest.app/Contents/{MacOS,Resources} - cp build/icons.icns buildtest.app/Contents/Resources - cp bin/testapp buildtest.app/Contents/MacOS - - cp build/Info.plist buildtest.app/Contents \ No newline at end of file + - 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 diff --git a/v3/internal/commands/defaults/icons.ico b/v3/examples/build/build/icon.ico similarity index 92% rename from v3/internal/commands/defaults/icons.ico rename to v3/examples/build/build/icon.ico index f33479841c61728c8b5ee076ed13771c68e48b40..bfa0690b7f8aea8d793026b51f9fc4eed2e00af7 100644 GIT binary patch delta 1477 zcmV;$1v>hfqyep|0gyH>FfafB001BWj|Bh#9Z3KHARqt$001BW+yejrtWE#`5D)+W z001BWB?15dh*Gg+%t(JQ0000m2nGNE09OL}hX4QtR!KxbRCt{1SzAkER~Y?rHE~8p z#_@tmwSx+R2vLhV9SPnl>8L39;9LCxMewD6z~>@9^f&lW5TE*DDhe7!M5R7>3#b?* zT8&anqR}K}ZL`yJ)pJslIN*Xql703$XRYtHzkOn)uN@j!|}7lV)-U*)HEO-k4FN5z}(o_*sn7)GZ&gJnxCI{MIw>g_zS}M z`S~A2l&gimF%Ss+nQg*K@OV4}GP2Tv#>U1xo6T0C&B2+)`}gl_q+>DxcDwz>RwjeN zAS))aBsQ5$@Ron#4Gs?v*7yMjosef(%RY@yI#l*b8~ZZ5e=eoqtPfMrlpJ~F+Dv^dW zAR;{I!L`ig919Bz6buI0xOBcSB$k(#ne~O|;Hk>WN@{IweSQH_OL5@Aur|ls+?*^d zr11HCw7Y-1n+!3INF+iX9Ub)c?ORQpbPE94IEix!WO-g7$+xz)WW*>TlzRaA5eNii z$%|+7_V#M#lu`&u_=^NAE-up5)m5_kr~&gpSSaBB{+?AcRG+j6K$u90frLyfx9pVDG*cXvlUJwK4uYE6#-xL3)tAOe2@mzS5czP_#)J{&mb^?K>x;6Rio zy!N|XKkA|M{{`T|Acdq`Sy`bo!Qur=3&Be%>i_liwdh{3eqCK1)z{ajPXJu2#xM`% zPzZm7%*Dk8ZEkLg;vb^ky?aMJJw3X}>lOejOY1wxB79IfkB^Vpc`Qb-KB@^qg9GBQ zN}rsZi0*?q4u^wPptK6Gn9c0L(q<0{jMW!J5CZsYZf>Tcq9P`S1J}Y!XySyS0uS_l z`J$V=egPJXtipf@nlBLJ;f1m8?(PK1|Kfi?61k;ik4Kb85Li%9K%HG(84zH#CS#lf zRy{g8Vh6s%n&>*w%b+dbQ$hOd>~GrL+Y`k<_f~m%c}fCwb)$H&ng{rI5Nc>>p#1!N zR#}AeAc%h_=9>p~eSLi?kxxkg5?Pu9(tf5Z5e`c0fDo~0j7myM$mw*Z!ks}^2qAw& z9$RI3Ic)pS)lZEbDzA+fKqkg=z(ql2$7bS7EvyMXmN3|td~cN zfVt8g7Rv3wfb2Er^T6qJ<_Cj8Z?<3LDq(+r{}(A=Sq?;_QA3vh&`?Dz7L$MRk_qtp z{pf#V8Dpgb27^KNPmN4~*X#W!6bk*7F;+U@^Z7P3O`MvVa)d&m<7~&g5I&#pHzk9s z#`@&sWOaXk|4(+ioi#R3HD>7mdkYwk-}wE0x5MH19qVPrNu(Pu_TLz-comRseDwnU f4FCZD|9|{oxF@?!@&Et;07ARqt$001BW+yejr9Z3KH7#IKm001BW`vL#}`Ah%+5D)+W z001BWB?15d^iQ#5%t*7pPTT{37ytkO7zhRc007{3J@^0s0>Vi|K~#90w3f|I8c`I- z|I7fwSTx3jxR^%J*)%Dw(a{*TRE_APxHWX=BlrY;hb|jf)l?uZg~X-Cj|GH~pfVuL zo!gw#&IHS#(&$M}yxx1~|2tnZLBSi_n*)OXZX6sOy!&4x z-|IRe(I~F2uF$b81VbSt5(z##KR<`#IPCFw95XXBP!vTQ%B|68g51R)df&_j*gCavQ}43 zhEVA!BkBbKwzsq1#Eq2!S-0C|F%r&XzA%(v<#L&OF+Dxa^&e%vJs2w;iv$NhyMVZjwot>SL;?Dv|gfA%y zHa0f+e{!lfi4!oB$&3%6NpWYIgy!bvu(r0wnYc#l_4Re=y8a}-C`3YW)&Ibf3-n1=eo2^IkOu531Gb=c%cw4*;a9s&ZUmA%xQF p^=gJ;{G>{~MzGJ?oByi#9RL9T|A=+z)vy&4%##sGAG4cM5(2<`fT92Z diff --git a/v3/examples/build/main.go b/v3/examples/build/main.go index 5bb3f0df1..131b8a4f1 100755 --- a/v3/examples/build/main.go +++ b/v3/examples/build/main.go @@ -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 diff --git a/v3/internal/templates/_base/default/Taskfile.tmpl.yml b/v3/internal/templates/_base/default/Taskfile.tmpl.yml index 5e8c5f4aa..be23e6990 100644 --- a/v3/internal/templates/_base/default/Taskfile.tmpl.yml +++ b/v3/internal/templates/_base/default/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml b/v3/internal/templates/lit-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/lit-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/lit/Taskfile.tmpl.yml b/v3/internal/templates/lit/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/lit/Taskfile.tmpl.yml +++ b/v3/internal/templates/lit/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml b/v3/internal/templates/preact-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/preact-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/preact/Taskfile.tmpl.yml b/v3/internal/templates/preact/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/preact/Taskfile.tmpl.yml +++ b/v3/internal/templates/preact/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/react-swc/Taskfile.tmpl.yml b/v3/internal/templates/react-swc/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/react-swc/Taskfile.tmpl.yml +++ b/v3/internal/templates/react-swc/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/react-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/react-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/react-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/react/Taskfile.tmpl.yml b/v3/internal/templates/react/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/react/Taskfile.tmpl.yml +++ b/v3/internal/templates/react/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml b/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/svelte/Taskfile.tmpl.yml b/v3/internal/templates/svelte/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/svelte/Taskfile.tmpl.yml +++ b/v3/internal/templates/svelte/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml b/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/vanilla/Taskfile.tmpl.yml b/v3/internal/templates/vanilla/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/vanilla/Taskfile.tmpl.yml +++ b/v3/internal/templates/vanilla/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml b/v3/internal/templates/vue-ts/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml +++ b/v3/internal/templates/vue-ts/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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 diff --git a/v3/internal/templates/vue/Taskfile.tmpl.yml b/v3/internal/templates/vue/Taskfile.tmpl.yml index 5e8c5f4aa..e1383bdcd 100644 --- a/v3/internal/templates/vue/Taskfile.tmpl.yml +++ b/v3/internal/templates/vue/Taskfile.tmpl.yml @@ -82,4 +82,24 @@ tasks: ARCH: arm64 - generate-icons cmds: - - task: create-app-bundle \ No newline at end of file + - 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