Skip to content

Make browser publishes installable - #726

Open
botoddly wants to merge 4 commits into
mainfrom
browser-pwa
Open

botoddly wants to merge 4 commits into
mainfrom
browser-pwa

Conversation

@botoddly

@botoddly botoddly commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

A browser publish can now be installed as an app. It is opt-in, and without the property nothing changes. Games stay online only: an installed game still needs the network to start.

Installable app: PixelyBrowserInstallable

  • The SDK generates manifest.webmanifest from PixelyBrowserAppName (default $(Product)), PixelyBrowserThemeColor (default #000) and PixelyBrowserAppIcon items with Sizes and an optional Purpose.
  • An icon under wwwroot/ is only named, by its path there. Any other icon is served at its TargetPath, by default its file name.
  • Chrome installs an app only with a 192x192 and a 512x512 icon, so without both the build fails with PIXELY0016.
  • The package's index.html gets the manifest link and the theme color. A project's own page adds them itself, and a project's own wwwroot/manifest.webmanifest replaces the generated one.

Other changes

  • WriteLinesToFile turns every backslash into a slash on Unix, even escaped, and a quote in a path ends a property function's argument, so an inline Roslyn task resolves the icons and writes the manifest and the page.
  • Docs: "Installable app" in docs/hosting.md, plus docs/sdk.md, AGENTS.md, and a DECISIONS.md entry.

Testing

  • New package tests:
    • an installable publish: the manifest with a name that needs escaping, icons at their target paths, the tags in the package's page;
    • a project's own manifest, with its icons still served and a quote in an icon's path;
    • an icon under wwwroot/ named by its path there, and a page named by PixelyBrowserIndexHtml left without tags;
    • PIXELY0016.
  • These four tests pass locally. The full package integration suite was not rerun after offline play was removed; the restored browser files match main.

Not verified:

  • Chrome's install prompt.
  • Firefox and Safari.

@botoddly botoddly changed the title Make browser publishes installable and playable offline Make browser publishes installable Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant