Prism updates itself from the project's site, never from a code host. This page describes what the game does and what a player sees, so that a tool maker or a self-hosting server knows what to expect. The public contract of the list the game reads (releases.json) is on Release list; this page does not repeat it.
Channels
A Prism install belongs to one of two channels:
stable |
pbe |
|
|---|---|---|
| What it is | The release most players run. | Test builds, before they become stable. |
channel file (next to prism.exe) |
stable, or absent |
pbe |
| Data folder | %LOCALAPPDATA%\Prism\PrismNG\data |
%LOCALAPPDATA%\Prism\PrismNG-PBE\data |
| Window title | Prism |
Prism PBE, and a "PBE" badge in the drawer |
The two channels run side by side, each with its own library, replays, mods, skins and themes. The channel file is read once at startup; it holds one word, and an absent or unusable file means stable. The channel is never compiled into the executable, which is how the same executable can be promoted from PBE to stable.
Within a channel, versions are ordered by seq, an integer the site assigns at publication. The build label (pbe.21, say) is free text and is never compared. A game never downgrades: when the newest entry is older than what is installed, nothing happens. The player can pick another channel in Settings → System → Updates; its newest version is then always offered, with a warning that the data folder changes (PrismNG and PrismNG-PBE are different folders).
When the game looks
- One list read. The only automatic thing the game does is read the release list: one
GETofhttps://prism.am/releases.json, with no identifier, no version, no cookie, and the user agentPrism-updater. The setting Check for updates automatically is on by default for that reason. - When. The first check of each run happens a few seconds after the interface is ready, whatever the interval. After that, at most once a day. An attempt counts even when it fails, so a site that is down is not asked every hour. The player can also press Check for updates at any time.
- Never during play. Every step waits while a chart plays, previews, or replays. A download in progress stops when a play starts; the partial file is kept and resumed.
- A newer version found at launch opens a prompt: Update now downloads, installs and restarts in one click, Later closes it until the next launch.
- A site that is down or not reachable shows "Updates unavailable" and nothing else.
The address is https://prism.am/releases.json unless the player sets the Release list address (the environment variable PRISM_UPDATE_FEED wins). It must be https (plain http only for localhost or 127.0.0.1), and every address the game then follows (the package, a redirect) must have the same scheme, host and port as the list. At most 3 redirects are followed, by the game itself. The channel, list address and check settings are not exported with the other settings.
Download and install happen on click
- Download starts only when the player asks. It shows progress and resumes after an interruption (
Range). The size and the SHA-256 of the zip are checked against the list; a wrong file is deleted. - Verification of the signature comes next, before anything is unpacked (see below).
- Install happens only when the player clicks Restart to update. The game moves the files into place, keeping what it replaces, and restarts itself. Nothing is installed at launch and nothing installs by itself: a downloaded update waits for the click.
The folder of prism.exe must accept a file being created, written, renamed and deleted (that is what installing does) and prism.exe must not be read-only. If not, the game says "The install folder is not writable" before downloading a byte. Install Prism in a folder you can write to, not under Program Files.
An attempt that failed is remembered by its identity (channel, seq, SHA-256) with its reason, and not offered again for 24 hours. After a restart the game shows it as failed and retries nothing by itself. The Retry button clears the memory and tries again.
A build the game cannot identify (a development build, or one missing from the list) never downloads or installs. It shows "Unrecognised build", the newest release of its channel and the address of the download page to copy.
Signature verification
Every release is signed by the author with minisign. The signature covers the zip itself, and its trusted comment binds the identity of the release: channel=pbe seq=1 build=v0.1.0-pbe.1 sha256=<SHA-256 of the zip>. The signature file is published next to the zip, at <zip url>.minisig (4 KiB at most), under the same host and redirect rules.
The game checks it after the download and before unpacking anything:
- the signature must be valid under a key the game trusts (the Prism key, id
EA2E569435832E2C, is embedded in the executable) on the downloaded file; - the trusted comment must say this release: the channel, the
seq, the SHA-256 of the file and the build label of the list entry. A genuine signature of another version (an olderseq, another channel) is refused, so an old release cannot be replayed; - an absent, unreadable, truncated, other-key, modified-file or wrong-identity signature means refusal: the zip is deleted, nothing reaches the staging folder, and the interface says why.
With a key embedded there is no fallback to "unsigned". Only a build of a fork with no trusted key says "Unsigned". Once verified, Settings → System → Updates shows "Signed by Prism key <id>".
The package must contain prism.exe and a channel file equal to the announced channel. It is unpacked under the usual archive rules (no .., no absolute path, no link).
What changes on disk
Everything stays next to prism.exe, never in the data folder (apart from the time of the last check):
update-staging/ the downloaded zip, the unpacked package, a marker "complete"
update-backup/ every file the update replaced, as it was (the two newest backups are kept)
update-state.json the installed version, a launch counter, the last rollback
Rules for the shipped folders (mods\, skins\, themes\): a file of the package replaces the same path (shipped content follows the game), and the old one is backed up when it differs. Anything the package does not contain is never touched or deleted: your own mods, skins and themes stay. A shipped file that a version removes stays on disk.
Automatic rollback. A freshly installed version counts its launches. If it starts twice without ever reaching the interface, the third start puts the previous files back (the faulty ones go to update-backup/<seq>/failed/), the old version restarts, and Settings → System says so. An installation interrupted by a power cut or a killed process is undone at the next launch. A new executable that cannot even load cannot roll itself back: restore update-backup/<seq>/files/prism.exe by hand.
Verify and repair the installation
Settings → System → Updates → Verify installation compares the shipped files of your install with the signed file list of its release (FILES.sha256, inside the zip and so covered by the signature). It changes nothing: it reads, counts and shows the differences (missing, modified, unreadable). Your mods, skins, themes, the data folder and any file not in the list are never read, flagged or deleted.
- An install that predates this feature, or a damaged list, has nothing to compare: the game says so and offers no repair. An update writes a fresh list.
- Repair downloads the installed release from the site (same access check, hash and signature as an update), unpacks it aside and puts back only the files you want. A missing file is always restored. A modified file is restored only if you tick Also restore the files I changed (unticked every time). Replaced files go to
update-backup/repair-<ms>/, not deleted. - Repair is refused during a play and for an unrecognised build. If
prism.exewas replaced, the game asks you to restart.
What's new after an update
After an update (or a first launch), the game shows once the notes of the versions the player has not seen, read from the changelog installed next to prism.exe (CHANGELOG.md, or CHANGELOG.fr.md in French). No network is used.
- The changelog is newest first; the game shows the sections newer than the last version seen, in that order. A version missing from the changelog shows only the running version; a downgrade shows nothing.
- A first launch shows nothing and only remembers the version (
whats-new.jsonin the data folder). A version already seen is never shown again. - It never appears during a play, a preview, a replay, training or skin editing: the window waits until the state is free. The menu is never blocked.
- After an automatic rollback, nothing is shown.
- A zip copied over the install by hand, with no
update-state.json, counts as a first launch, so it is silent. - Show what's new after an update is on by default. The "What's new" link shows the notes of the installed version at any time, without remembering anything.
- English and French read their own changelog; the other interface languages show the English text.
The same notes are on the site's changelog page, read from the release list.