Imported from Stefano299/XLauncher (
AGENTS.md). Install upstream withnpx skills add Stefano299/XLauncher. Copyright stays with the author.
XLauncher
Commands
- Use npm with the committed
package-lock.json;npm ciis the clean install command. npm run devstarts Vite and the Electron process throughvite-plugin-electron. For testing changes, runnpm run dev; do not build the executable installer.npm run lintruns Oxlint using.oxlintrc.json.npm run buildruns the Vite build and thenelectron-builder; it regeneratesdist/anddist-electron/.npm run previewonly serves the Vite renderer and does not launch the Electron shell.- There is no automated test runner or
npm testscript. The roottest_*.mjs/test_*.cjsfiles are manual download/archive diagnostics; URL-based diagnostics usenode test_download_diag.mjs <URL>ornode test_multipart.mjs <URL>and can create ignored download artifacts.
Architecture
- The user-facing interface must be in English (all labels, messages, and text shown in the UI).
src/App.jsxis the React renderer. It must use the narrowwindow.electronAPIbridge rather than Node or Electron APIs directly.electron/main.jscreates theBrowserWindowand owns the small top-level IPC handlers;electron/preload.cjsdefines the exposed bridge;electron/gameManager.jsregisters the main download, game, persistence, and cloud-save handlers.- When adding an IPC operation, update both
electron/preload.cjsand itsipcMain.handleimplementation. Keep the renderer and main-process payload names aligned. - App data is persisted outside the repository under Electron's
app.getPath('userData')assettings.jsonandgames.json; the default download directory is<Downloads>/XLauncherGames. vite.config.jscopieselectron/preload.cjsintodist-electron/preload.cjsduring build/startup. Edit the source preload file, not the copied artifact.
Operational Notes
- Game downloads support single-stream or ranged multi-part HTTP downloads, then optional ZIP/7Z/RAR extraction. RAR extraction invokes the Windows
unrar-binariesexecutable, so archive behavior is platform-dependent. - Cloud authentication uses a localhost OAuth callback on port
8888; connecting Google Drive or Dropbox requires that port to be available and opens an external browser.