-
Notifications
You must be signed in to change notification settings - Fork 8
/
pia-setup-ewdk.bat
75 lines (68 loc) · 2.03 KB
/
pia-setup-ewdk.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
rem Copyright (c) 2020 Private Internet Access, Inc.
rem
rem This file is part of the Private Internet Access Desktop Client.
rem
rem The Private Internet Access Desktop Client is free software: you can
rem redistribute it and/or modify it under the terms of the GNU General Public
rem License as published by the Free Software Foundation, either version 3 of
rem the License, or (at your option) any later version.
rem
rem The Private Internet Access Desktop Client is distributed in the hope that
rem it will be useful, but WITHOUT ANY WARRANTY; without even the implied
rem warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
rem GNU General Public License for more details.
rem
rem You should have received a copy of the GNU General Public License
rem along with the Private Internet Access Desktop Client. If not, see
rem <https://www.gnu.org/licenses/>.
@echo off
set SETUP_EWDK_ARG_SHOW_HELP=0
set SETUP_EWDK_ARG_SHOW_HELP_ENV_ONLY=0
:arg_loop
if not "%1"=="" (
if "%1"=="--help" (
set SETUP_EWDK_ARG_SHOW_HELP=1
) else if "%1"=="--help-env" (
set SETUP_EWDK_ARG_SHOW_HELP=1
set SETUP_EWDK_ARG_SHOW_HELP_ENV_ONLY=1
) else (
echo Unknown option %1
set SETUP_EWDK_ARG_SHOW_HELP=1
)
shift
goto arg_loop
)
if %SETUP_EWDK_ARG_SHOW_HELP% NEQ 0 (
rem help-env is used to embed the environment help in another script
if %SETUP_EWDK_ARG_SHOW_HELP_ENV_ONLY% EQU 0 (
echo usage:
echo %0
echo %0 --help
echo.
echo Locates and sets up the EWDK environment.
echo Note: The EWDK setup script may turn echo back on.
echo.
)
echo EWDK = path to the EWDK, by default the newest EWDK from C:\EWDK\* is used.
echo.
exit /B 0
)
if [%EWDK%] == [] (
for /D %%G in ("C:\EWDK\*") do set "EWDK=%%G"
)
if not exist "%EWDK%" (
echo Error: EWDK not found.
goto error
)
echo * Using EWDK in %EWDK%
call "%EWDK%\BuildEnv\SetupBuildEnv.cmd"
:end
exit /b %errorlevel%
:error
if %errorlevel% equ 0 (
set errorlevel=1
) else (
echo.
echo Build failed with error %errorlevel%!
)
goto end