2021-10-21 00:42:13 +08:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
2022-01-20 20:48:08 +08:00
|
|
|
title VSCode Server
|
2021-10-21 00:42:13 +08:00
|
|
|
|
2022-01-20 20:48:08 +08:00
|
|
|
pushd %~dp0\..
|
2021-10-21 00:42:13 +08:00
|
|
|
|
|
|
|
:: Configuration
|
|
|
|
set NODE_ENV=development
|
|
|
|
set VSCODE_DEV=1
|
|
|
|
|
2022-02-17 19:37:40 +08:00
|
|
|
:: Get electron, compile, built-in extensions
|
|
|
|
if "%VSCODE_SKIP_PRELAUNCH%"=="" node build/lib/preLaunch.js
|
2021-10-21 00:42:13 +08:00
|
|
|
|
2022-01-21 22:15:12 +08:00
|
|
|
:: Node executable
|
|
|
|
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
|
|
|
|
|
|
|
|
if not exist "%NODE%" (
|
|
|
|
:: Download nodejs executable for remote
|
|
|
|
call yarn gulp node
|
|
|
|
)
|
2021-10-21 00:42:13 +08:00
|
|
|
|
|
|
|
:: Launch Server
|
2022-01-21 21:33:34 +08:00
|
|
|
call "%NODE%" scripts\code-server.js %*
|
2021-10-21 00:42:13 +08:00
|
|
|
|
|
|
|
popd
|
|
|
|
|
2022-01-20 20:48:08 +08:00
|
|
|
endlocal
|