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

Commit 4196d18

Browse files
committed
build: Deal with missing %ProgramFiles(x86)% in Wine
When compiling on Windows x64, the PATH must be constructed using the 32-bit version of the "Program Files" directory. Normally, this can be located using the `%ProgramFiles(x86)%` environment variable. Unfortunately, Wine's CMD implementation really doesn't like environment variables with parentheses in. Try and guess a suitable directory be another means.
1 parent f85a686 commit 4196d18

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

make.cmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
@REM Make sure ProgramFiles(x86) variable is defined
2+
@SET "ProgramFilesBase=%ProgramFiles% (x86)"
3+
@IF NOT EXIST "%ProgramFilesBase%" (
4+
SET "ProgramFilesBase=%ProgramFiles%"
5+
)
6+
7+
ECHO %ProgramFilesBase%
8+
19
@REM Set up environment so that we can run Visual Studio.
210
@REM More-or-less the same effect as running vcvars32.bat
311
@REM from the Visual Studio source tree.
412
@REM @call vcvars32
5-
@set "PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VSTSDB\Deploy;%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\;%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\BIN;%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.5;%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\VCPackages;%ProgramFiles(x86)%\HTML Help Workshop;%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.0A\bin\NETFX 4.0 Tools;%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.0A\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Perl\site\bin;C:\Perl\bin;C:\windows\system32;C:\windows;C:\windows\system32\wbem"
13+
@set "PATH=%ProgramFilesBase%\Microsoft Visual Studio 10.0\VSTSDB\Deploy;%ProgramFilesBase%\Microsoft Visual Studio 10.0\Common7\IDE\;%ProgramFilesBase%\Microsoft Visual Studio 10.0\VC\BIN;%ProgramFilesBase%\Microsoft Visual Studio 10.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.5;%ProgramFilesBase%\Microsoft Visual Studio 10.0\VC\VCPackages;%ProgramFilesBase%\HTML Help Workshop;%ProgramFilesBase%\Microsoft SDKs\Windows\7.0A\bin\NETFX 4.0 Tools;%ProgramFilesBase%\Microsoft SDKs\Windows\7.0A\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Perl\site\bin;C:\Perl\bin;C:\windows\system32;C:\windows;C:\windows\system32\wbem"
614

715
@REM Works around hangs when generating .pdb files
816
@REM Needs to run in the background as never terminates

0 commit comments

Comments
 (0)