From 842ef0d657876bcb53740a8936eabc00c7f6e2b7 Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Mon, 11 May 2026 15:40:04 +0200 Subject: [PATCH] update macos icon --- client/ui/build/darwin/Assets.car | Bin 1229032 -> 1229032 bytes client/ui/build/darwin/Taskfile.yml | 2 ++ client/ui/frontend/index.html | 2 +- .../ui/frontend/src/{app-new.tsx => app.tsx} | 0 client/ui/main.go | 12 +++++++++++- 5 files changed, 14 insertions(+), 2 deletions(-) rename client/ui/frontend/src/{app-new.tsx => app.tsx} (100%) diff --git a/client/ui/build/darwin/Assets.car b/client/ui/build/darwin/Assets.car index c8039fa6b4dbe8f653188f7fd5d5a2fd8dbe2350..fde595889859969793473baf787dc808d2623dfb 100644 GIT binary patch delta 689 zcmaKqJ!@4#5Qfh=CMJF+h9D6Qm?GuK?9P5R9`>_|Kj4;XV<&>aTUmq%u{7Mm6c(0t z3MtO@SBQ<3KOm()z`_x4Y>v3_FwDZf@9@r^9qgSQ?0x#UyM3i;n#;^3W|g_dTxHgn z>!)9LzpNeO@(c~m-s?BBhvrWE{q&`I)b$mklGY3G!Anr+3OJJ-BuOHpAZ20(5`-3z zk5VZn6os$#y=PCK9PivdbbfHYeYMnU6MQCF0V!)xt{_B8zgsqTvKFW9SSu!x=#SR+ zuyw!PYS~dIicB1wk7L=xQLXypo#6LWF_-3cc>z{jM)6NR-ioBub!^6%Z34 z2q`JoY;-~#3nliJ=Mzn0`=RSGm~2t;%OrUsgB+L@7K)=nxftbL8VTuum=-bJI+~Q0 z>6i=560^))WLAbrS^aj>lc>f=8^LA{QKjl2SmD8?s=f5aq&(h*tf*pL?1IJqYqEdx z_UDWB$2~__eN_b_M#}+H1;-nLN};OkG0E}|Cuyk0bEo-q{b)YDG0dkM&%@4U)94@k Y*Se-LT$(MecNaZ!y*WJiyzy@37xJQ{hyVZp delta 689 zcmaKqJ#Q2-5QcY`goMw8C_+KuBvPatG`7d~xMAgw-6s5iD}ja%ArX;^A_6ItL|2f4 zf|3rT6dQg8(C`~l($G;brzAqUld$x7zW1sHtobK;@`Mf>4QdQNmup-?$*DLU%AIk%NcF99Kk!^0a41p0Uan)e9UB{@fsAf zR)DgIG8WbAY<;@_{MpmPt8!P9vN-QTDi^NN zu<@W?uiMUaTzv6Rf+;{#n}{>`5Ie0&WlNH9CR7)!?)WU!Xn5P!yG?6N_Ng}np3wl6 zpg}IDK!@IE)KQbSbD~}mS$82Cr}|UVI+qNG&V!c;07(u=QxV&sP$hC5`dN`Sj2+^c z=+42otA$3mBrFJv!ewD;7uL56cP~1~#QtzFgQR@2e@ax)#rN6z%r3L^1 diff --git a/client/ui/build/darwin/Taskfile.yml b/client/ui/build/darwin/Taskfile.yml index e4a2d03a9..19ca31b1d 100644 --- a/client/ui/build/darwin/Taskfile.yml +++ b/client/ui/build/darwin/Taskfile.yml @@ -163,6 +163,8 @@ tasks: - 'echo "Skipping codesign (not available on {{OS}}). Sign the .app on macOS before distribution."' run: + deps: + - task: common:generate:icons cmds: - mkdir -p "{{.BIN_DIR}}/{{.APP_NAME}}.dev.app/Contents/MacOS" - mkdir -p "{{.BIN_DIR}}/{{.APP_NAME}}.dev.app/Contents/Resources" diff --git a/client/ui/frontend/index.html b/client/ui/frontend/index.html index 2efe3d5ca..93aa1039b 100644 --- a/client/ui/frontend/index.html +++ b/client/ui/frontend/index.html @@ -7,6 +7,6 @@
- + diff --git a/client/ui/frontend/src/app-new.tsx b/client/ui/frontend/src/app.tsx similarity index 100% rename from client/ui/frontend/src/app-new.tsx rename to client/ui/frontend/src/app.tsx diff --git a/client/ui/main.go b/client/ui/main.go index 074a380c7..21d53dd9c 100644 --- a/client/ui/main.go +++ b/client/ui/main.go @@ -7,6 +7,7 @@ import ( "embed" "flag" "log" + "runtime" "strings" "github.com/wailsapp/wails/v3/pkg/application" @@ -66,6 +67,15 @@ func main() { // declared before app.New so the closure has a stable reference. var tray *Tray + // On macOS, application.Options.Icon is fed into NSApplication's + // setApplicationIconImage at startup, which would override the bundle + // icon (Assets.car / icons.icns) the OS already picked. We want the + // bundle's squircle to stay, so suppress it on darwin. + appIcon := iconWindow + if runtime.GOOS == "darwin" { + appIcon = nil + } + app := application.New(application.Options{ // Windows uses Name as the AppUserModelID for toast notifications // (see notifications_windows.go: cfg.Name -> wn.appName -> AppID) @@ -77,7 +87,7 @@ func main() { // CustomActivator registry value is orphaned. Name: "NetBird", Description: "NetBird desktop client", - Icon: iconWindow, + Icon: appIcon, Assets: application.AssetOptions{ Handler: application.AssetFileServerFS(assets), },