Zachary Ware | 6250df8 | 2015-06-09 23:16:52 -0500 | [diff] [blame] | 1 | @echo off
|
| 2 | setlocal
|
| 3 | rem Simple script to fetch source for external libraries
|
| 4 |
|
| 5 | if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"
|
| 6 | pushd "%~dp0..\externals"
|
| 7 |
|
| 8 | if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
| 9 |
|
| 10 | rem Optionally clean up first. Be warned that this can be very destructive!
|
| 11 | if not "%1"=="" (
|
| 12 | for %%c in (-c --clean --clean-only) do (
|
| 13 | if "%1"=="%%c" goto clean
|
| 14 | )
|
| 15 | goto usage
|
| 16 | )
|
| 17 | goto fetch
|
| 18 |
|
| 19 | :clean
|
| 20 | echo.Cleaning up external libraries.
|
| 21 | for /D %%d in (
|
| 22 | bzip2-*
|
| 23 | db-*
|
| 24 | nasm-*
|
| 25 | openssl-*
|
| 26 | tcl-*
|
| 27 | tcltk*
|
| 28 | tk-*
|
| 29 | tix-*
|
| 30 | sqlite-*
|
| 31 | xz-*
|
| 32 | ) do (
|
| 33 | echo.Removing %%d
|
| 34 | rmdir /s /q %%d
|
| 35 | )
|
| 36 | if "%1"=="--clean-only" (
|
| 37 | goto end
|
| 38 | )
|
| 39 |
|
| 40 | :fetch
|
| 41 | rem Fetch current versions
|
| 42 |
|
| 43 | svn --version > nul 2>&1
|
| 44 | if ERRORLEVEL 9009 (
|
| 45 | echo.svn.exe must be on your PATH.
|
| 46 | echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
|
| 47 | echo.command line tools option.
|
| 48 | popd
|
| 49 | exit /b 1
|
| 50 | )
|
| 51 |
|
| 52 | echo.Fetching external libraries...
|
| 53 |
|
| 54 | for %%e in (
|
| 55 | bzip2-1.0.6
|
| 56 | nasm-2.11.06
|
Zachary Ware | 689b55c | 2015-07-21 23:20:47 -0500 | [diff] [blame] | 57 | openssl-1.0.2d
|
Zachary Ware | 6250df8 | 2015-06-09 23:16:52 -0500 | [diff] [blame] | 58 | tcl-8.6.1.0
|
| 59 | tk-8.6.1.0
|
| 60 | tix-8.4.3.4
|
Steve Dower | 54d361f | 2015-07-28 11:05:18 -0700 | [diff] [blame] | 61 | sqlite-3.8.11.0
|
Zachary Ware | 6250df8 | 2015-06-09 23:16:52 -0500 | [diff] [blame] | 62 | xz-5.0.5
|
| 63 | ) do (
|
| 64 | if exist %%e (
|
| 65 | echo.%%e already exists, skipping.
|
| 66 | ) else (
|
| 67 | echo.Fetching %%e...
|
| 68 | svn export %SVNROOT%%%e
|
| 69 | )
|
| 70 | )
|
| 71 |
|
| 72 | goto end
|
| 73 |
|
| 74 | :usage
|
| 75 | echo.invalid argument: %1
|
| 76 | echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]
|
| 77 | echo.
|
| 78 | echo.Pull all sources necessary for compiling optional extension modules
|
| 79 | echo.that rely on external libraries. Requires svn.exe to be on your PATH
|
| 80 | echo.and pulls sources from %SVNROOT%.
|
| 81 | echo.
|
| 82 | echo.Use the -c or --clean option to clean up all external library sources
|
| 83 | echo.before pulling in the current versions.
|
| 84 | echo.
|
| 85 | echo.Use the --clean-only option to do the same cleaning, without pulling in
|
| 86 | echo.anything new.
|
| 87 | echo.
|
| 88 | echo.Only the first argument is checked, all others are ignored.
|
| 89 | echo.
|
| 90 | echo.**WARNING**: the cleaning options unconditionally remove any directory
|
| 91 | echo.that is a child of
|
| 92 | echo. %CD%
|
| 93 | echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,
|
| 94 | echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential
|
| 95 | echo.to be very destructive if you are not aware of what it is doing. Use with
|
| 96 | echo.caution!
|
| 97 | popd
|
| 98 | exit /b -1
|
| 99 |
|
| 100 |
|
| 101 | :end
|
| 102 | echo Finished.
|
| 103 | popd
|