Skip to content

Commit d551b3d

Browse files
feat: Add branded app icon for tray and Windows exe
Replace the placeholder tray bitmap with embedded PNG assets and a multi-size ICO. Embed resources with go-winres so conduit.exe shows the icon in Explorer and the taskbar. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent cda4415 commit d551b3d

10 files changed

Lines changed: 23 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ jobs:
1717
go-version: "1.22"
1818
cache: true
1919

20+
- name: Install go-winres
21+
run: go install github.com/tc-hib/go-winres@latest
22+
23+
- name: Embed Windows icon
24+
run: go generate ./...
25+
2026
- name: Test
2127
run: go test ./...
2228

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ Designed for a small footprint: one WebView window, mobile YouTube UI, system-tr
1313
## Build
1414

1515
```powershell
16+
go generate ./... # embeds assets/windows/icon.ico into the .exe (needs go-winres)
1617
go build -ldflags="-s -w" -tags production -o build\conduit.exe .
1718
```
1819

20+
`rsrc_windows_amd64.syso` is checked in so a plain `go build` also works on Windows amd64.
21+
1922
## Run
2023

2124
```powershell

‎assets/windows/icon.ico‎

67 KB
Binary file not shown.
581 Bytes
Loading

‎internal/app/assets/icon-tray.png‎

1.39 KB
Loading

‎internal/app/assets/icon.png‎

41 KB
Loading

‎internal/app/icon.go‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package app
22

3-
// 16x16 PNG (red #cc0000) for the system tray.
4-
var trayIcon = []byte{
5-
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
6-
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x91, 0x68,
7-
0x36, 0x00, 0x00, 0x00, 0x1c, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0xf8, 0xcf, 0xc0, 0xc0,
8-
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
9-
0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x85, 0x00, 0x01, 0x5a, 0x1c, 0x9c, 0x3a, 0x00, 0x00, 0x00,
10-
0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
11-
}
3+
import _ "embed"
4+
5+
// App icon (256×256) for the Wails application shell.
6+
//
7+
//go:embed assets/icon.png
8+
var appIcon []byte
9+
10+
// Tray icon (32×32) for the Windows notification area.
11+
//
12+
//go:embed assets/icon-tray.png
13+
var trayIcon []byte

‎internal/app/run.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func Run(ctx context.Context, proxyServer *proxy.Server, settings *config.Settin
2222
app := application.New(application.Options{
2323
Name: "Conduit",
2424
Description: "Local CONNECT proxy with TLS fragmentation and YouTube viewer",
25-
Icon: trayIcon,
25+
Icon: appIcon,
2626
Windows: application.WindowsOptions{
2727
AdditionalBrowserArgs: chromiumArgs(proxyURL),
2828
},

‎main.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:generate go-winres simply --icon assets/windows/icon.ico --manifest gui --product-name Conduit --file-description Conduit --copyright Copyright (c) foursecondfivefour --out rsrc
2+
13
package main
24

35
import (

‎rsrc_windows_amd64.syso‎

69.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)