-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.cmd
65 lines (55 loc) · 1.36 KB
/
make.cmd
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
@echo off
setlocal
set PACKAGE_NAME=goggalaxy
set INSTALL_DIR=%APPDATA%\Keypirinha\InstalledPackages
if "%1"=="" goto help
if "%1"=="-h" goto help
if "%1"=="--help" goto help
if "%1"=="help" (
:help
echo Usage:
echo make help
echo make clean
echo make build
echo make install
echo make py [python_args]
goto end
)
if "%BUILD_DIR%"=="" set BUILD_DIR=%~dp0build
if "%KEYPIRINHA_SDK%"=="" (
echo ERROR: Keypirinha SDK environment not setup.
echo Run SDK's "kpenv" script and try again.
exit /b 1
)
if "%1"=="clean" (
if exist "%BUILD_DIR%" rmdir /s /q "%BUILD_DIR%"
goto end
)
if "%1"=="build" (
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
pushd "%~dp0"
call "%KEYPIRINHA_SDK%\cmd\kparch" ^
"%BUILD_DIR%\%PACKAGE_NAME%.keypirinha-package" ^
-r LICENSE* README* src
popd
goto end
)
if "%1"=="install" (
copy /Y "%BUILD_DIR%\*.keypirinha-package" "%INSTALL_DIR%\"
goto end
)
if "%1"=="dev" (
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
pushd "%~dp0"
call "%KEYPIRINHA_SDK%\cmd\kparch" ^
"%BUILD_DIR%\%PACKAGE_NAME%.keypirinha-package" ^
-r LICENSE* README* src
popd
copy /Y "%BUILD_DIR%\*.keypirinha-package" "%INSTALL_DIR%\"
goto end
)
if "%1"=="py" (
call "%KEYPIRINHA_SDK%\cmd\kpy" %2 %3 %4 %5 %6 %7 %8 %9
goto end
)
:end