forked from google/skia
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsk4d-build.bat
45 lines (32 loc) · 1011 Bytes
/
sk4d-build.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
@echo off
rem #
rem # Copyright (c) 2011-2023 Google LLC.
rem # Copyright (c) 2021-2023 Skia4Delphi Project.
rem #
rem # Use of this source code is governed by a BSD-style license that can be
rem # found in the LICENSE file.
rem #
setlocal
python --version >nul 2>&1 || goto PYTHON_IS_PYTHON3
set SCRIPT_EXECUTABLE=python
goto RUN
:PYTHON_IS_PYTHON3
python3 --version >nul 2>&1 || goto PYTHON_NOT_FOUND
set SCRIPT_EXECUTABLE=python3
goto RUN
:PYTHON_NOT_FOUND
echo Python not found.
echo.
echo Python can be installed in two ways:
echo - Installation downloaded from official web site (https://www.python.org);
echo - Using the chocolatey package manager: 'choco install -y python'.
echo.
echo * Make sure it has been added to the PATH environment variable and reopen the terminal.
goto EOF
:RUN
set SCRIPT_DIR=%~dp0
pushd "%SCRIPT_DIR%"
set PATH=%SCRIPT_DIR%sk4d\bin;%PATH%
cmd /c %SCRIPT_EXECUTABLE% "%SCRIPT_DIR%sk4d\scripts\build.py" --script-executable=%SCRIPT_EXECUTABLE% %*
popd
endlocal