Match WSL launcher argument handling during uninstall

This commit is contained in:
gloamxun committed 2026-12-02 18:23:46 +08:00
1 parent 2c99cade7d
commit 022c4d5712
2 files changed
+12 -3

No files matched your search

+3 -1
View File
@@ -16,7 +16,9 @@ Windows x64 原生版直接运行包内的引擎、TeX 资源和 BibTeX。项目
### 准备 Windows 原生版资源 ### 准备 Windows 原生版资源
构建 x64 原生引擎。可以在 Windows 使用 MSVC,或在 Fedora WSL 构建 x64 原生引擎。可以在 Windows 使用 MSVC,或在 Fedora WSL
使用仓库的 Windows 构建工具链运行 `cargo xwin build`。 使用仓库的 Windows 构建工具链运行 `cargo xwin build`。使用新版
MSVC 标准库交叉构建时,可设置 `TARGET_CXXFLAGS=-std=c++17`
编译 HarfBuzz。
```sh ```sh
cargo build --locked --release --target x86_64-pc-windows-msvc --example native_editor cargo build --locked --release --target x86_64-pc-windows-msvc --example native_editor
+9 -2
View File
@@ -1,12 +1,15 @@
Var TexrraCleanupDistro Var TexrraCleanupDistro
Var TexrraCleanupDistroArg
Var TexrraCleanupPath Var TexrraCleanupPath
Var TexrraCleanupWsl Var TexrraCleanupWsl
Var TexrraCleanupMode Var TexrraCleanupMode
Var TexrraCleanupStatus Var TexrraCleanupStatus
; Distro names are passed as a single Windows argument. ; Match the desktop launcher's Windows argument quoting. Some WSL builds
; treat unnecessary quotes around a distribution name as part of its name.
!macro TexrraValidateDistro !macro TexrraValidateDistro
StrCpy $2 0 StrCpy $2 0
StrCpy $TexrraCleanupDistroArg $TexrraCleanupDistro
${Do} ${Do}
StrCpy $1 $TexrraCleanupDistro 1 $2 StrCpy $1 $TexrraCleanupDistro 1 $2
${IfThen} $1 == "" ${|} ${ExitDo} ${|} ${IfThen} $1 == "" ${|} ${ExitDo} ${|}
@@ -16,6 +19,10 @@ Var TexrraCleanupStatus
${OrIf} $1 == "$\n" ${OrIf} $1 == "$\n"
Goto texrra_cleanup_unavailable Goto texrra_cleanup_unavailable
${EndIf} ${EndIf}
${If} $1 == " "
${OrIf} $1 == "$\t"
StrCpy $TexrraCleanupDistroArg '$\"$TexrraCleanupDistro$\"'
${EndIf}
IntOp $2 $2 + 1 IntOp $2 $2 + 1
${Loop} ${Loop}
!macroend !macroend
@@ -24,7 +31,7 @@ Var TexrraCleanupStatus
${If} $TexrraCleanupDistro == "" ${If} $TexrraCleanupDistro == ""
nsExec::Exec ${options} '"$TexrraCleanupWsl" --cd "$PLUGINSDIR" --exec python3 -B ./uninstall-projects.py ${action}' nsExec::Exec ${options} '"$TexrraCleanupWsl" --cd "$PLUGINSDIR" --exec python3 -B ./uninstall-projects.py ${action}'
${Else} ${Else}
nsExec::Exec ${options} '"$TexrraCleanupWsl" --distribution "$TexrraCleanupDistro" --cd "$PLUGINSDIR" --exec python3 -B ./uninstall-projects.py ${action}' nsExec::Exec ${options} '"$TexrraCleanupWsl" --distribution $TexrraCleanupDistroArg --cd "$PLUGINSDIR" --exec python3 -B ./uninstall-projects.py ${action}'
${EndIf} ${EndIf}
Pop $TexrraCleanupStatus Pop $TexrraCleanupStatus
!macroend !macroend