Updates local apps from GitHub Releases. Configured through settings.json.
updater.ps1 is app-agnostic. For another app, copy the folder with its own settings.json. The shortcut scripts (shortcut.ps1, startmenu.ps1) are hardcoded for mpv.
- PowerShell 5.1+ (built-in on Windows 10+)
curl.exeandtar.exe(built-in on Windows 10 1803+)
- Click Code > Download ZIP
- Extract to
%LOCALAPPDATA%\{APPNAME}\update
Creates update.lnk in BaseDirectory, launching updater.ps1 via powershell.exe -ExecutionPolicy Bypass.
Windows blocks .ps1 on double-click; the shortcut works around it.
Usage:
powershell.exe -ExecutionPolicy Bypass -File .\shortcut.ps1Run once, then double-click update.lnk.
With no local executable, date comparison is skipped and the latest release installs.
- Validate: check paths, stop running apps
- Fetch metadata: latest release info from GitHub
- Select targets: release dates against local timestamps
- Download: fetch selected assets with
curl.exe - Verify: SHA256 against
digest;[NONE]when absent, skip on mismatch - Extract: unpack archives in the temp directory
- Install: remove the previous install if full, then move files in
- Cleanup: remove the download directory, optionally clear cache
List several targets to follow one app across build sources:
"mpv": {
"Executable": "mpv.exe",
"UpdateTargets": [
{ "Preferred": false, "Force": false, "Repository": "sohnyj/minimal-mpv-winbuild", "AssetFilter": "mpv-x86_64-v3" },
{ "Preferred": false, "Force": false, "Repository": "shinchiro/mpv-winbuild-cmake", "AssetFilter": "mpv-x86_64-v3" },
{ "Preferred": false, "Force": false, "Repository": "zhongfly/mpv-winbuild", "AssetFilter": "mpv-x86_64-v3" }
],
"InstallFilters": []
}One asset is installed per app: the newest release among the matched targets wins. Preferred narrows the candidates to those targets, and falls back to the rest when none of them match.
Caution
A full update deletes everything in BaseDirectory except UpdateDirectory and ExcludedNames matches. AppCache.Clear also wipes AppCache.Directories. Incorrect paths may cause data loss.
| Key | Description |
|---|---|
BaseDirectory |
App install path |
UpdateDirectory |
Script path; downloads land in download\ under it. Skipped by the full-update deletion |
| Key | Description |
|---|---|
ForceUpdate |
Update regardless of date |
LocalTimestampOffsetMinutes |
Minutes added to local LastWriteTime, offsetting the build-to-publish gap |
AssetTypes.Executable |
Installed as a single file; LastWriteTime set to the release date |
AssetTypes.Archive |
Extracted before install; original LastWriteTime kept. Compressed tarballs unpack in one pass |
ExcludedNames |
Names kept during full-update deletion (exact match) |
| Key | Description |
|---|---|
Endpoint |
GitHub release API endpoint |
Token |
For the metadata request. Empty = 60 req/hour, set = 5000. Not used for downloads |
Note
Token is plain text. Never commit one. Public repositories need none; otherwise use a read-only, minimal-scope token.
| Key | Description |
|---|---|
Executable |
Name used to read LastWriteTime |
UpdateTargets |
Repository and asset filter pairs |
InstallFilters |
Items to install from an archive. Empty = all |
| Key | Description |
|---|---|
Preferred |
Prefer over the app's other targets |
Force |
Update regardless of date |
Repository |
GitHub repository as owner/repo |
AssetFilter |
Substring matched against asset names |
| Key | Description |
|---|---|
AppCache.Clear |
Clear them on full update |
AppCache.ClearOnPartialUpdate |
Clear on partial updates too |
AppCache.Directories |
Cache directories emptied after update |
StartMenu.Create |
Run the Start Menu script after a successful update |
StartMenu.Script |
Script file name, resolved beside the updater |
ErrorActionPreference |
PowerShell error handling (Continue / Stop) |
ProgressPreference |
PowerShell progress bar visibility for the metadata request (SilentlyContinue to hide) |