Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm0viefreak <m0viefreak.cm@googlemail.com>2013-01-08 03:35:41 +0400
committerm0viefreak <m0viefreak.cm@googlemail.com>2013-01-08 03:46:02 +0400
commitad7ec548cf4cc5b6f5bbddf93f00571fb942014a (patch)
treece6ea6eb0ae667ba798d6a28052c064a6e89db1a /build.bat
parent8b84c9599891f451819d3dc20432a829508e47ad (diff)
build.bat: Fix bug introduced by 520944bf5fdf
Commit 520944bf5fdf accidently reversed the if/else-check for InnoSetup and 7z. This caused release packaging to break on both 32bit and 64bit windows. This fix works around this by introducing a new variable %os_type% which stores Win32 or Win64, and uses this to determine the path of InnoSetup and 7z. The variable %x64_type%, which decided on whether to use the amd64 native or the x86_amd64 32bit toolchain for a 64 bit build was removed completely, because visual studio always uses x64_amd64. Hence hardcode this value when setting ARCH=.
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat10
1 files changed, 6 insertions, 4 deletions
diff --git a/build.bat b/build.bat
index 41e319486..c12649175 100644
--- a/build.bat
+++ b/build.bat
@@ -137,7 +137,8 @@ IF %ERRORLEVEL% NEQ 0 EXIT /B
IF /I "%Rebuild%" == "FFmpeg" CALL "src\thirdparty\ffmpeg\gccbuild.bat" Rebuild %PPLATFORM% %BUILDCFG%
IF %ERRORLEVEL% NEQ 0 CALL :SubMsg "ERROR" "Compilation failed!" & EXIT /B
-IF /I "%PPLATFORM%" == "Win32" (SET ARCH=x86) ELSE (SET ARCH=%x64_type%)
+REM Always use x86_amd64 compiler, even on 64bit windows, because this is what VS is doing
+IF /I "%PPLATFORM%" == "Win32" (SET ARCH=x86) ELSE (SET ARCH=x86_amd64)
CALL "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" %ARCH%
IF /I "%CONFIG%" == "Filters" (
@@ -410,14 +411,15 @@ EXIT /B
:SubDetectWinArch
-IF DEFINED PROGRAMFILES(x86) (SET x64_type=x86_amd64)
+REM If "Program Files (x86)" is present, the system is 64 bit, otherwise it is 32 bit
+IF DEFINED PROGRAMFILES(x86) (SET os_type=Win64) ELSE (SET os_type=Win32)
EXIT /B
:SubDetectInnoSetup
REM Detect if we are running on 64bit WIN and use Wow6432Node, and set the path
REM of Inno Setup accordingly since Inno Setup is a 32-bit application
-IF /I "%x64_type%" == "x86_amd64" (
+IF /I "%os_type%" == "Win64" (
SET "U_=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
) ELSE (
SET "U_=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
@@ -439,7 +441,7 @@ IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
FOR %%G IN (7za.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G")
IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
-IF /I "%x64_type%" == "x86_amd64" (
+IF /I "%os_type%" == "Win64" (
FOR /F "delims=" %%G IN (
'REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ"') DO (
SET "SEVENZIP_REG=%%G" & CALL :SubSevenzipPath %%SEVENZIP_REG:*REG_SZ=%%