Skip to content

Commit b7a19b4

Browse files
committed
adapt to code.exe
1 parent 024ab8a commit b7a19b4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/code.bat

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ pushd %~dp0\..
88
:: Node modules
99
if not exist node_modules call .\scripts\npm.bat install
1010

11+
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
12+
set NAMESHORT=%NAMESHORT: "=%
13+
set NAMESHORT=%NAMESHORT:"=%.exe
14+
set CODE=".build\electron\%NAMESHORT%"
15+
1116
:: Get electron
12-
if not exist .build\electron\code-oss-dev.exe node .\node_modules\gulp\bin\gulp.js electron
17+
if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron
1318

1419
:: Build
1520
if not exist out node .\node_modules\gulp\bin\gulp.js compile
@@ -23,7 +28,7 @@ set ELECTRON_ENABLE_LOGGING=1
2328
set ELECTRON_ENABLE_STACK_DUMPING=1
2429

2530
:: Launch Code
26-
.\.build\electron\code-oss-dev.exe . %*
31+
%CODE% . %*
2732
popd
2833

29-
endlocal
34+
endlocal

0 commit comments

Comments
 (0)