File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11@ echo off
22setlocal
33
4+ rem Save original code page
5+ for /f " tokens=2 delims=:" %%i in ('chcp') do set " ORIGINAL_CP = %%i "
6+ set ORIGINAL_CP = %ORIGINAL_CP: =%
7+
8+ rem Set code page to UTF-8
9+ chcp 65001 > nul
10+
411set ELECTRON_RUN_AS_NODE = 1
512call " %~dp0 ..\..\Studio.exe" " %~dp0 ..\cli\main.js" %*
613
7- endlocal
14+ rem Restore original code page
15+ chcp %ORIGINAL_CP% > nul
16+
17+ endlocal
Original file line number Diff line number Diff line change @@ -68,15 +68,11 @@ const installPath = async () => {
6868} ;
6969
7070/**
71- * Our app is installed in a versioned directory, so the
72- * full path changes with every update. This makes it unreliable to add the
73- * executable directly to the system PATH — we'd also need to handle cleaning up
74- * outdated entries manually.
71+ * Creates a proxy batch file in a stable location to handle CLI execution.
7572 *
76- * To solve this, we generate a fixed entry point (a proxy script) in a
77- * stable location within AppData, outside the versioned folder. This script
78- * simply forwards execution to the current version’s actual CLI entry point.
79- * On update, we just rewrite the proxy to point to the new version.
73+ * Since our app is installed in a versioned directory, the full path changes with each update.
74+ * Instead of adding the versioned executable directly to PATH, we create a fixed proxy script
75+ * in the AppData directory that forwards execution to the current version's CLI entry point.
8076 */
8177const installProxyBatFile = async ( ) => {
8278 try {
You can’t perform that action at this time.
0 commit comments