Repository navigation
feat(win): add a portable build - #140
Open
AmerDwight wants to merge 1 commit into
Open
AmerDwight wants to merge 1 commit into
AmerDwight wants to merge 1 commit into
Conversation
A second Windows target, electron-builder's `portable`, makes lolPing-<version>-portable.exe: no installer, nothing in the registry. An unpacked copy becomes portable with a portable.txt next to its executable, so a zipped win-unpacked folder works too. A portable build keeps its settings, emotes, caches and Electron's userData (MCP pipe and token, session data) in a data folder next to the executable. userData is moved before the single-instance lock, so an installed and a portable copy run side by side and two copies of one portable folder don't. It has no self-update (electron-updater would install the downloaded setup over it) and no launch-at-startup entry (the path moves with the folder and nothing uninstalls the entry). The settings page hides that switch and the About section says so, in both languages. The release workflow uploads the portable .exe next to the installer. It is not in latest.yml, so installed copies are unaffected. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0135UvqhMz4dTkZUm42VbK44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
A portable Windows build,
lolPing-<version>-portable.exe, next to the installer: run it from any folder or a USB drive, with settings, emotes and caches in adatafolder beside the.exeand nothing in%APPDATA%or the registry. An unpacked copy (win-unpacked) is portable too when aportable.txtsits next tololPing.exe.How it works (
src/main/portable.ts,paths.ts,index.ts):portabletarget setsPORTABLE_EXECUTABLE_DIR; that, or the marker file, decides the data folder once at startup. A development build is never portable.userDataandsessionDataare moved there before the single-instance lock, so the MCP pipe and token follow, an installed and a portable copy run side by side, and two copies of one portable folder don't.AppStatus.portable, and About lists it under known limitations.One thing for you to decide:
.github/workflows/release.ymlgains one line to upload the portable.exe. AGENTS.md says that file is yours, so drop it if you'd rather not ship the portable build from releases; the target still builds locally withnpm run dist. The portable.exeis not inlatest.yml, so installed copies are unaffected.No new network host.
How I tested it
npm run typecheckandnpm test(tests/main/portable.test.tscovers the launcher variable, the marker file, the installed case and the development exclusion).windows-latestrunner:npm run test:helperandnpm run distproduce bothlolPing-Setup-0.6.0.exeandlolPing-0.6.0-portable.exe.Ran by hand on:
IS_PORTABLEis false there unless aportable.txtis placed next to the binaryChecklist
npm run typecheck,npm run test:helperandnpm testpasssrc/shared/i18n.ts, both READMEs)docs/design.mdis updated if the behaviour it describes changedAGENTS.mdin context and I read the whole diff. Tool: Claude Code🤖 Generated with Claude Code
https://claude.ai/code/session_0135UvqhMz4dTkZUm42VbK44