@@ -9,6 +9,19 @@ SET warnings=0
99REM Not all versions of windows the the %programfiles(x86)% variable
1010IF NOT DEFINED programfiles(x86) SET programfiles(x86) = %programfiles%
1111
12+ REM When calling configure.bat from the command line, BUILD_EDITION is not defined
13+ IF NOT DEFINED BUILD_EDITION SET BUILD_EDITION = " community"
14+
15+ REM Target architecture currently defaults to 32-bit x86
16+ IF NOT DEFINED TARGET_ARCH SET TARGET_ARCH = x86
17+
18+ REM The internal MSVC/Gyp name for x86_64 is x64
19+ IF %TARGET_ARCH% == x86_64 (
20+ SET MSVC_ARCH = x64
21+ ) ELSE (
22+ SET MSVC_ARCH = %TARGET_ARCH%
23+ )
24+
1225REM Note: to test whether a directory exists in batch script, you need to check
1326REM whether a file within that directory exists. Easiest way to do this is to
1427REM add the "*" wildcard after the directory
@@ -23,21 +36,12 @@ IF %ERRORLEVEL% NEQ 0 (
2336 ) ELSE (
2437 ECHO >& 2 Error: could not locate a copy of python
2538 PAUSE
26- EXIT 1
39+ EXIT /B 1
2740 )
2841) ELSE (
2942 SET python = python
3043)
3144
32- REM Attempt to locate the QuickTime SDK
33- IF EXIST " %programfiles(x86)% \QuickTime SDK\*" (
34- SET extra_options = %extra_options% -Dquicktime_sdk=" %programfiles(x86)% /QuickTime SDK"
35- ) ELSE (
36- ECHO >& 2 Error: could not locate the QuickTime SDK
37- PAUSE
38- EXIT 1
39- )
40-
4145REM Attempt to locate the Microsoft Speech SDK v5.1
4246IF EXIST " %programfiles(x86)% \Microsoft Speech SDK 5.1\*" (
4347 SET extra_options = %extra_options% -Dms_speech_sdk5=" %programfiles(x86)% /Microsoft Speech SDK 5.1"
@@ -46,21 +50,13 @@ IF EXIST "%programfiles(x86)%\Microsoft Speech SDK 5.1\*" (
4650 SET warnings = 1
4751)
4852
49- REM Attempt to locate the Microsoft Speech SDK v4
50- IF EXIST " %programfiles(x86)% \Microsoft Speech SDK\*" (
51- SET extra_options = %extra_options% -Dms_speech_sdk4=" %programfiles(x86)% /Microsoft Speech SDK"
52- ) ELSE (
53- ECHO >& 2 Warning: could not locate the Microsoft Speech SDK v4; revSpeech will not build
54- SET warnings = 1
55- )
56-
5753REM Pause so any warnings can be seen
5854IF %warnings% NEQ 0 PAUSE
5955
6056REM Run the configure step
61- %python% config.py --platform win-x86 %extra_options% %gypfile%
57+ %python% config.py --platform win-x86 -Dtarget_arch= %MSVC_ARCH% %extra_options% %gypfile%
6258PAUSE
6359
6460REM Pause if there was an error so that the user gets a chance to see it
6561IF %ERRORLEVEL% NEQ 0 PAUSE
66- EXIT %ERRORLEVEL%
62+ EXIT /B %ERRORLEVEL%
0 commit comments