-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
_windows-start-dev.bat
executable file
·35 lines (30 loc) · 1.06 KB
/
_windows-start-dev.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
setlocal EnableExtensions
setlocal enabledelayedexpansion
rem set current working directory to the directory of this script
pushd %~dp0
:: Exit with nonzero exit code if anything fails
set "errorlevel="
set "CUSHY_RUN_MODE=dev"
rem --------------------------------------------------------------------------------
set "NODE_VERSION=v20.14.0"
set "NODE_ARCH=win-x64"
set "CWD=%CD%"
set "EXTRACT_DIR=%CWD%\.cushy\node\%NODE_VERSION%-%NODE_ARCH%"
set "NODE_INSTALL_DIR=%EXTRACT_DIR%\node-%NODE_VERSION%-%NODE_ARCH%"
set "URL=https://nodejs.org/dist/%NODE_VERSION%/node-%NODE_VERSION%-%NODE_ARCH%.zip"
set "PATH=%NODE_INSTALL_DIR%;%PATH%"
set "NPM_BIN_PATH=%NODE_INSTALL_DIR%\npm"
set "NODE_BIN_PATH=%NODE_INSTALL_DIR%\node"
rem --------------------------------------------------------------------------------
:: Start Vite using Electron's Node
echo Starting Cushy in dev mode...
call .\node_modules\.bin\electron --no-sandbox -i src\shell
if not "%ERRORLEVEL%" == "0" (
echo Starting failed. Did you call install first ?
pause
popd
exit /B 1
)
popd
exit /B 0