100aff185Sopenharmony_ci@if "%DEBUG%" == "" @echo off 200aff185Sopenharmony_ci@rem ########################################################################## 300aff185Sopenharmony_ci@rem 400aff185Sopenharmony_ci@rem Hvigor startup script for Windows 500aff185Sopenharmony_ci@rem 600aff185Sopenharmony_ci@rem ########################################################################## 700aff185Sopenharmony_ci 800aff185Sopenharmony_ci@rem Set local scope for the variables with windows NT shell 900aff185Sopenharmony_ciif "%OS%"=="Windows_NT" setlocal 1000aff185Sopenharmony_ci 1100aff185Sopenharmony_ciset DIRNAME=%~dp0 1200aff185Sopenharmony_ciif "%DIRNAME%" == "" set DIRNAME=. 1300aff185Sopenharmony_ciset APP_BASE_NAME=%~n0 1400aff185Sopenharmony_ciset APP_HOME=%DIRNAME% 1500aff185Sopenharmony_ci 1600aff185Sopenharmony_ci@rem Resolve any "." and ".." in APP_HOME to make it shorter. 1700aff185Sopenharmony_cifor %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 1800aff185Sopenharmony_ci 1900aff185Sopenharmony_ciset WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js 2000aff185Sopenharmony_ciset NODE_EXE=node.exe 2100aff185Sopenharmony_ci 2200aff185Sopenharmony_cigoto start 2300aff185Sopenharmony_ci 2400aff185Sopenharmony_ci:start 2500aff185Sopenharmony_ci@rem Find node.exe 2600aff185Sopenharmony_ciif defined NODE_HOME goto findNodeFromNodeHome 2700aff185Sopenharmony_ci 2800aff185Sopenharmony_ci%NODE_EXE% --version >NUL 2>&1 2900aff185Sopenharmony_ciif "%ERRORLEVEL%" == "0" goto execute 3000aff185Sopenharmony_ci 3100aff185Sopenharmony_ciecho. 3200aff185Sopenharmony_ciecho ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. 3300aff185Sopenharmony_ciecho. 3400aff185Sopenharmony_ciecho Please set the NODE_HOME variable in your environment to match the 3500aff185Sopenharmony_ciecho location of your NodeJs installation. 3600aff185Sopenharmony_ci 3700aff185Sopenharmony_cigoto fail 3800aff185Sopenharmony_ci 3900aff185Sopenharmony_ci:findNodeFromNodeHome 4000aff185Sopenharmony_ciset NODE_HOME=%NODE_HOME:"=% 4100aff185Sopenharmony_ciset NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% 4200aff185Sopenharmony_ci 4300aff185Sopenharmony_ciif exist "%NODE_EXE_PATH%" goto execute 4400aff185Sopenharmony_ciecho. 4500aff185Sopenharmony_ciecho ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. 4600aff185Sopenharmony_ciecho. 4700aff185Sopenharmony_ciecho Please set the NODE_HOME variable in your environment to match the 4800aff185Sopenharmony_ciecho location of your NodeJs installation. 4900aff185Sopenharmony_ci 5000aff185Sopenharmony_cigoto fail 5100aff185Sopenharmony_ci 5200aff185Sopenharmony_ci:execute 5300aff185Sopenharmony_ci@rem Execute hvigor 5400aff185Sopenharmony_ci"%NODE_EXE%" %WRAPPER_MODULE_PATH% %* 5500aff185Sopenharmony_ci 5600aff185Sopenharmony_ciif "%ERRORLEVEL%" == "0" goto hvigorwEnd 5700aff185Sopenharmony_ci 5800aff185Sopenharmony_ci:fail 5900aff185Sopenharmony_ciexit /b 1 6000aff185Sopenharmony_ci 6100aff185Sopenharmony_ci:hvigorwEnd 6200aff185Sopenharmony_ciif "%OS%" == "Windows_NT" endlocal 6300aff185Sopenharmony_ci 6400aff185Sopenharmony_ci:end 65