Repository navigation
feat(portable): add portable data directory and Windows portable package - #90
Merged
Merged
Conversation
added 2 commits
November 30, 2026 19:52
Resolve userData at startup in order of --user-data-dir, PORTABLE_EXECUTABLE_DIR, a sibling BotArkData folder or .botark-portable marker, legacy bothub migration, then the default userData path. Verify portable writability with a probe file and fall back to the default userData with a warning when read-only. Add the Windows portable target (BotArk-Portable-<version>-<arch>.exe) alongside NSIS, and document portable mode. Closes #87
Owner
Author
|
Windows 与 macOS CI 打包均已通过,确认生成 |
Merged
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.
Why
Goal: give BotArk users a no-install portable build that keeps accounts, sessions, and settings beside the executable (closes #87).
What changed
src/main/portableDataDir.tsto resolveuserDataonce at startup, in order:--user-data-dir=<path>,PORTABLE_EXECUTABLE_DIR(set by the Windows portable launcher), a siblingBotArkDatafolder or.botark-portablemarker (next to the executable, or next toBotArk.appon macOS), legacybothubmigration, then the default path.userDatainstead of crashing.portabletarget (BotArk-Portable-<version>-x64.exe) alongside NSIS.README.md,docs/readme/README_zh.md, andCHANGELOG.md.Scope
Startup path resolution, electron-builder Windows targets, and docs. Existing NSIS auto-update artifacts and default installs are unchanged.
Blast Radius
src/main/index.tsdelegates its legacybothubcheck toresolveUserDataDir. Without a CLI flag,PORTABLE_EXECUTABLE_DIR,BotArkData, or.botark-portablemarker, resolution follows the exact previous logic.Verification
npm run typecheckpassed.npx vitest run src/main/portableDataDir.test.ts: 19 tests passed (CLI flags, Windows env var, macOS.appsibling detection, marker file, read-only fallback, precedence over legacybothub).npx electron-vite buildpassed. Windows.exepackaging runs in this PR'swindows-latestCI job.workflowscope, so a one-linerelease.ymlasset-check addition ('Portable.*\.exe$') is kept as a local patch rather than in this branch. The existing'\.exe$'check already matches both Windows artifacts.Closes #87