Repository navigation
Fix Windows install double-click launch and NSIS Chinese mojibake - #16
Merged
Merged
Conversation
The shipped v0.0.1 NSIS package could look like a no-op after install: shortcuts inherited the wrong Start-in path, WebView2 tried to write next to FreeOS.exe under Program Files, and the elevated finish-page Exec stamped ~/.freeos / desktop.pid at High integrity so a later unelevated double-click died silently. Pin WorkingDirectory to $INSTDIR, store WebView2 under %LOCALAPPDATA%\FreeOS\WebView2, launch via IShellDispatch2 (explorer fallback), ignore leftover pids that are not FreeOS.exe, and repair a non-writable product home. Finish-page "运行 FreeOS" was UTF-8 decoded as CP1252 (è¿è¡Œ) because Unicode true does not change makensis source charset. Save project.nsi as UTF-8 with BOM and compile with -INPUTCHARSET UTF8.
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.
Summary
Hotfix for the shipped Windows NSIS installer on
v0.0.1.Bug 1 — double-click does nothing after install
WorkingDirectory/SetOutPathto$INSTDIRso Start-in cannot leak to the WebView2 plugin dir.%LOCALAPPDATA%\FreeOS\WebView2(writable). The Microsoft default next toFreeOS.exeunder Program Files fails withE_ACCESSDENIEDfor a normal user and the windowsgui process exits with no UI.IShellDispatch2(explorer fallback) so the first run is not elevated. An adminExecwas stamping~/.freeos/desktop.pidat High integrity; the later unelevated shortcut then could not write logs or extract the portable.desktop.pidwhose process is notFreeOS.exe(PID reuse / old Octop). Named mutex is the primary Windows lock.~/.freeosis not writable,icaclsresets Medium integrity so a previous elevated first-run can recover.Bug 2 — finish checkbox
è¿è¡Œ FreeOSUnicode truedoes not change how makensis reads the.nsi. GitHubwindows-latestis en-US (ACP = CP1252), so UTF-8运行without a BOM became the screenshot mojibake.project.nsiis UTF-8 with BOM;makensis -INPUTCHARSET UTF8. MUI SimpChinese stock strings were already fine; customLangStrings were not.Host launch still sets
OCTOP_DESKTOP=1/FREEOS_DESKTOP=1. Does not change GitHub-only updates, blue theme,FREEOS_STAMP, or Organization OS.Target branch
main(release/*orhotfix/*only)Type of change
Test plan
uv run pytest tests/unit/desktop/test_nsis_uninstall.py tests/unit/desktop/test_auth_brand_surfaces.py -q— 11 passed (shortcut WD, UTF-8 BOM +-INPUTCHARSET UTF8, packagedFreeOS.exe+ embedded portable, unelevated finish launch,OCTOP_DESKTOPalready covered in GohostLaunchEnv)CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go test -cindesktop/srccompilesruff+mypy --strict src/octopgreen in pre-commitv0.0.1Windows.exeassets; user uninstalls old build then reinstallsChecklist
CHANGELOG.md(if user-facing)Reinstall for testers
uninstall.exein the install folder).%USERPROFILE%\.freeos\desktop.pid(keep the rest of.freeosunless the portable is corrupt).FreeOS-desktop-windows-amd64-0.0.1.exe/arm64from the refreshedv0.0.1release.%USERPROFILE%\.freeos\portableand should show the window. Logs:%USERPROFILE%\.freeos\logs\desktop.log.