Skip to content

fix(desktop): 结束页自选启动或关闭;锁定 portable 原地刷新 - #91

Merged
XYAIStudio merged 3 commits into
mainfrom
cursor/installer-autolaunch-portable-inplace-cb5b
Sep 21, 2026
Merged

XYAIStudio merged 3 commits into
mainfrom
cursor/installer-autolaunch-portable-inplace-cb5b

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

纠正安装收尾 UX:不是自动启动 FreeOS,也不是自动关掉安装窗口。

文件复制结束后不再多点一次「下一步」,直接落到 结束页。用户自己选:勾选「运行 FreeOS」启动,或取消勾选后关闭安装程序。

升级时 ~/.freeos/portable 若无法改名为 portable.previous(目录被占用),仍先停残留进程再原地覆盖新运行时。该部分未改。

Target branch

  • Base is main (requested)

Type of change

  • Bug fix

What changed

Installer tech: NSIS (desktop/src/build/windows/nsis/).

  1. Finish page (user choice)

    • Restored MUI_PAGE_FINISH + 运行 FreeOS / Run FreeOS checkbox (checked by default).
    • Launch only via MUI_FINISHPAGE_RUN_FUNCTION LaunchFreeOS (unelevated explorer token).
    • Removed AutoCloseWindow / SetAutoClose / .onInstSuccess auto-launch.
    • Did not set MUI_FINISHPAGE_NOAUTOCLOSE, so INSTFILES advances to Finish without an extra Next after copy.
    • Page set stays the existing minimum: Welcome → directory → file copy → finish. No extra custom pages.
    • Silent /S still skips UI and does not launch.
  2. Locked portable rename fallback (unchanged)

    • If portableportable.previous fails, stop leftover holders, retry, then overlay files in place.

Files

  • desktop/src/build/windows/nsis/project.nsi — finish page restored; no auto-close / auto-launch
  • desktop/src/download.go, process_windows.go, process_unix.go — in-place overlay fallback
  • desktop/src/download_test.go — busy-rename fallback test
  • tests/unit/desktop/test_nsis_uninstall.py — finish-page contract + ruff format
  • desktop/README.md, CHANGELOG.md (CN + EN)

Test plan

  • python3 -m pytest --noconftest tests/unit/desktop/test_nsis_uninstall.py tests/unit/desktop/test_nsis_detail_encoding.py -q (24 passed)
  • ruff format --check tests/unit/desktop/test_nsis_uninstall.py
  • rg on project.nsi: MUI_PAGE_FINISH present; AutoCloseWindow / SetAutoClose / .onInstSuccess absent
  • Full Windows .exe via CI FreeOS Desktop Packagewindows-amd64

How to verify on Windows

  1. Build via .github/workflows/octop-desktop.yml matrix windows-amd64.
  2. Run Setup: Welcome → folder → copy. After copy, finish page appears (no extra Next). Choose Run FreeOS or uncheck and close.
  3. Confirm Setup does not start FreeOS or close by itself.
  4. Upgrade over an existing install with a locked %USERPROFILE%\.freeos\portable: next launch should overlay in place if rename fails.
  5. FreeOS-desktop-windows-amd64-<version>.exe /S completes without launching the UI.

Residual risks

  • Welcome and directory still require one click each (Install on directory). That is the existing minimal wizard.
  • In-place overlay cannot delete a leftover file that is itself locked; those files stay and are logged.
  • Finish-page launch still depends on explorer / IShellDispatch2.
  • Full Windows installer .exe is not produced in this Linux environment.
Open in Web Open in Cursor 

cursoragent and others added 3 commits September 20, 2026 23:55
Windows NSIS 不再显示结束页:文件复制完成后自动启动 FreeOS 并关闭安装窗口(/S 静默安装不拉起)。升级时若 portable 目录无法改名为 portable.previous,先结束残留进程再原地覆盖新运行时。

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
CI lint failed because ruff would reformat a quote in test_nsis_uninstall.py. No product behavior change.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
文件复制后直接进入结束页(不再多点下一步)。用户勾选「运行 FreeOS」或取消后关闭安装程序。去掉 AutoCloseWindow / SetAutoClose / .onInstSuccess 自动启动。锁定 portable 原地刷新保持不变。

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
@cursor cursor Bot changed the title fix(desktop): 安装完成自动启动并关闭安装界面;锁定 portable 原地刷新 fix(desktop): 结束页自选启动或关闭;锁定 portable 原地刷新 Sep 20, 2026
@XYAIStudio
XYAIStudio marked this pull request as ready for review September 21, 2026 00:19
@XYAIStudio
XYAIStudio merged commit f0c72f7 into main Sep 21, 2026
11 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/installer-autolaunch-portable-inplace-cb5b branch September 21, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants