branding: generate + wire real bear app icons (.icns/.ico/png) on all lanes#80
Merged
Conversation
… lanes
The packaged apps on all three platforms shipped default LibreWolf/Firefox
raster icons: apply-bearbrowser-branding.sh only copied the SVG over
librewolf*.svg, but the OSes consume rasters — the .icns compiled into the
.app, the .ico rc-compiles into firefox.exe, and the sized .png set on Linux.
Worse, the macOS lane's Info.plist sets CFBundleIconFile=BearBrowser while
only an SVG was installed, so the DMG app icon was broken outright.
- branding/icons/: committed raster set generated from branding/bearbrowser.svg
(bear-{16..1024}.png, BearBrowser.icns, multi-size bear.ico)
- scripts/generate-brand-icons.sh: reproducible generation (macOS: qlmanage +
iconutil + sips + Pillow). Gotcha encoded: qlmanage bakes an opaque white
background — corners are re-masked to transparent (radius mirrors the SVG)
- apply-bearbrowser-branding.sh: stages branding/icons -> workspace/branding-icons
- bearbrowser-patches.py: after creating browser/branding/bearbrowser from
librewolf, overwrites its rasters with the bear set — square .png slots
matched by real IHDR pixel size (exact match only, stdlib-only so CI needs
no Pillow); non-square art (wordmarks) untouched. Verified on a simulated
branding dir: 8/8 replaced, wordmark preserved
- bearbrowser-package-source-build.sh: installs BearBrowser.icns to
Contents/Resources so CFBundleIconFile resolves (SVG kept alongside)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found during the start-page audit (#79): every packaged app still wears LibreWolf/Firefox icons.
apply-bearbrowser-branding.shonly swapped SVGs, but the OSes consume rasters —.icnsin the .app,.icorc-compiled intofirefox.exe, sized.pngs on Linux. The macOS case was broken outright:Info.plistsetsCFBundleIconFile=BearBrowserbut only an SVG was installed, so the DMG app had a generic icon.What
branding/icons/— committed raster set generated frombranding/bearbrowser.svg:bear-{16..1024}.png(transparent rounded corners),BearBrowser.icns(full iconset), multi-sizebear.icoscripts/generate-brand-icons.sh— reproducible generation on a dev Mac (qlmanage + iconutil + Pillow). Encodes the gotcha that qlmanage bakes an opaque white background: corners re-masked to transparent with the SVG's own radiusapply-bearbrowser-branding.shstages the set into the workspace;bearbrowser-patches.pyoverwrites the librewolf-derivedbrowser/branding/bearbrowserrasters atmake dirtime — square.pngslots matched by real IHDR pixel size (exact-size only; stdlib-only so CI needs no Pillow), non-square wordmarks untouchedbearbrowser-package-source-build.shinstallsBearBrowser.icnswhereCFBundleIconFileactually pointsVerified
Replacement logic smoke-tested against a simulated librewolf branding dir: 8/8 rasters (5 sized defaults + mozicon128 + icns + ico) replaced with bear content, non-square wordmark preserved, transparency confirmed at every size.
After merge
Dispatch the three nightly lanes and confirm: .app shows the bear in Dock/Finder,
firefox.exeshows it in Explorer/taskbar, Linux tarballdefault*.pngare the bear.