Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 47ffb18

Browse files
Improve the Windows configure script to detect Python and Perl itself
1 parent 7f9b0b8 commit 47ffb18

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

configure.bat

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
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 Attempt to locate a copy of Perl
7+
WHERE /Q perl 1>NUL 2>NUL
8+
IF %ERRORLEVEL% NEQ 0 (
9+
IF EXIST C:\perl64\bin\perl.exe (
10+
SET extra_options=%extra_options% -Dperl="C:/perl64/bin/perl.exe"
11+
) ELSE IF EXIST C:\perl\bin\perl.exe (
12+
SET extra_options=%extra_options% -Dperl="C:/perl/bin/perl.exe"
13+
) ELSE (
14+
ECHO >&2 Error: could not locate a copy of perl
15+
PAUSE
16+
EXIT 1
17+
)
18+
)
19+
20+
REM Attempt to locate a copy of Python
21+
WHERE /Q python 1>NUL 2>NUL
22+
IF %ERRORLEVEL% NEQ 0 (
23+
IF EXIST C:\Python27\python.exe (
24+
SET python=C:\Python27\python.exe
25+
) ELSE (
26+
ECHO >&2 Error: could not locate a copy of python
27+
PAUSE
28+
EXIT 1
29+
)
30+
) ELSE (
31+
SET python=python
32+
)
33+
34+
REM Run the configure step
35+
%python% gyp\gyp_main.py --format msvs --depth . --generator-output build-win-x86/livecode -Gmsvs_version=2010 %extra_options%
36+
37+
REM Pause if there was an error so that the user gets a chance to see it
38+
IF %ERRORLEVEL% NEQ 0 PAUSE
239
EXIT %ERRORLEVEL%
340

0 commit comments

Comments
 (0)