Merge pull request #1009 from marcoarnulfo/fix/portable-mode

This commit is contained in:
Brandon Thomas committed 2026-10-13 04:28:22 -04:00
commit 3484f91c3f
8 files changed
+251 -15

No files matched your search

+2 -1
View File
@@ -13,7 +13,8 @@ The model is `effectcraft_engine::prefs::Prefs`: serde, versioned (`version`), a
keys (`general.undoLevels`, `autoSave.intervalMinutes`, `labels.3.name`). It is stored as
`prefs.json` through the session's `ConfigStore` (the desktop app uses the platform config
directory: `~/Library/Application Support/EffectCraft` on macOS, `%APPDATA%\EffectCraft` on
Windows, `$XDG_CONFIG_HOME/effectcraft` on Linux; the web app keeps it in browser storage: the
Windows, `$XDG_CONFIG_HOME/effectcraft` on Linux, or `EffectCraftData` beside the executable when a
`portable.txt` sits there, as in the Windows portable zip; the web app keeps it in browser storage: the
Origin Private File System, or IndexedDB where OPFS can't write, see [web.md](web.md)). Loading migrates older layouts, keeps unknown keys (from newer versions) and
falls back to defaults for values that don't parse.
+7
View File
@@ -74,6 +74,13 @@ that with stub binaries ([`test-msi.ps1`](../packaging/windows/test-msi.ps1)): a
an upgrade that keeps it, a repair, uninstall, and the Program Files default. The wizard pages
themselves are checked by hand.
The portable zip ships [`portable.txt`](../packaging/windows/portable.txt) beside `effectcraft.exe`.
That marker (or an `EffectCraft.portable` file) switches on portable mode: the settings folder
(preferences, shortcuts, recovery files, logs, plug-ins) becomes `EffectCraftData\` next to the
exe instead of `%APPDATA%\EffectCraft`. If that folder isn't writable the app logs a warning and
uses `%APPDATA%`. The MSI has no marker. The logic is in `crates/host/src/app_dirs.rs` and works
the same on macOS and Linux; `EFFECTCRAFT_CONFIG_DIR` still wins over it.
Every binary reports its version: `effectcraft --version`, `effectcraft-cli --version` and
*Help › About EffectCraft*.