|
1 | | -python.exe gyp\gyp_main.py --format msvs --depth . --generator-output build-win-x86/livecode -Gmsvs_version=2010 |
| 1 | +@echo off |
| 2 | +REM Configures the Windows build |
| 3 | + |
| 4 | +SETLOCAL EnableExtensions |
| 5 | + |
| 6 | +REM Set this variable if any warnings have been reported |
| 7 | +SET warnings=0 |
| 8 | + |
| 9 | +REM Not all versions of windows the the %programfiles(x86)% variable |
| 10 | +IF NOT DEFINED programfiles(x86) SET programfiles(x86)=%programfiles% |
| 11 | + |
| 12 | +REM Note: to test whether a directory exists in batch script, you need to check |
| 13 | +REM whether a file within that directory exists. Easiest way to do this is to |
| 14 | +REM add the "*" wildcard after the directory |
| 15 | + |
| 16 | +REM Attempt to locate a copy of Perl |
| 17 | +WHERE /Q perl 1>NUL 2>NUL |
| 18 | +IF %ERRORLEVEL% NEQ 0 ( |
| 19 | + IF EXIST C:\perl64\bin\perl.exe ( |
| 20 | + SET extra_options=%extra_options% -Dperl="C:/perl64/bin/perl.exe" |
| 21 | + ) ELSE IF EXIST C:\perl\bin\perl.exe ( |
| 22 | + SET extra_options=%extra_options% -Dperl="C:/perl/bin/perl.exe" |
| 23 | + ) ELSE ( |
| 24 | + ECHO >&2 Error: could not locate a copy of perl |
| 25 | + PAUSE |
| 26 | + EXIT 1 |
| 27 | + ) |
| 28 | +) |
| 29 | + |
| 30 | +REM Attempt to locate a copy of Python |
| 31 | +WHERE /Q python 1>NUL 2>NUL |
| 32 | +IF %ERRORLEVEL% NEQ 0 ( |
| 33 | + IF EXIST C:\Python27\python.exe ( |
| 34 | + SET python=C:\Python27\python.exe |
| 35 | + ) ELSE IF EXIST C:\Python26\python.exe ( |
| 36 | + SET python=C:\Python26\python.exe |
| 37 | + ) ELSE ( |
| 38 | + ECHO >&2 Error: could not locate a copy of python |
| 39 | + PAUSE |
| 40 | + EXIT 1 |
| 41 | + ) |
| 42 | +) ELSE ( |
| 43 | + SET python=python |
| 44 | +) |
| 45 | + |
| 46 | +REM Attempt to locate the QuickTime SDK |
| 47 | +IF EXIST "%programfiles(x86)%\QuickTime SDK\*" ( |
| 48 | + SET extra_options=%extra_options% -Dquicktime_sdk="%programfiles(x86)%/QuickTime SDK" |
| 49 | +) ELSE ( |
| 50 | + ECHO >&2 Error: could not locate the QuickTime SDK |
| 51 | + PAUSE |
| 52 | + EXIT 1 |
| 53 | +) |
| 54 | + |
| 55 | +REM Attempt to locate the Microsoft Speech SDK v5.1 |
| 56 | +IF EXIST "%programfiles(x86)%\Microsoft Speech SDK 5.1\*" ( |
| 57 | + SET extra_options=%extra_options% -Dms_speech_sdk5="%programfiles(x86)%/Microsoft Speech SDK 5.1" |
| 58 | +) ELSE ( |
| 59 | + ECHO >&2 Warning: could not locate the Microsoft Speech SDK v5.1; revSpeech will not build |
| 60 | + SET warnings=1 |
| 61 | +) |
| 62 | + |
| 63 | +REM Attempt to locate the Microsoft Speech SDK v4 |
| 64 | +IF EXIST "%programfiles(x86)%\Microsoft Speech SDK\*" ( |
| 65 | + SET extra_options=%extra_options% -Dms_speech_sdk4="%programfiles(x86)%/Microsoft Speech SDK" |
| 66 | +) ELSE ( |
| 67 | + ECHO >&2 Warning: could not locate the Microsoft Speech SDK v4; revSpeech will not build |
| 68 | + SET warnings=1 |
| 69 | +) |
| 70 | + |
| 71 | +REM Pause so any warnings can be seen |
| 72 | +IF %warnings% NEQ 0 PAUSE |
| 73 | + |
| 74 | +REM Run the configure step |
| 75 | +%python% gyp\gyp_main.py --format msvs --depth . --generator-output build-win-x86/livecode -Gmsvs_version=2010 %extra_options% |
| 76 | + |
| 77 | +REM Pause if there was an error so that the user gets a chance to see it |
| 78 | +IF %ERRORLEVEL% NEQ 0 PAUSE |
2 | 79 | EXIT %ERRORLEVEL% |
3 | 80 |
|
0 commit comments