• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@if "%DEBUG%" == "" @echo off
2@rem ##########################################################################
3@rem
4@rem  Hvigor startup script for Windows
5@rem
6@rem ##########################################################################
7
8@rem Set local scope for the variables with windows NT shell
9if "%OS%"=="Windows_NT" setlocal
10
11set DIRNAME=%~dp0
12if "%DIRNAME%" == "" set DIRNAME=.
13set APP_BASE_NAME=%~n0
14set APP_HOME=%DIRNAME%
15
16@rem Resolve any "." and ".." in APP_HOME to make it shorter.
17for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
18
19set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
20set NODE_EXE=node.exe
21
22goto start
23
24:start
25@rem Find node.exe
26if defined NODE_HOME goto findNodeFromNodeHome
27
28%NODE_EXE% --version >NUL 2>&1
29if "%ERRORLEVEL%" == "0" goto execute
30
31echo.
32echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
33echo.
34echo Please set the NODE_HOME variable in your environment to match the
35echo location of your NodeJs installation.
36
37goto fail
38
39:findNodeFromNodeHome
40set NODE_HOME=%NODE_HOME:"=%
41set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
42
43if exist "%NODE_EXE_PATH%" goto execute
44echo.
45echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
46echo.
47echo Please set the NODE_HOME variable in your environment to match the
48echo location of your NodeJs installation.
49
50goto fail
51
52:execute
53@rem Execute hvigor
54"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
55
56:fail
57exit /b 1
58