You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dream Skin: main at 5fd8af532efbaa87d2d0092297fd2d45cd56574e
Category: installed shortcuts fail after the checkout moves
Problem
The Windows installer creates launch, restore, and tray shortcuts that point directly to the source checkout used during installation. Moving, renaming, or deleting that checkout leaves the shortcuts pointing to missing *.ps1 files. Theme state already lives in %LOCALAPPDATA%\CodexDreamSkin, but the runtime scripts remain in the source tree.
The source establishes the path dependency directly:
windows/scripts/install-dream-skin.ps1 derives the absolute paths for start-dream-skin.ps1, restore-dream-skin.ps1, and tray-dream-skin.ps1 from $PSScriptRoot.
The shortcut arguments and working directories retain that source path.
Close Codex and run windows/scripts/install-dream-skin.ps1.
Inspect the arguments of the Codex Dream Skin, Codex Dream Skin - Restore, or Codex Dream Skin - Tray shortcut.
Move directory A to directory B, or delete directory A.
Run any shortcut again.
Expected behavior
Installed shortcuts depend only on a managed installation directory. The location and lifecycle of the original checkout do not affect launch, restore, or tray entry points.
Actual behavior
The shortcuts continue to execute scripts under directory A. Once directory A is gone, the launch, restore, and tray entry points fail.
Proposed fix
Copy the required assets/ and scripts/ into this managed location during installation:
%LOCALAPPDATA%\CodexDreamSkin\engine
The installer should:
Copy the runtime into a staging directory under the same state root.
Reject junctions, symbolic links, and other reparse points in the source and existing engine.
Verify staged file counts and SHA-256 hashes.
Replace the existing engine with same-volume directory moves and restore the previous engine if replacement fails. Preserve the backup at a reported path if restoration fails.
Point all shortcut arguments and working directories at the managed engine.
Check for an older tray process before reinstalling to avoid mixing source and managed scripts.
Acceptance criteria
All three shortcuts reference only files under %LOCALAPPDATA%\CodexDreamSkin\engine.
All three managed entry points remain present and parse after the original checkout is moved or removed.
Reinstall completely replaces the old engine and removes files deleted from the source.
An incomplete or invalid source leaves the current engine unchanged and leaves no normal transaction artifacts.
Installation works when the source path contains spaces and Chinese characters.
The change does not modify the official Codex package, config.toml behavior, CDP binding, or theme format.
中文
平台与版本
main的5fd8af532efbaa87d2d0092297fd2d45cd56574e问题
Windows 安装器创建的启动、恢复和托盘快捷方式直接指向执行安装时的源码目录。用户移动、重命名或删除仓库克隆后,快捷方式会引用不存在的
*.ps1文件。主题状态已经保存在%LOCALAPPDATA%\CodexDreamSkin,运行脚本却仍留在源码目录。源码中的路径关系可以直接确认:
windows/scripts/install-dream-skin.ps1从$PSScriptRoot生成start-dream-skin.ps1、restore-dream-skin.ps1和tray-dream-skin.ps1的绝对路径。Arguments和WorkingDirectory都保留这个源码路径。$PSScriptRoot创建快捷方式;它处理主题配置和启动安全,没有安装独立运行时。复现路径
windows/scripts/install-dream-skin.ps1。Codex Dream Skin、Codex Dream Skin - Restore或Codex Dream Skin - Tray快捷方式的参数。预期结果
安装完成后的快捷方式只依赖受管安装目录,原始仓库克隆的位置和生命周期不会影响启动、恢复或托盘入口。
实际结果
快捷方式继续执行目录 A 下的脚本。目录 A 不存在后,启动、恢复和托盘入口都会失效。
建议修复
安装时把运行所需的
assets/和scripts/复制到:安装流程应当:
WorkingDirectory全部指向受管 engine。验收标准
%LOCALAPPDATA%\CodexDreamSkin\engine下的文件。config.toml处理方式、CDP 绑定或主题格式。自检与关联
English
Platform and version
mainat5fd8af532efbaa87d2d0092297fd2d45cd56574eProblem
The Windows installer creates launch, restore, and tray shortcuts that point directly to the source checkout used during installation. Moving, renaming, or deleting that checkout leaves the shortcuts pointing to missing
*.ps1files. Theme state already lives in%LOCALAPPDATA%\CodexDreamSkin, but the runtime scripts remain in the source tree.The source establishes the path dependency directly:
windows/scripts/install-dream-skin.ps1derives the absolute paths forstart-dream-skin.ps1,restore-dream-skin.ps1, andtray-dream-skin.ps1from$PSScriptRoot.$PSScriptRoot. It covers theme configuration and launch safety rather than a standalone installed runtime.Reproduction path
windows/scripts/install-dream-skin.ps1.Codex Dream Skin,Codex Dream Skin - Restore, orCodex Dream Skin - Trayshortcut.Expected behavior
Installed shortcuts depend only on a managed installation directory. The location and lifecycle of the original checkout do not affect launch, restore, or tray entry points.
Actual behavior
The shortcuts continue to execute scripts under directory A. Once directory A is gone, the launch, restore, and tray entry points fail.
Proposed fix
Copy the required
assets/andscripts/into this managed location during installation:The installer should:
Acceptance criteria
%LOCALAPPDATA%\CodexDreamSkin\engine.config.tomlbehavior, CDP binding, or theme format.Self-check and links