16e7c69efSopenharmony_ci:: Copyright (c) 2023 Huawei Device Co., Ltd. 26e7c69efSopenharmony_ci:: Licensed under the Apache License, Version 2.0 (the "License"); 36e7c69efSopenharmony_ci:: you may not use this file except in compliance with the License. 46e7c69efSopenharmony_ci:: You may obtain a copy of the License at 56e7c69efSopenharmony_ci:: 66e7c69efSopenharmony_ci:: http://www.apache.org/licenses/LICENSE-2.0 76e7c69efSopenharmony_ci:: 86e7c69efSopenharmony_ci:: Unless required by applicable law or agreed to in writing, software 96e7c69efSopenharmony_ci:: distributed under the License is distributed on an "AS IS" BASIS, 106e7c69efSopenharmony_ci:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 116e7c69efSopenharmony_ci:: See the License for the specific language governing permissions and 126e7c69efSopenharmony_ci:: limitations under the License. 136e7c69efSopenharmony_ci 146e7c69efSopenharmony_ci@echo off 156e7c69efSopenharmony_ci 166e7c69efSopenharmony_ci@if "%DEBUG%" == "" @echo off 176e7c69efSopenharmony_ci@rem ########################################################################## 186e7c69efSopenharmony_ci@rem 196e7c69efSopenharmony_ci@rem Hvigor startup script for Windows 206e7c69efSopenharmony_ci@rem 216e7c69efSopenharmony_ci@rem ########################################################################## 226e7c69efSopenharmony_ci 236e7c69efSopenharmony_ci@rem Set local scope for the variables with windows NT shell 246e7c69efSopenharmony_ciif "%OS%"=="Windows_NT" setlocal 256e7c69efSopenharmony_ci 266e7c69efSopenharmony_ciset DIRNAME=%~dp0 276e7c69efSopenharmony_ciif "%DIRNAME%" == "" set DIRNAME=. 286e7c69efSopenharmony_ciset APP_BASE_NAME=%~n0 296e7c69efSopenharmony_ciset APP_HOME=%DIRNAME% 306e7c69efSopenharmony_ci 316e7c69efSopenharmony_ci@rem Resolve any "." and ".." in APP_HOME to make it shorter. 326e7c69efSopenharmony_cifor %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 336e7c69efSopenharmony_ci 346e7c69efSopenharmony_ciset WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js 356e7c69efSopenharmony_ciset NODE_EXE=node.exe 366e7c69efSopenharmony_ci 376e7c69efSopenharmony_cigoto start 386e7c69efSopenharmony_ci 396e7c69efSopenharmony_ci:start 406e7c69efSopenharmony_ci@rem Find node.exe 416e7c69efSopenharmony_ciif defined NODE_HOME goto findNodeFromNodeHome 426e7c69efSopenharmony_ci 436e7c69efSopenharmony_ci%NODE_EXE% --version >NUL 2>&1 446e7c69efSopenharmony_ciif "%ERRORLEVEL%" == "0" goto execute 456e7c69efSopenharmony_ci 466e7c69efSopenharmony_ciecho. 476e7c69efSopenharmony_ciecho ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. 486e7c69efSopenharmony_ciecho. 496e7c69efSopenharmony_ciecho Please set the NODE_HOME variable in your environment to match the 506e7c69efSopenharmony_ciecho location of your NodeJs installation. 516e7c69efSopenharmony_ci 526e7c69efSopenharmony_cigoto fail 536e7c69efSopenharmony_ci 546e7c69efSopenharmony_ci:findNodeFromNodeHome 556e7c69efSopenharmony_ciset NODE_HOME=%NODE_HOME:"=% 566e7c69efSopenharmony_ciset NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% 576e7c69efSopenharmony_ci 586e7c69efSopenharmony_ciif exist "%NODE_EXE_PATH%" goto execute 596e7c69efSopenharmony_ciecho. 606e7c69efSopenharmony_ciecho ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. 616e7c69efSopenharmony_ciecho. 626e7c69efSopenharmony_ciecho Please set the NODE_HOME variable in your environment to match the 636e7c69efSopenharmony_ciecho location of your NodeJs installation. 646e7c69efSopenharmony_ci 656e7c69efSopenharmony_cigoto fail 666e7c69efSopenharmony_ci 676e7c69efSopenharmony_ci:execute 686e7c69efSopenharmony_ci@rem Execute hvigor 696e7c69efSopenharmony_ci"%NODE_EXE%" %WRAPPER_MODULE_PATH% %* 706e7c69efSopenharmony_ci 716e7c69efSopenharmony_ci:fail 726e7c69efSopenharmony_ciexit /b 1 73