Pandipipas 6952a9954f refactor: remove outdated phase summary documents and restructure error handling
- Deleted obsolete phase summary documents (PHASE_1_FIX_SUMMARY.md, PHASE_1_SUMMARY.md, PHASE_2_SUMMARY.md, PHASE_3_SUMMARY.md, PHASE_4_SUMMARY.md, SESSION_HANDOFF.md, TARGET_ARCHITECTURE.md) to streamline documentation.
- Introduced error handling module (error-handler.ts) to centralize error logging and presentation.
- Updated bootstrap and application controller to utilize the new error handling module.
- Refactored runtime provisioning logic into a dedicated module (runtime-setup.ts) for better organization.
- Implemented platform-specific process termination logic in process-killer.ts to enhance process management.
- Enhanced navigation policy with a new module (navigation.ts) to improve URL handling and security.
- Updated window service to integrate new navigation logic for internal and external URL handling.
2026-06-04 04:51:03 +02:00
2026-05-31 18:45:57 +02:00
2026-05-31 18:35:59 +02:00
END
2026-02-25 20:27:12 +01:00

scoreko-electron

Windows desktop installer for Scoreko. The packaged app includes Electron, NodeCG, the compiled scoreko-dev bundle, and the production modules needed to run it, so end users do not need Node.js, pnpm, or a cloned repository.

Build on a development machine

From the repository root:

pnpm install

Then from scoreko-electron-dev:

npm install
npm run dist:win

The installer is written to scoreko-electron-dev/release/Scoreko-setup-0.1.0.exe.

What the build does

  • Builds the parent scoreko-dev bundle with pnpm build.
  • Creates scoreko-electron-dev/lib/nodecg with a small NodeCG runtime.
  • Installs production runtime modules into that runtime.
  • Rebuilds better-sqlite3 for Electron before creating the installer.
  • Packages the runtime as an Electron extra resource outside the app archive.

Runtime behavior

On first launch, Scoreko copies the packaged NodeCG runtime to the user's app data folder and then relaunches itself before starting NodeCG. This keeps cfg, db, and logs writable on Windows even when the app is installed under Program Files, and avoids transient startup failures caused by freshly copied runtime files.

Useful scripts

  • npm run start: build everything and run Electron locally.
  • npm run prepare:runtime: recreate lib/nodecg from the parent bundle.
  • npm run rebuild:native: rebuild NodeCG native modules for Electron.
  • npm run dist:win: create the Windows installer.
  • npm run doctor: check the prepared runtime and the configured port.

Updates from Gitea

Scoreko can check a Gitea release feed without forcing the user to update. Edit static/updates.json before building:

{
  "enabled": true,
  "apiUrl": "http://gitea.local/api/v1/repos/OWNER/REPO/releases/latest",
  "releasePageUrl": "http://gitea.local/OWNER/REPO/releases",
  "assetPattern": "Scoreko-setup-.*\\.exe$"
}

For each release, bump package.json version, build with npm run dist:win, create a Gitea release tagged like v0.2.0, and attach release/Scoreko-setup-0.2.0.exe. When Scoreko sees a newer tag, it asks whether to download and install it.

Configuration

The defaults match the parent bundle:

  • NODECG_BUNDLE_NAME=scoreko-dev
  • NODECG_PORT=9090
  • SCOREKO_DASHBOARD_ROUTE=dashboard/scoreko-dev/main.html?standalone=true
  • SCOREKO_LOADING_ROUTE=dashboard/loading/main.html?standalone=true
  • SCOREKO_UPDATES_ENABLED=true
  • SCOREKO_UPDATE_ASSET_PATTERN=Scoreko-setup-.*\.exe$

Copy .env.example only if you need local overrides while developing.

S
Description
No description provided
Readme 1.1 MiB
Languages
TypeScript 82.4%
JavaScript 11%
HTML 4.7%
NSIS 1.9%