fix: embed Windows executable icon
This commit is contained in:
@@ -21,7 +21,9 @@ The project uses pure Go and sets `CGO_ENABLED=0`. No C compiler, Windows SDK,
|
||||
```text
|
||||
cmd/fancywin/ CLI entry point
|
||||
assets/fancywin.png Full-resolution generated icon source
|
||||
assets/fancywin.ico Windows executable icon source
|
||||
internal/assets/ Embedded runtime image assets
|
||||
cmd/fancywin/rsrc_windows_*.syso Embedded Windows executable icon resources
|
||||
internal/config/ YAML model, loading, and validation
|
||||
internal/layout/ Platform-neutral zone geometry
|
||||
internal/platform/platform_windows.go Win32 backend
|
||||
@@ -65,6 +67,12 @@ work without a second binary. Normal execution calls `FreeConsole` and operates
|
||||
through the notification-area icon. `--debug` retains the console, while
|
||||
startup failures in detached mode are shown with `MessageBoxW`.
|
||||
|
||||
The architecture-specific `.syso` files beside the `main` package embed the
|
||||
same FancyWin artwork used by the notification-area icon as the executable's
|
||||
Windows icon resource. The Go toolchain selects and links the matching resource
|
||||
automatically, so Explorer and shortcuts display the FancyWin icon without any
|
||||
additional build tools.
|
||||
|
||||
## Cross-compiling
|
||||
|
||||
The standard x64 build can be produced from the repository root with:
|
||||
@@ -158,10 +166,12 @@ Test both x64 and ARM64 where hardware is available:
|
||||
is used for subsequent moves.
|
||||
12. Confirm the custom icon is crisp in the normal and overflow notification
|
||||
areas at 100%, 150%, and 200% scaling.
|
||||
13. Select each named layout from the tray, confirm the check mark and overlay
|
||||
13. Create a shortcut to `fancywin.exe` and confirm Explorer displays the same
|
||||
FancyWin artwork instead of the default application icon.
|
||||
14. Select each named layout from the tray, confirm the check mark and overlay
|
||||
change immediately, and verify `active_layout` changes without disturbing
|
||||
YAML comments or layout formatting.
|
||||
14. Right-click the tray icon, select `Exit`, and confirm the process and icon
|
||||
15. Right-click the tray icon, select `Exit`, and confirm the process and icon
|
||||
both disappear cleanly.
|
||||
|
||||
## Architecture
|
||||
|
||||
Reference in New Issue
Block a user