launch: check prerequisites in a pre-launch task

Fixes https://github.com/microsoft/vscode/issues/103708
This commit is contained in:
Connor Peet
2020-07-31 10:38:31 -07:00
parent 98dd195b91
commit 262ab802d3
9 changed files with 158 additions and 60 deletions

View File

@@ -5,27 +5,17 @@ title VSCode Dev
pushd %~dp0\..
:: Node modules
if not exist node_modules call yarn
:: Get electron, compile, built-in extensions
if "%VSCODE_SKIP_PRELAUNCH%"=="" node build/lib/preLaunch.js
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"
:: Download Electron if needed
node build\lib\electron.js
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron
:: Manage built-in extensions
if "%1"=="--builtin" goto builtin
:: Sync built-in extensions
node build\lib\builtInExtensions.js
:: Build
if not exist out yarn compile
:: Configuration
set ELECTRON_RUN_AS_NODE=1
set NODE_ENV=development