Steve Dower | 68d663c | 2017-07-17 11:15:48 +0200 | [diff] [blame] | 1 | @echo off |
| 2 | rem Downloads and build sources for libraries we depend upon |
| 3 | |
| 4 | goto Run |
| 5 | :Usage |
| 6 | echo.%~nx0 [flags and arguments] |
| 7 | echo. |
| 8 | echo.Download and build Tcl/Tk. This should only be performed in order to |
| 9 | echo.update the binaries kept online - in most cases, the files downloaded |
| 10 | echo.by the get_externals.bat script are sufficient for building CPython. |
| 11 | echo. |
| 12 | echo.Available flags: |
| 13 | echo. -h Display this help message |
| 14 | echo. |
| 15 | echo.Available arguments: |
| 16 | echo. --certificate (-c) The signing certificate to use for binaries. |
| 17 | echo. --organization The github organization to obtain sources from. |
| 18 | echo. |
| 19 | exit /b 127 |
| 20 | |
| 21 | :Run |
| 22 | setlocal |
| 23 | |
| 24 | if "%PCBUILD%"=="" (set PCBUILD=%~dp0) |
| 25 | if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals) |
| 26 | |
| 27 | set CERT_SETTING= |
| 28 | set ORG_SETTING= |
| 29 | |
| 30 | :CheckOpts |
| 31 | if "%~1"=="-h" shift & goto Usage |
| 32 | if "%~1"=="--certificate" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts |
| 33 | if "%~1"=="-c" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts |
| 34 | if "%~1"=="--organization" (set ORG_SETTING=--organization "%~2") && shift && shift && goto CheckOpts |
| 35 | |
| 36 | if "%~1"=="" goto Build |
| 37 | echo Unrecognized option: %1 |
| 38 | goto Usage |
| 39 | |
| 40 | :Build |
Zachary Ware | 6c6d3a4 | 2017-12-30 17:17:36 -0600 | [diff] [blame] | 41 | call "%PCBUILD%\find_msbuild.bat" %MSBUILD% |
Steve Dower | 68d663c | 2017-07-17 11:15:48 +0200 | [diff] [blame] | 42 | if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) |
| 43 | |
Zachary Ware | 6c6d3a4 | 2017-12-30 17:17:36 -0600 | [diff] [blame] | 44 | rem call "%PCBUILD%\find_python.bat" "%PYTHON%" |
Steve Dower | 68d663c | 2017-07-17 11:15:48 +0200 | [diff] [blame] | 45 | rem if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3) |
| 46 | |
Zachary Ware | 6c6d3a4 | 2017-12-30 17:17:36 -0600 | [diff] [blame] | 47 | call "%PCBUILD%\get_externals.bat" --tkinter-src %ORG_SETTING% |
Steve Dower | 68d663c | 2017-07-17 11:15:48 +0200 | [diff] [blame] | 48 | |
Zachary Ware | 6c6d3a4 | 2017-12-30 17:17:36 -0600 | [diff] [blame] | 49 | %MSBUILD% "%PCBUILD%\tcl.vcxproj" /p:Configuration=Release /p:Platform=Win32 |
| 50 | %MSBUILD% "%PCBUILD%\tk.vcxproj" /p:Configuration=Release /p:Platform=Win32 |
| 51 | %MSBUILD% "%PCBUILD%\tix.vcxproj" /p:Configuration=Release /p:Platform=Win32 |
Steve Dower | 68d663c | 2017-07-17 11:15:48 +0200 | [diff] [blame] | 52 | |
Zachary Ware | 6c6d3a4 | 2017-12-30 17:17:36 -0600 | [diff] [blame] | 53 | %MSBUILD% "%PCBUILD%\tcl.vcxproj" /p:Configuration=Release /p:Platform=x64 |
| 54 | %MSBUILD% "%PCBUILD%\tk.vcxproj" /p:Configuration=Release /p:Platform=x64 |
| 55 | %MSBUILD% "%PCBUILD%\tix.vcxproj" /p:Configuration=Release /p:Platform=x64 |