The app has an icon
Every build so far shipped the default Electron one. electron-builder said so on every run — "default Electron icon is used, reason=application icon is not set" — in a line that is very easy to read past. A store people install games with should not look like a framework demo in the Dock. The mark is a W with three lines running into it: the product's initial, and what it is doing. It uses the window's own palette, so the icon and the application it opens are the same object. Drawn for the smallest size first, which is what settled it — at 32px the W still reads and the lines survive as motion rather than as noise, where a ring, an outline or fine detail did not. A portal, a play triangle and a send arrow were each drawn and each discarded: they already mean a loading spinner, a media player and a submit button. `resources/icon.svg` is the source and the only file anybody should edit. `make icons` renders the rest. Three committed binaries with no way to regenerate them is how an icon becomes something nobody dares change, so the ICO is written here rather than shelling out to ImageMagick — the container is a header and 16 bytes per image, which is not worth a build dependency this machine does not have. `directories.buildResources` had to move off the default: electron-builder looks in `build/`, which this project uses for compiled output and wipes on `make clean`, so the icons would have been deleted before every package. The window picks it up when run from source too, where there is otherwise nothing to carry an icon and a dev run looks like a different application. Guarded on `app.isPackaged`, because `resources/` is not inside the package and pointing at it there would be a path that does not exist. Verified by reading the icon back out of the built bundle rather than trusting the config: extracted from `WarpEngine Client.app/Contents/Resources/icon.icns` and looked at, and the ICO parsed entry by entry — 7 images, 16 to 256, each a valid PNG. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ BUILDER_ARGS := $(if $(STORES_API),-- --config.extraMetadata.warpEngine.registry
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help setup node-check build typecheck lint lint-fix check start smoke uitest storetest test \
|
||||
.PHONY: help setup node-check build typecheck lint lint-fix check start smoke uitest storetest icons test \
|
||||
dist dist-mac dist-win dist-linux release publish clean distclean version
|
||||
|
||||
help: ## List available targets
|
||||
@@ -83,6 +83,9 @@ smoke: ## Drive the store bridge with no window at all
|
||||
uitest: ## Load the window once and report what rendered
|
||||
npm run uitest
|
||||
|
||||
icons: ## Render every icon format from resources/icon.svg
|
||||
npm run icons
|
||||
|
||||
storetest: ## Add and remove a store in a sandbox (the only code that deletes a tree)
|
||||
npm run storetest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user