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:
authorKacper Michajłow <kasper93@gmail.com>2017-07-20 22:48:55 +0300
committerKacper Michajłow <kasper93@gmail.com>2017-07-22 19:18:13 +0300
commit0bca363728c658ef39f989f6a01ea92534f5c143 (patch)
tree302bec6601a096f8ed0d9b76aa2be3f3bede7c0d
parentd775fc76231d95d7d47c409d80b4d70f442df594 (diff)
Build: Add support for VS2017.
-rw-r--r--.gitignore3
-rwxr-xr-xbuild.bat36
-rw-r--r--common.bat6
-rw-r--r--distrib/mpc-hc_setup.iss11
-rw-r--r--docs/Compilation.md10
-rw-r--r--src/MPCTestAPI/MPCTestAPI.vcxproj1
-rw-r--r--src/MPCTestAPI/MPCTestAPIDlg.cpp7
-rw-r--r--src/common.props11
-rw-r--r--src/filters/transform/VSFilter/installer/vsfilter_setup.iss12
-rw-r--r--src/mpc-hc/AboutDlg.cpp13
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj6
-rw-r--r--src/mpc-hc/mpc-hc.vcxproj16
-rw-r--r--src/mpc-hc/mpciconlib/mpciconlib.vcxproj6
-rw-r--r--src/mpc-hc/mpcresources/mpcresources.vcxproj5
-rw-r--r--src/platform.props6
-rw-r--r--src/thirdparty/DoctorDump/DoctorDump.vcxproj6
-rw-r--r--src/thirdparty/LAVFilters/LAVFilters.vcxproj5
-rwxr-xr-xsrc/thirdparty/LAVFilters/build_ffmpeg.sh6
-rwxr-xr-xsrc/thirdparty/LAVFilters/build_lavfilters.bat30
19 files changed, 164 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore
index be2de54b8..0d6920bea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,9 @@
*.vspx
/.cov/*
/.git-rewrite
+/.vs
/bin
+/bin17
/build.user.bat
/contrib/[Aa][Ss]tyle.exe
/contrib/cov-int
@@ -30,6 +32,7 @@
/src/mpc-hc/mpcresources/tx.exe
/src/mpc-hc/res/mpc-hc.exe.manifest
/src/MPCTestAPI/bin
+/src/MPCTestAPI/bin17
/src/thirdparty/DoctorDump/obj
/src/thirdparty/LAVFilters/obj
ipch
diff --git a/build.bat b/build.bat
index 98d35d6db..fce142a85 100755
--- a/build.bat
+++ b/build.bat
@@ -1,5 +1,5 @@
@ECHO OFF
-REM (C) 2009-2016 see Authors.txt
+REM (C) 2009-2017 see Authors.txt
REM
REM This file is part of MPC-HC.
REM
@@ -17,7 +17,7 @@ REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
-SETLOCAL
+SETLOCAL EnableDelayedExpansion
SET ARG=/%*
SET ARG=%ARG:/=%
@@ -56,6 +56,7 @@ FOR %%G IN (%ARG%) DO (
IF /I "%%G" == "Debug" SET "BUILDCFG=Debug" & SET /A ARGBC+=1 & SET "NO_INST=True"
IF /I "%%G" == "Release" SET "BUILDCFG=Release" & SET /A ARGBC+=1
IF /I "%%G" == "VS2015" SET "COMPILER=VS2015" & SET /A ARGCOMP+=1
+ IF /I "%%G" == "VS2017" SET "COMPILER=VS2017" & SET /A ARGCOMP+=1
IF /I "%%G" == "Packages" SET "PACKAGES=True" & SET /A VALID+=1
IF /I "%%G" == "Installer" SET "INSTALLER=True" & SET /A VALID+=1
IF /I "%%G" == "7z" SET "ZIP=True" & SET /A VALID+=1
@@ -91,9 +92,17 @@ IF /I "%ZIP%" == "True" IF "%NO_ZIP%" == "True" GOTO UnsupportedSwitch
IF /I "%MPCHC_LITE%" == "True" IF "%NO_LITE%" == "True" GOTO UnsupportedSwitch
IF /I "%CLEAN%" == "LAVFilters" IF "%NO_LAV%" == "True" GOTO UnsupportedSwitch
-IF NOT DEFINED VS140COMNTOOLS GOTO MissingVar
-SET "TOOLSET=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
-SET "BIN_DIR=bin"
+IF /I "%COMPILER%" == "VS2017" (
+ IF NOT EXIST "%MPCHC_VS_PATH%" CALL "%COMMON%" :SubDetectVisualStudioPath
+ IF NOT EXIST "!MPCHC_VS_PATH!" GOTO MissingVar
+ SET "TOOLSET=!MPCHC_VS_PATH!\Common7\Tools\vsdevcmd"
+ SET "BIN_DIR=bin17"
+) ELSE (
+ IF NOT DEFINED VS140COMNTOOLS GOTO MissingVar
+ SET "TOOLSET=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
+ SET "BIN_DIR=bin"
+)
+IF NOT EXIST "%TOOLSET%" GOTO MissingVar
IF EXIST "%FILE_DIR%signinfo.txt" (
IF /I "%INSTALLER%" == "True" SET "SIGN=True"
@@ -134,9 +143,12 @@ IF /I "%PPLATFORM%" == "x64" (
IF /I "%CLEAN%" == "LAVFilters" CALL "src\thirdparty\LAVFilters\build_lavfilters.bat" Clean %PPLATFORM% %BUILDCFG% %COMPILER%
IF %ERRORLEVEL% NEQ 0 ENDLOCAL & EXIT /B
-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 "%TOOLSET%" %ARCH%
+IF /I "%PPLATFORM%" == "Win32" (SET ARCH=x86) ELSE (SET ARCH=amd64)
+IF /I "%COMPILER%" == "VS2017" (
+ CALL "%TOOLSET%" -no_logo -arch=%ARCH%
+) ELSE (
+ CALL "%TOOLSET%" %ARCH%
+)
IF %ERRORLEVEL% NEQ 0 GOTO MissingVar
IF /I "%CONFIG%" == "Filters" (
@@ -345,6 +357,9 @@ IF DEFINED MPCHC_LITE (
CALL :SubCopyDXDll %MPCHC_COPY_DX_DLL_ARGS%
+IF /I "%COMPILER%" == "VS2017" (
+ SET MPCHC_INNO_DEF=%MPCHC_INNO_DEF% /DVS2017
+)
CALL "%COMMON%" :SubDetectInnoSetup
IF NOT DEFINED InnoSetupPath (
@@ -398,6 +413,9 @@ IF /I "%BUILDCFG%" == "Debug" (
SET "VS_OUT_DIR=%VS_OUT_DIR%_Debug"
)
+IF /I "%COMPILER%" == "VS2017" (
+ SET "PCKG_NAME=%PCKG_NAME%.%COMPILER%"
+)
IF EXIST "%PCKG_NAME%.7z" DEL "%PCKG_NAME%.7z"
IF EXIST "%PCKG_NAME%.pdb.7z" DEL "%PCKG_NAME%.pdb.7z"
IF EXIST "%PCKG_NAME%" RD /Q /S "%PCKG_NAME%"
@@ -477,7 +495,7 @@ EXIT /B
TITLE %~nx0 Help
ECHO.
ECHO Usage:
-ECHO %~nx0 [Clean^|Build^|Rebuild] [x86^|x64^|Both] [Main^|Resources^|MPCHC^|IconLib^|Translations^|Filters^|API^|All] [Debug^|Release] [Lite] [Packages^|Installer^|7z] [LAVFilters] [VS2015] [Analyze]
+ECHO %~nx0 [Clean^|Build^|Rebuild] [x86^|x64^|Both] [Main^|Resources^|MPCHC^|IconLib^|Translations^|Filters^|API^|All] [Debug^|Release] [Lite] [Packages^|Installer^|7z] [LAVFilters] [VS2015^|VS2017] [Analyze]
ECHO.
ECHO Notes: You can also prefix the commands with "-", "--" or "/".
ECHO Debug only applies to mpc-hc.sln.
diff --git a/common.bat b/common.bat
index 24a4210b8..fb1e07873 100644
--- a/common.bat
+++ b/common.bat
@@ -1,5 +1,5 @@
@ECHO OFF
-REM (C) 2015 see Authors.txt
+REM (C) 2015, 2017 see Authors.txt
REM
REM This file is part of MPC-HC.
REM
@@ -106,6 +106,10 @@ FOR /F "tokens=2*" %%A IN (
REG QUERY "HKLM\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ"') DO SET "SEVENZIP=%%B\7z.exe"
EXIT /B
+:SubDetectVisualStudioPath
+FOR /f "delims=" %%A IN ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -requires Microsoft.VisualStudio.Component.VC.ATLMFC Microsoft.VisualStudio.ComponentGroup.NativeDesktop.WinXP') DO SET MPCHC_VS_PATH=%%A
+EXIT /B
+
:SubMsg
ECHO. & ECHO ------------------------------
IF /I "%~1" == "ERROR" (
diff --git a/distrib/mpc-hc_setup.iss b/distrib/mpc-hc_setup.iss
index 85cf877dc..36d7426a0 100644
--- a/distrib/mpc-hc_setup.iss
+++ b/distrib/mpc-hc_setup.iss
@@ -29,6 +29,7 @@
#endif
; If you want to compile the 64-bit version define "x64build" (uncomment the define below or use build.bat)
+;#define VS2017
;#define x64Build
;#define MPCHC_LITE
@@ -60,7 +61,11 @@
#define app_vername = app_name + " " + app_ver
#define quick_launch "{userappdata}\Microsoft\Internet Explorer\Quick Launch"
-#define base_bindir = "..\bin"
+#if defined(VS2017)
+ #define base_bindir = "..\bin17"
+#else
+ #define base_bindir = "..\bin"
+#endif
#ifdef x64Build
#define bindir = AddBackslash(base_bindir) + "mpc-hc_x64"
@@ -94,6 +99,10 @@
#endif
#endif
+#if defined(VS2017)
+ #define OutFilename = OutFilename + ".VS2017"
+#endif
+
#if MPC_NIGHTLY_RELEASE
#define FullAppNameVer = app_vername + " " + "(" + str(MPCHC_HASH) + ")"
#else
diff --git a/docs/Compilation.md b/docs/Compilation.md
index b0d498c8a..a0c4e368a 100644
--- a/docs/Compilation.md
+++ b/docs/Compilation.md
@@ -5,9 +5,10 @@ For up to date instructions on how to compile mpc-hc visit the wiki page: <https
## Part A: Preparing the Visual Studio environment
-### Visual Studio 2015
+### Visual Studio 2015 or 2017
-1. Install Visual C++ 2015, part of Visual Studio 2015 (any edition will work fine)
+1. Install Visual C++, part of Visual Studio (any edition will work fine).
+ Make sure to select Windows XP and ATL/MFC support during installation.
2. Make sure you have installed all available updates from Microsoft Update
3. Install the DirectX SDK (June 2010) → <https://go.microsoft.com/fwlink/?LinkID=71193>
@@ -31,6 +32,11 @@ For up to date instructions on how to compile mpc-hc visit the wiki page: <https
### NOTES
+* For Visual Studio 2017, we will try to detect the VS installation path automatically.
+ If that fails you need to specify the instalation path yourself. For example:
+ ```bat
+ SET "MPCHC_VS_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\"
+ ```
* If you installed the MSYS/MinGW package in another directory you will have to use that path in the previous steps.
* If you don't have Git installed then the revision number will be a hard-coded one, like 1.6.3.0.
diff --git a/src/MPCTestAPI/MPCTestAPI.vcxproj b/src/MPCTestAPI/MPCTestAPI.vcxproj
index 51c325e84..821be34cc 100644
--- a/src/MPCTestAPI/MPCTestAPI.vcxproj
+++ b/src/MPCTestAPI/MPCTestAPI.vcxproj
@@ -41,6 +41,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)bin\$(Configuration)_$(Platform)\</OutDir>
+ <OutDir Condition="'$(PlatformToolsetVersion)'=='141'">$(SolutionDir)bin17\$(Configuration)_$(Platform)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
diff --git a/src/MPCTestAPI/MPCTestAPIDlg.cpp b/src/MPCTestAPI/MPCTestAPIDlg.cpp
index 6a286e6e5..5cca9300e 100644
--- a/src/MPCTestAPI/MPCTestAPIDlg.cpp
+++ b/src/MPCTestAPI/MPCTestAPIDlg.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2008-2015 see Authors.txt
+ * (C) 2008-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -164,7 +164,12 @@ BOOL CRegisterCopyDataDlg::OnInitDialog()
// TODO: Add extra initialization here
+#if (_MSC_VER == 1910)
+ m_strMPCPath = _T("..\\..\\..\\..\\bin17\\");
+#else
m_strMPCPath = _T("..\\..\\..\\..\\bin\\");
+#endif
+
#if defined(_WIN64)
m_strMPCPath += _T("mpc-hc_x64");
#else
diff --git a/src/common.props b/src/common.props
index 425131ec9..24d0deffd 100644
--- a/src/common.props
+++ b/src/common.props
@@ -10,9 +10,18 @@
<LinkIncremental Condition="$(Configuration.Contains('Debug'))">true</LinkIncremental>
<LinkIncremental Condition="$(Configuration.Contains('Release'))">false</LinkIncremental>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <IntDir>$(SolutionDir)bin17\obj\$(Configuration)_$(PlatformName)\$(ProjectName)\</IntDir>
+ <OutDir>$(SolutionDir)bin17\lib\$(Configuration)_$(PlatformName)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">$(SolutionDir)bin17\Filters_x86_Debug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">$(SolutionDir)bin17\Filters_x64_Debug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">$(SolutionDir)bin17\Filters_x86\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">$(SolutionDir)bin17\Filters_x64\</OutDir>
+ <UseCommonOutputDirectory>True</UseCommonOutputDirectory>
+ </PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <AdditionalOptions>/w34701 /w34706 /Zo /std:c++latest /Zc:throwingNew /Zc:rvalueCast /Gw %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions>/w34701 /w34706 /wd4840 /Zo /std:c++latest /Zc:throwingNew /Zc:rvalueCast /Gw %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(ANALYZE)'=='true'">/wd4005 /wd6031 /wd6246 /wd6309 /wd6387 /wd28204 %(AdditionalOptions)</AdditionalOptions>
<EnablePREfast Condition="'$(ANALYZE)'=='true'">true</EnablePREfast>
<BufferSecurityCheck>true</BufferSecurityCheck>
diff --git a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
index ffa192b7e..e1e993806 100644
--- a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
+++ b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
@@ -26,6 +26,7 @@
; If you want to compile the 64-bit version define "x64Build" (uncomment the define below or use build.bat)
#define sse2_required
+;#define VS2017
;#define x64Build
@@ -43,7 +44,11 @@
#define app_vername = app_name + " " + app_version
#define quick_launch "{userappdata}\Microsoft\Internet Explorer\Quick Launch"
-#define base_bindir = AddBackslash(top_dir) + "bin"
+#if defined(VS2017)
+ #define base_bindir = AddBackslash(top_dir) + "bin17"
+#else
+ #define base_bindir = AddBackslash(top_dir) + "bin"
+#endif
#ifdef x64Build
#define bindir = AddBackslash(base_bindir) + "Filters_x64"
@@ -66,6 +71,11 @@
#if MPC_NIGHTLY_RELEASE
#define FullAppNameVer = FullAppNameVer + " " + str(MPC_VERSION_NIGHTLY)
#endif
+
+#if defined(VS2015)
+ #define FullAppNameVer = FullAppNameVer + " VS2015"
+#endif
+
#ifdef x64Build
#define FullAppNameVer = FullAppNameVer + " " + "(64-bit)"
#endif
diff --git a/src/mpc-hc/AboutDlg.cpp b/src/mpc-hc/AboutDlg.cpp
index 73dcd1810..b4e3afad6 100644
--- a/src/mpc-hc/AboutDlg.cpp
+++ b/src/mpc-hc/AboutDlg.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2012-2016 see Authors.txt
+ * (C) 2012-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -94,7 +94,16 @@ BOOL CAboutDlg::OnInitDialog()
#error Compiler is not supported!
#endif
#elif defined(_MSC_VER)
-#if (_MSC_VER == 1900) // 2015
+#if (_MSC_VER == 1910) // 2017
+#if (_MSC_FULL_VER == 191025017)
+ m_MPCCompiler = _T("MSVC 2017");
+#else
+ m_MPCCompiler.Format(_T("MSVC v%.2d.%.2d.%.5d"), _MSC_VER / 100, _MSC_VER % 100, _MSC_FULL_VER % 100000);
+#if _MSC_BUILD
+ m_MPCCompiler.AppendFormat(_T(".%.2d"), _MSC_BUILD);
+#endif
+#endif
+#elif (_MSC_VER == 1900) // 2015
#if (_MSC_FULL_VER == 190024210)
m_MPCCompiler = _T("MSVC 2015 Update 3");
#elif (_MSC_FULL_VER == 190023918)
diff --git a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj
index 7823eaba8..f0b4c82d6 100644
--- a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj
@@ -44,6 +44,12 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\mpc-hc_x64\CrashReporter\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(SolutionDir)bin\mpc-hc_x64 Lite\CrashReporter\</OutDir>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin17\mpc-hc_x86\CrashReporter\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|Win32'">$(SolutionDir)bin17\mpc-hc_x86 Lite\CrashReporter\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin17\mpc-hc_x64\CrashReporter\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(SolutionDir)bin17\mpc-hc_x64 Lite\CrashReporter\</OutDir>
+ </PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
diff --git a/src/mpc-hc/mpc-hc.vcxproj b/src/mpc-hc/mpc-hc.vcxproj
index f696c4be8..b63b403ba 100644
--- a/src/mpc-hc/mpc-hc.vcxproj
+++ b/src/mpc-hc/mpc-hc.vcxproj
@@ -66,6 +66,16 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(SolutionDir)bin\mpc-hc_x64 Lite\</OutDir>
<TargetName Condition="'$(Platform)'=='x64'">$(ProjectName)64</TargetName>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin17\mpc-hc_x86_$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lite|Win32'">$(SolutionDir)bin17\mpc-hc_x86_$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin17\mpc-hc_x64_$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lite|x64'">$(SolutionDir)bin17\mpc-hc_x64_$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin17\mpc-hc_x86\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|Win32'">$(SolutionDir)bin17\mpc-hc_x86 Lite\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin17\mpc-hc_x64\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(SolutionDir)bin17\mpc-hc_x64 Lite\</OutDir>
+ </PropertyGroup>
<ItemDefinitionGroup>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -97,12 +107,14 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="$(Configuration.Contains('Release'))">
<Link>
- <AdditionalLibraryDirectories>$(SolutionDir)bin\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolsetVersion)'!='141'">$(SolutionDir)bin\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolsetVersion)'=='141'">$(SolutionDir)bin17\lib\Release_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="$(Configuration.Contains('Debug'))">
<Link>
- <AdditionalLibraryDirectories>$(SolutionDir)bin\lib\Debug_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolsetVersion)'!='141'">$(SolutionDir)bin\lib\Debug_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolsetVersion)'=='141'">$(SolutionDir)bin17\lib\Debug_$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="$(Configuration.Contains('Lite'))">
diff --git a/src/mpc-hc/mpciconlib/mpciconlib.vcxproj b/src/mpc-hc/mpciconlib/mpciconlib.vcxproj
index 2cea33485..27378687d 100644
--- a/src/mpc-hc/mpciconlib/mpciconlib.vcxproj
+++ b/src/mpc-hc/mpciconlib/mpciconlib.vcxproj
@@ -34,6 +34,10 @@
<OutDir Condition="'$(Platform)'=='Win32'">$(SolutionDir)bin\mpc-hc_x86\</OutDir>
<OutDir Condition="'$(Platform)'=='x64'">$(SolutionDir)bin\mpc-hc_x64\</OutDir>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <OutDir Condition="'$(Platform)'=='Win32'">$(SolutionDir)bin17\mpc-hc_x86\</OutDir>
+ <OutDir Condition="'$(Platform)'=='x64'">$(SolutionDir)bin17\mpc-hc_x64\</OutDir>
+ </PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -41,7 +45,7 @@
<Link>
<NoEntryPoint>true</NoEntryPoint>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
- <AdditionalDependencies>libcmt.lib;libvcruntime.lib;libucrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libucrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\include</AdditionalIncludeDirectories>
diff --git a/src/mpc-hc/mpcresources/mpcresources.vcxproj b/src/mpc-hc/mpcresources/mpcresources.vcxproj
index 16cc6426c..53260fa69 100644
--- a/src/mpc-hc/mpcresources/mpcresources.vcxproj
+++ b/src/mpc-hc/mpcresources/mpcresources.vcxproj
@@ -405,6 +405,11 @@
<TargetName Condition="'$(Configuration)'=='Release Ukrainian'">$(ProjectName).uk</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Vietnamese'">$(ProjectName).vi</TargetName>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <OutDir Condition="'$(Platform)'=='Win32'">$(SolutionDir)bin17\mpc-hc_x86\Lang\</OutDir>
+ <OutDir Condition="'$(Platform)'=='x64'">$(SolutionDir)bin17\mpc-hc_x64\Lang\</OutDir>
+ <IntDir>$(SolutionDir)bin17\obj\Release_$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ </PropertyGroup>
<ItemDefinitionGroup>
<Lib>
<LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
diff --git a/src/platform.props b/src/platform.props
index 48a049b28..bf8e06930 100644
--- a/src/platform.props
+++ b/src/platform.props
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="Configuration">
+ <PropertyGroup Label="Configuration" Condition="'$(VisualStudioVersion)' == '14.0'">
<PlatformToolset Condition="'$(ANALYZE)'!='true'">v140_xp</PlatformToolset>
<PlatformToolset Condition="'$(ANALYZE)'=='true'">v140</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(VisualStudioVersion)' == '15.0'">
+ <PlatformToolset Condition="'$(ANALYZE)'!='true'">v141_xp</PlatformToolset>
+ <PlatformToolset Condition="'$(ANALYZE)'=='true'">v141</PlatformToolset>
+ </PropertyGroup>
</Project>
diff --git a/src/thirdparty/DoctorDump/DoctorDump.vcxproj b/src/thirdparty/DoctorDump/DoctorDump.vcxproj
index e72157f9a..7f97e6b20 100644
--- a/src/thirdparty/DoctorDump/DoctorDump.vcxproj
+++ b/src/thirdparty/DoctorDump/DoctorDump.vcxproj
@@ -44,6 +44,12 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\mpc-hc_x64\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(SolutionDir)bin\mpc-hc_x64 Lite\</OutDir>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin17\mpc-hc_x86\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|Win32'">$(SolutionDir)bin17\mpc-hc_x86 Lite\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin17\mpc-hc_x64\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(SolutionDir)bin17\mpc-hc_x64 Lite\</OutDir>
+ </PropertyGroup>
<PropertyGroup>
<BaseIntermediateOutputPath>$(IntDir)</BaseIntermediateOutputPath>
<NMakeBuildCommandLine>$(ProjectDir)deploy.bat $(Platform) "$(OutDir)"</NMakeBuildCommandLine>
diff --git a/src/thirdparty/LAVFilters/LAVFilters.vcxproj b/src/thirdparty/LAVFilters/LAVFilters.vcxproj
index b1db2b29d..67928deb9 100644
--- a/src/thirdparty/LAVFilters/LAVFilters.vcxproj
+++ b/src/thirdparty/LAVFilters/LAVFilters.vcxproj
@@ -43,6 +43,11 @@
<NMakeReBuildCommandLine>build_lavfilters.bat Rebuild $(Platform) $(Configuration) Silent Nocolors</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>build_lavfilters.bat Clean $(Platform) $(Configuration) Silent Nocolors</NMakeCleanCommandLine>
</PropertyGroup>
+ <PropertyGroup Condition="'$(PlatformToolsetVersion)'=='141'">
+ <NMakeBuildCommandLine>build_lavfilters.bat Build $(Platform) $(Configuration) VS2017 Silent Nocolors</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>build_lavfilters.bat Rebuild $(Platform) $(Configuration) VS2017 Silent Nocolors</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>build_lavfilters.bat Clean $(Platform) $(Configuration) VS2017 Silent Nocolors</NMakeCleanCommandLine>
+ </PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/src/thirdparty/LAVFilters/build_ffmpeg.sh b/src/thirdparty/LAVFilters/build_ffmpeg.sh
index 93d5af4e7..d0af9d28f 100755
--- a/src/thirdparty/LAVFilters/build_ffmpeg.sh
+++ b/src/thirdparty/LAVFilters/build_ffmpeg.sh
@@ -3,7 +3,11 @@
echo "$(pwd)" | grep -q '[[:blank:]]' &&
echo "Out of tree builds are impossible with whitespace in source path." && exit 1
-bin_folder=bin
+if [ "${4}" == "VS2017" ]; then
+ bin_folder=bin17
+else
+ bin_folder=bin
+fi
if [ "${1}" == "x64" ]; then
arch=x86_64
diff --git a/src/thirdparty/LAVFilters/build_lavfilters.bat b/src/thirdparty/LAVFilters/build_lavfilters.bat
index dcfde96dd..32874b344 100755
--- a/src/thirdparty/LAVFilters/build_lavfilters.bat
+++ b/src/thirdparty/LAVFilters/build_lavfilters.bat
@@ -1,5 +1,5 @@
@ECHO OFF
-REM (C) 2013-2016 see Authors.txt
+REM (C) 2013-2017 see Authors.txt
REM
REM This file is part of MPC-HC.
REM
@@ -17,7 +17,7 @@ REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
-SETLOCAL
+SETLOCAL EnableDelayedExpansion
SET "FILE_DIR=%~dp0"
PUSHD "%FILE_DIR%"
@@ -53,6 +53,7 @@ FOR %%G IN (%ARG%) DO (
IF /I "%%G" == "Debug" SET "RELEASETYPE=Debug" & SET /A ARGBC+=1
IF /I "%%G" == "Release" SET "RELEASETYPE=Release" & SET /A ARGBC+=1
IF /I "%%G" == "VS2015" SET "COMPILER=VS2015" & SET /A ARGCOMP+=1
+ IF /I "%%G" == "VS2017" SET "COMPILER=VS2017" & SET /A ARGCOMP+=1
IF /I "%%G" == "Silent" SET "SILENT=True" & SET /A VALID+=1
IF /I "%%G" == "Nocolors" SET "NOCOLORS=True" & SET /A VALID+=1
)
@@ -67,9 +68,17 @@ IF %ARGPL% GTR 1 (GOTO UnsupportedSwitch) ELSE IF %ARGPL% == 0 (SET "ARCH=Bo
IF %ARGBC% GTR 1 (GOTO UnsupportedSwitch) ELSE IF %ARGBC% == 0 (SET "RELEASETYPE=Release")
IF %ARGCOMP% GTR 1 (GOTO UnsupportedSwitch) ELSE IF %ARGCOMP% == 0 (SET "COMPILER=VS2015")
-IF NOT DEFINED VS140COMNTOOLS GOTO MissingVar
-SET "TOOLSET=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
-SET "BIN_DIR=%ROOT_DIR%\bin"
+IF /I "%COMPILER%" == "VS2017" (
+ IF NOT EXIST "%MPCHC_VS_PATH%" CALL "%COMMON%" :SubDetectVisualStudioPath
+ IF NOT EXIST "!MPCHC_VS_PATH!" GOTO MissingVar
+ SET "TOOLSET=!MPCHC_VS_PATH!\Common7\Tools\vsdevcmd"
+ SET "BIN_DIR=%ROOT_DIR%\bin17"
+) ELSE (
+ IF NOT DEFINED VS140COMNTOOLS GOTO MissingVar
+ SET "TOOLSET=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
+ SET "BIN_DIR=%ROOT_DIR%\bin"
+)
+IF NOT EXIST "%TOOLSET%" GOTO MissingVar
IF /I "%ARCH%" == "Both" (
SET "ARCH=x86" & CALL :Main
@@ -83,9 +92,12 @@ GOTO End
:Main
IF %ERRORLEVEL% NEQ 0 EXIT /B
-REM Always use x86_amd64 compiler, even on 64bit windows, because this is what VS is doing
-IF /I "%ARCH%" == "x86" (SET TOOLSETARCH=x86) ELSE (SET TOOLSETARCH=x86_amd64)
-CALL "%TOOLSET%" %TOOLSETARCH%
+IF /I "%ARCH%" == "x86" (SET TOOLSETARCH=x86) ELSE (SET TOOLSETARCH=amd64)
+IF /I "%COMPILER%" == "VS2017" (
+ CALL "%TOOLSET%" -no_logo -arch=%TOOLSETARCH%
+) ELSE (
+ CALL "%TOOLSET%" %TOOLSETARCH%
+)
SET START_TIME=%TIME%
SET START_DATE=%DATE%
@@ -203,7 +215,7 @@ CALL "%COMMON%" :SubMsg "ERROR" "LAV Filters compilation failed!" & EXIT /B 1
TITLE %~nx0 Help
ECHO.
ECHO Usage:
-ECHO %~nx0 [Clean^|Build^|Rebuild] [x86^|x64^|Both] [Debug^|Release] [VS2015]
+ECHO %~nx0 [Clean^|Build^|Rebuild] [x86^|x64^|Both] [Debug^|Release] [VS2015^|VS2017]
ECHO.
ECHO Notes: You can also prefix the commands with "-", "--" or "/".
ECHO The arguments are not case sensitive and can be ommitted.