Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ if test -z "$TARGET_ARCH"; then
esac
fi

# Location of Perl when running Windows builds
WIN_PERL=${WIN_PERL:-"C:/perl/bin/perl.exe"}

# Android default settings and tools
ANDROID_BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-22.0.1}
ANDROID_JAVA_SDK=${ANDROID_JAVA_SDK:-${JAVA_SDK:-/usr/lib/jvm/java-7-openjdk-amd64}}
Expand Down Expand Up @@ -310,7 +313,8 @@ case ${OS} in
"-Gandroid_ndk_version=${ANDROID_NDK_VERSION}" "$@"
;;
win)
invoke_gyp $basic_args "-Gmsvs_version=${WIN_MSVS_VERSION}" "$@"
invoke_gyp $basic_args "-Gmsvs_version=${WIN_MSVS_VERSION}" \
"-Dperl=${WIN_PERL}" "$@"
;;
mac|ios)
invoke_gyp $basic_args "-DOS=${OS}" \
Expand Down
13 changes: 1 addition & 12 deletions config/perl.gypi
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
{
'variables':
{
'conditions':
[
[
'host_os == "win"',
{
'perl': [ 'C:/perl/bin/perl.exe' ],
},
{
'perl': [ 'perl' ],
},
],
],
'perl%': [ 'perl' ],
},
}
6 changes: 3 additions & 3 deletions config/win32.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
'variables':
{
# Path to the Windows SDK for Apple QuickTime
'quicktime_sdk': '$(foo)C:/Program Files/QuickTime SDK',
'quicktime_sdk%': '$(foo)C:/Program Files/QuickTime SDK',

# Path to versions 4 and 5 of the Microsoft Speech SDK
'ms_speech_sdk4': '$(foo)C:/Program Files/Microsoft Speech SDK',
'ms_speech_sdk5': '$(foo)C:/Program Files/Microsoft Speech SDK 5.1',
'ms_speech_sdk4%': '$(foo)C:/Program Files/Microsoft Speech SDK',
'ms_speech_sdk5%': '$(foo)C:/Program Files/Microsoft Speech SDK 5.1',

'output_dir': '../win-<(target_arch)-bin',
},
Expand Down
79 changes: 78 additions & 1 deletion configure.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,80 @@
python.exe gyp\gyp_main.py --format msvs --depth . --generator-output build-win-x86/livecode -Gmsvs_version=2010
@echo off
REM Configures the Windows build

SETLOCAL EnableExtensions

REM Set this variable if any warnings have been reported
SET warnings=0

REM Not all versions of windows the the %programfiles(x86)% variable
IF NOT DEFINED programfiles(x86) SET programfiles(x86)=%programfiles%

REM Note: to test whether a directory exists in batch script, you need to check
REM whether a file within that directory exists. Easiest way to do this is to
REM add the "*" wildcard after the directory

REM Attempt to locate a copy of Perl
WHERE /Q perl 1>NUL 2>NUL
IF %ERRORLEVEL% NEQ 0 (
IF EXIST C:\perl64\bin\perl.exe (
SET extra_options=%extra_options% -Dperl="C:/perl64/bin/perl.exe"
) ELSE IF EXIST C:\perl\bin\perl.exe (
SET extra_options=%extra_options% -Dperl="C:/perl/bin/perl.exe"
) ELSE (
ECHO >&2 Error: could not locate a copy of perl
PAUSE
EXIT 1
)
)

REM Attempt to locate a copy of Python
WHERE /Q python 1>NUL 2>NUL
IF %ERRORLEVEL% NEQ 0 (
IF EXIST C:\Python27\python.exe (
SET python=C:\Python27\python.exe
) ELSE IF EXIST C:\Python26\python.exe (
SET python=C:\Python26\python.exe
) ELSE (
ECHO >&2 Error: could not locate a copy of python
PAUSE
EXIT 1
)
) ELSE (
SET python=python
)

REM Attempt to locate the QuickTime SDK
IF EXIST "%programfiles(x86)%\QuickTime SDK\*" (
SET extra_options=%extra_options% -Dquicktime_sdk="%programfiles(x86)%/QuickTime SDK"
) ELSE (
ECHO >&2 Error: could not locate the QuickTime SDK
PAUSE
EXIT 1
)

REM Attempt to locate the Microsoft Speech SDK v5.1
IF EXIST "%programfiles(x86)%\Microsoft Speech SDK 5.1\*" (
SET extra_options=%extra_options% -Dms_speech_sdk5="%programfiles(x86)%/Microsoft Speech SDK 5.1"
) ELSE (
ECHO >&2 Warning: could not locate the Microsoft Speech SDK v5.1; revSpeech will not build
SET warnings=1
)

REM Attempt to locate the Microsoft Speech SDK v4
IF EXIST "%programfiles(x86)%\Microsoft Speech SDK\*" (
SET extra_options=%extra_options% -Dms_speech_sdk4="%programfiles(x86)%/Microsoft Speech SDK"
) ELSE (
ECHO >&2 Warning: could not locate the Microsoft Speech SDK v4; revSpeech will not build
SET warnings=1
)

REM Pause so any warnings can be seen
IF %warnings% NEQ 0 PAUSE

REM Run the configure step
%python% gyp\gyp_main.py --format msvs --depth . --generator-output build-win-x86/livecode -Gmsvs_version=2010 %extra_options%

REM Pause if there was an error so that the user gets a chance to see it
IF %ERRORLEVEL% NEQ 0 PAUSE
EXIT %ERRORLEVEL%