Repository navigation
feat(build): a bundled Credits.html feeds the macOS About panel - #37
Conversation
…in#8) AppKit shows Resources/Credits.html in the standard About panel only when the options dictionary carries no Credits key — and the launcher always passed one ("Made with tinyjs"), shadowing the macOS convention for every app. When the project ships a Credits.html, the build now copies it to Resources/ and the launcher omits the hardcoded key, so the default macOS behavior takes over; without one, nothing changes (the tinyjs credit stays). Requested in tarwin#8 (Credits.html + Resources-root files were the one case the sidecar discussion surfaced that needed no new API — convention over configuration). Reported as a working hack by @Blatman via a rebuilt launcher; this lands it properly. Verified: launcher compiles; a project with Credits.html builds with the file in Contents/Resources/ and passes codesign --verify --strict; a project without builds exactly as before. The About panel's visual behavior follows documented AppKit semantics (no Credits key → Credits.html) — same result @Blatman confirmed with his rebuild.
tarwin#8 review: the tinyjs credit line was hardcoded, which blocks white-labeled apps that don't ship a Credits.html. The manifest "attribution" string (dev via TINYJS_ATTRIBUTION env, packaged via the TinyjsAttribution plist key, the same dual path as TinyjsUserAgent) replaces it. Precedence: bundled Credits.html → attribution → the tinyjs default; existing apps change nothing. README documents the chain in the About section.
|
Adopting @Blatman's suggestion from #8: the manifest now takes Precedence: bundled Verified: launcher recompiles, and a build with |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks @slabbdev. Merged: a bundled Credits.html shows in the About panel, checked on a built app. It'll go out in the next release. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…check, root backend entry (#37, #41) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Split from the #8 design discussion — the one piece that needs no new API.
The bug: AppKit's standard About panel shows
Resources/Credits.htmlonly when the options dictionary carries noCreditskey. The launcher always passed one ("Made with tinyjs — https://tinyjs.app"), shadowing the macOS convention for every app — @Blatman hit it in #8 and worked around it with a rebuilt launcher.The fix, two halves:
tinyjs buildcopies a project-rootCredits.htmltoContents/Resources/when present (same convention-over-configuration pattern asicon.png).Creditskey when the main bundle has aCredits.html, so AppKit's default behavior takes over. Without one, the tinyjs credit stays — zero change for existing apps.Verified: launcher compiles; a project with
Credits.htmlbuilds with the file inContents/Resources/and passescodesign --verify --strict; a project without builds byte-for-byte as before. The panel itself follows documented AppKit semantics and matches what @Blatman confirmed with his rebuild — a visual glance on your side closes it.macOS-only; Windows/Linux untouched.