2
2
setlocal
3
3
set D = %~dp0
4
4
set PCBUILD = %D% ..\..\PCbuild\
5
+ set PYTHON_EXE = %PCBUILD% ..\externals\pythonx86\tools\python.exe
5
6
if " %Py_OutDir% " == " " set Py_OutDir = %PCBUILD%
6
7
7
8
set BUILDX86 =
8
9
set BUILDX64 =
9
10
set BUILDARM =
10
- set SYNCX86 =
11
- set SYNCX64 =
12
- set SYNCARM =
13
11
set REBUILD =
14
- set OUTPUT =
15
- set PACKAGES =
16
12
set DEBUG =
17
- set DEBUG_SUFFIX =
13
+ set TEST =
14
+ set _SUFFIX =
18
15
19
16
:CheckOpts
20
17
if " %~1 " EQU " -h" goto Help
21
- if " %~1 " EQU " -x86" (set BUILDX86=1 && set SYNCX86 = 1) && shift && goto CheckOpts
22
- if " %~1 " EQU " -x64" (set BUILDX64=1 && set SYNCX64 = 1) && shift && goto CheckOpts
23
- if " %~1 " EQU " -arm" (set BUILDARM=1 && set SYNCARM = 1) && shift && goto CheckOpts
18
+ if " %~1 " EQU " -x86" (set BUILDX86=1) && shift && goto CheckOpts
19
+ if " %~1 " EQU " -x64" (set BUILDX64=1) && shift && goto CheckOpts
20
+ if " %~1 " EQU " -arm" (set BUILDARM=1) && shift && goto CheckOpts
21
+ if " %~1 " EQU " -t" (set TEST=-t) && shift && goto CheckOpts
24
22
if " %~1 " EQU " -r" (set REBUILD=-r) && shift && goto CheckOpts
25
23
if " %~1 " EQU " -d" (set DEBUG=-d && set _SUFFIX = _d) && shift && goto CheckOpts
26
- if " %~1 " EQU " -o" (set OUTPUT=" /p:OutputPath=%~2 " ) && shift && shift && goto CheckOpts
27
- if " %~1 " EQU " --out" (set OUTPUT=" /p:OutputPath=%~2 " ) && shift && shift && goto CheckOpts
28
- if " %~1 " EQU " -p" (set PACKAGES=%PACKAGES% %~2 ) && shift && shift && goto CheckOpts
29
24
if " %~1 " NEQ " " echo Unknown parameter " %~1 " && exit
30
25
31
26
if not defined BUILDX86 if not defined BUILDX64 if not defined BUILDARM (set BUILDX86=1) && (set BUILDX64=1) && (set BUILDARM=1)
32
27
33
- :: need x64 python.exe to run sync_win_iot.pl when only building for ARM
34
- if defined BUILDARM (
35
- if not exist " %PCBUILD% amd64\python.exe" ( set BUILDX64 = 1 )
36
- )
37
-
38
28
call " %PCBUILD% find_msbuild.bat" %MSBUILD%
39
29
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
40
30
@@ -45,29 +35,26 @@ if defined DEBUG (set CONFIGURATION=Debug
45
35
46
36
if defined BUILDX86 (
47
37
if defined REBUILD ( call " %PCBUILD% build.bat" -e -r
48
- ) else if not exist " %Py_OutDir% win32\python.exe" call " %PCBUILD% build.bat" -e %DEBUG%
38
+ ) else if not exist " %Py_OutDir% win32\python%_SUFFIX% .exe" call " %PCBUILD% build.bat" -e %DEBUG%
49
39
if errorlevel 1 goto :eof
50
40
51
- if defined SYNCX86 ( %MSBUILD% " %D% sync_win_iot.proj" /p:Configuration=%CONFIGURATION% /p:Platform=x86 %OUTPUT% %PACKAGES% %WINIOT% )
52
- if errorlevel 1 goto :eof
41
+ %PYTHON_EXE% %D% sync_win_iot.py %DEBUG% %TEST% -p win32
53
42
)
54
43
55
44
if defined BUILDX64 (
56
45
if defined REBUILD ( call " %PCBUILD% build.bat" -p x64 -e -r
57
- ) else if not exist " %Py_OutDir% amd64\python.exe" call " %PCBUILD% build.bat" -p x64 -e %DEBUG%
46
+ ) else if not exist " %Py_OutDir% amd64\python%_SUFFIX% .exe" call " %PCBUILD% build.bat" -p x64 -e %DEBUG%
58
47
if errorlevel 1 goto :eof
59
48
60
- if defined SYNCX64 ( %MSBUILD% " %D% sync_win_iot.proj" /p:Configuration=%CONFIGURATION% /p:Platform=x64 %OUTPUT% %PACKAGES% %WINIOT% )
61
- if errorlevel 1 goto :eof
49
+ %PYTHON_EXE% %D% sync_win_iot.py %DEBUG% %TEST% -p amd64
62
50
)
63
51
64
52
if defined BUILDARM (
65
- if defined REBUILD ( call " %PCBUILD% build.bat" -p ARM -e %DEBUG% -r --no-tkinter --no-ssl --no- vs
66
- ) else if not exist " %Py_OutDir% arm32\python%_SUFFIX% .exe" call " %PCBUILD% build.bat" -p ARM -e %DEBUG% --no-tkinter --no-vs
53
+ if defined REBUILD ( call " %PCBUILD% build.bat" -p ARM -e %DEBUG% -r --no-tkinter --no-vs
54
+ ) else if not exist " %Py_OutDir% arm32\python%_SUFFIX% .exe" call " %PCBUILD% build.bat" -p ARM -E %DEBUG% --no-tkinter --no-vs
67
55
if errorlevel 1 goto :eof
68
56
69
- if defined SYNCARM ( %MSBUILD% " %D% sync_win_iot.proj" /p:Configuration=%CONFIGURATION% /p:Platform=ARM /p:" PythonExe=%PCBUILD% amd64\python.exe" %OUTPUT% %PACKAGES% %WINIOT% )
70
- if errorlevel 1 goto :eof
57
+ %PYTHON_EXE% %D% sync_win_iot.py %DEBUG% %TEST% -p arm32
71
58
)
72
59
73
60
exit /B 0
78
65
echo -x86 Build and sync x86 files
79
66
echo -x64 Build and sync x64 files
80
67
echo -arm Build and sync arm files (will build X64 to execute tools)
68
+ echo -t Include test files
81
69
echo -d Build Debug configuration
82
70
echo -r Rebuild rather than incremental build
83
- echo --out [DIR] Override output directory
84
71
echo -h Show usage
0 commit comments