Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit880365a

Browse files
committed
Turn install.bat into a pure one line wrapper fort he perl script.
Build.bat and vcregress.bat got similar treatment years ago. I'm not surewhy install.bat wasn't treated at the same time, but it seems like a goodidea anyway.The immediate problem with the old install.bat was that it had quotingissues, and wouldn't work if the target directory's name contained spaces.This fixes that problem.I committed this to master yesterday, this is a backpatch of the same forall supported versions.
1 parent68f9e67 commit880365a

File tree

2 files changed

+17
-25
lines changed

2 files changed

+17
-25
lines changed

‎src/tools/msvc/install.bat

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
@echooff
22
REM src/tools/msvc/install.bat
3-
4-
ifNOT"%1"==""GOTO RUN_INSTALL
5-
6-
echo Invalid command line options.
7-
echo Usage:"install.bat <path>"
8-
echo.
9-
REM exit fix for pre-2003 shell especially if used on buildfarm
10-
if"%XP_EXIT_FIX%"=="yes"exit1
11-
exit /b1
12-
13-
:RUN_INSTALL
14-
15-
SETLOCAL
16-
17-
IFNOTEXIST buildenv.plgoto nobuildenv
18-
perl -e"require 'buildenv.pl'; while(($k,$v) = each%%ENV) { print qq[\@SET $k=$v\n]; }"> bldenv.bat
19-
CALL bldenv.bat
20-
del bldenv.bat
21-
:nobuildenv
22-
23-
perl install.pl"%1"
24-
25-
REM exit fix for pre-2003 shell especially if used on buildfarm
26-
if"%XP_EXIT_FIX%"=="yes"exit%ERRORLEVEL%
27-
exit /b%ERRORLEVEL%
3+
REM all the logic for this now belongs in install.pl. This file really
4+
REM only exists so you don't have to type "perl install.pl"
5+
REM Resist any temptation to add any logic here.
6+
@perl install.pl%*

‎src/tools/msvc/install.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88

99
use Installqw(Install);
1010

11+
# buildenv.pl is for specifying the build environment settings
12+
# it should contain lines like:
13+
# $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
14+
15+
if (-e"src/tools/msvc/buildenv.pl")
16+
{
17+
require"src/tools/msvc/buildenv.pl";
18+
}
19+
elsif (-e"./buildenv.pl")
20+
{
21+
require"./buildenv.pl";
22+
}
23+
1124
my$target =shift || Usage();
1225
Install($target);
1326

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp