diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2016-04-02 16:33:03 +0200 |
---|---|---|
committer | Martijn Kaijser <martijn@xbmc.org> | 2016-04-02 16:33:03 +0200 |
commit | 66bf179e916f699f975526eb556d401bd47cc6d5 (patch) | |
tree | caddb51062c317d2e44ebbe15f13a4ba785558ba | |
parent | d2d3fc791e6281360ebc5dd08f6385fa0ec3b38d (diff) | |
parent | cf5c402ee5777b5385d28ee7503e106e59289796 (diff) |
Merge pull request #8992 from Paxxi/vs2015
[win32][xbmc] Upgrade to VS2015
44 files changed, 246 insertions, 352 deletions
diff --git a/.gitignore b/.gitignore index fb8f54922f..3c651afac1 100644 --- a/.gitignore +++ b/.gitignore @@ -549,3 +549,8 @@ lib/cpluff/stamp-h1 # Doxygen generated files /docs/html +system/libmysql.dll +system/python27.dll +system/zlib.dll +lib/addons/library.kodi.inputstream/project/VS2010Express/Debug +lib/addons/library.kodi.inputstream/project/VS2010Express/Release diff --git a/appveyor.yml b/appveyor.yml index 5a795a7d58..af6b01dff6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -os: Visual Studio 2013 +os: Visual Studio 2015 shallow_clone: true @@ -24,7 +24,7 @@ build_script: - ps: $ErrorActionPreference= 'silentlycontinue' # Setup Visual Studio compiler environment - - call "%VS120COMNTOOLS%..\..\VC\bin\vcvars32.bat" + - call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat" # # Build Kodi diff --git a/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj b/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj index 5d4ef8a824..d5fc737230 100644 --- a/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj +++ b/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,10 +21,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -78,4 +80,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> +</Project>
\ No newline at end of file diff --git a/lib/addons/library.kodi.audioengine/project/VS2010Express/libKODI_audioengine.vcxproj b/lib/addons/library.kodi.audioengine/project/VS2010Express/libKODI_audioengine.vcxproj index 9553a5d921..ae5e1cfbe2 100644 --- a/lib/addons/library.kodi.audioengine/project/VS2010Express/libKODI_audioengine.vcxproj +++ b/lib/addons/library.kodi.audioengine/project/VS2010Express/libKODI_audioengine.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -27,10 +27,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj b/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj index 6dc64b3e3c..ae248d8364 100644 --- a/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj +++ b/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -24,10 +24,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/addons/library.kodi.inputstream/project/VS2010Express/libKODI_inputstream.vcxproj b/lib/addons/library.kodi.inputstream/project/VS2010Express/libKODI_inputstream.vcxproj index 51304ea7c6..870a6ac7ce 100644 --- a/lib/addons/library.kodi.inputstream/project/VS2010Express/libKODI_inputstream.vcxproj +++ b/lib/addons/library.kodi.inputstream/project/VS2010Express/libKODI_inputstream.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -24,10 +24,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/lib/addons/library.kodi.peripheral/project/VS2010Express/libKODI_peripheral.vcxproj b/lib/addons/library.kodi.peripheral/project/VS2010Express/libKODI_peripheral.vcxproj index b32a96b682..bc85cca4dc 100644 --- a/lib/addons/library.kodi.peripheral/project/VS2010Express/libKODI_peripheral.vcxproj +++ b/lib/addons/library.kodi.peripheral/project/VS2010Express/libKODI_peripheral.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,10 +21,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/addons/library.xbmc.addon/project/VS2010Express/libXBMC_addon.vcxproj b/lib/addons/library.xbmc.addon/project/VS2010Express/libXBMC_addon.vcxproj index 2aa5f26fa6..52f0e22a22 100644 --- a/lib/addons/library.xbmc.addon/project/VS2010Express/libXBMC_addon.vcxproj +++ b/lib/addons/library.xbmc.addon/project/VS2010Express/libXBMC_addon.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,10 +21,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/addons/library.xbmc.codec/project/VS2010Express/libXBMC_codec.vcxproj b/lib/addons/library.xbmc.codec/project/VS2010Express/libXBMC_codec.vcxproj index 3009b42732..a051f90f78 100644 --- a/lib/addons/library.xbmc.codec/project/VS2010Express/libXBMC_codec.vcxproj +++ b/lib/addons/library.xbmc.codec/project/VS2010Express/libXBMC_codec.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,10 +21,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/addons/library.xbmc.pvr/project/VS2010Express/libXBMC_pvr.vcxproj b/lib/addons/library.xbmc.pvr/project/VS2010Express/libXBMC_pvr.vcxproj index 175f81e0a0..681fab1223 100644 --- a/lib/addons/library.xbmc.pvr/project/VS2010Express/libXBMC_pvr.vcxproj +++ b/lib/addons/library.xbmc.pvr/project/VS2010Express/libXBMC_pvr.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,10 +21,12 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/cpluff/libcpluff/win32/cpluff.vcxproj b/lib/cpluff/libcpluff/win32/cpluff.vcxproj index ffc1b582e3..99fb0f509c 100644 --- a/lib/cpluff/libcpluff/win32/cpluff.vcxproj +++ b/lib/cpluff/libcpluff/win32/cpluff.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -22,11 +22,13 @@ <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/gtest/msvc/gtest.vcxproj b/lib/gtest/msvc/gtest.vcxproj index c2a27117c5..bd245b5e7b 100644 --- a/lib/gtest/msvc/gtest.vcxproj +++ b/lib/gtest/msvc/gtest.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -20,11 +20,13 @@ <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/libexif/libexif.vcxproj b/lib/libexif/libexif.vcxproj index 3eaae7c781..adf0cfc282 100644 --- a/lib/libexif/libexif.vcxproj +++ b/lib/libexif/libexif.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug (DLL)|Win32"> <Configuration>Debug (DLL)</Configuration> @@ -22,11 +22,13 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug (DLL)|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/lib/win32/Effects11/Effects11_2013.vcxproj b/lib/win32/Effects11/Effects11_2013.vcxproj index d9fb5adf5a..d0b8bfff29 100644 --- a/lib/win32/Effects11/Effects11_2013.vcxproj +++ b/lib/win32/Effects11/Effects11_2013.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -31,42 +31,41 @@ <ProjectGuid>{DF460EAB-570D-4B50-9089-2E2FC801BF38}</ProjectGuid> <RootNamespace>Effects11</RootNamespace> <Keyword>Win32Proj</Keyword> - <VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''">$(VCTargetsPath11)</VCTargetsPath> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|X64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|X64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|X64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>v120</PlatformToolset> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings" /> @@ -139,7 +138,7 @@ <AdditionalIncludeDirectories>.\Binary;.\Inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PrecompiledHeaderFile>pchfx.h</PrecompiledHeaderFile> <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions> - <PreprocessorDefinitions>_WIN7_PLATFORM_UPDATE;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_WIN7_PLATFORM_UPDATE;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <PrecompiledHeader>Use</PrecompiledHeader> diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list index 52a89187dd..6210610d7f 100644 --- a/project/BuildDependencies/scripts/0_package.list +++ b/project/BuildDependencies/scripts/0_package.list @@ -7,8 +7,8 @@ ; -> ... ;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER! bzip2-1.0.5-win32.7z -crossguid-8f399e8bd4-win32.7z -curl-7.42.1-win32.7z +crossguid-8f399e-win32-vc140.7z +curl-7.47.1-win32-vc140.7z dnssd-541-win32.zip doxygen-1.8.2-win32.7z fontconfig-2.8.0-win32.7z @@ -22,17 +22,15 @@ libcec-3.0.0-win32-2.7z libexpat_2.0.1-win32.7z libflac-1.2.1-win32.7z libfribidi-0.19.2-win32.7z -libiconv-1.14-win32-vc120.7z +libiconv-1.14-win32-vc140.7z libjpeg-turbo-1.2.0-win32.7z liblzo-2.04-win32.7z -libmicrohttpd-svn-35533-win32-vc120.7z +libmicrohttpd-0.9.48-win32-vc140.7z libnfs-1.10.0-win32.7z libogg-vc100-1.2.0-win32.7z libplist-1.7-win32-3.7z libpng-1.5.13-win32.7z librtmp-20150114-git-a107ce-win32.7z -libsdl-1.2.10-win32.7z -libsdl_image-1.2.14-win32.7z libshairplay-52fd9db-win32.7z libssh-0.5.0-1-win32.zip libvorbis-vc100-1.3.1-win32.7z @@ -40,12 +38,14 @@ libxml2-2.7.8_1-win32.7z libxslt-1.1.26_1-win32.7z libyajl-2.0.1-win32.7z libzlib-vc100-1.2.5-win32.7z -mysqlclient-6.1.3-win32-vc120.7z -pcre-8.34-win32-vc120.7z -PIL-1.1.7p-win32.7z -python-2.7.10-win32.7z +mysql-connector-c-6.1.6-win32-vc140.7z +openssl-1.0.2e-win32-vc140.7z +pcre-8.37-win32-vc140.7z +pillow-3.1.0-win32-vc140.7z +python-2.7.11-win32-vc140.7z sqlite-3.10.2-win32-vc140.7z swig-2.0.7-win32-1.7z -taglib-1.10-win32-vc120.7z +taglib-1.10-win32-vc140.7z texturepacker-1.1.0-win32.7z -tinyxml-2.6.2_3-win32-vc120.7z +tinyxmlstl-2.6.2-win32-vc140.7z +zlib-1.2.8-win32-vc140-v2.7z
\ No newline at end of file diff --git a/project/VS2010Express/UnrarXLib.vcxproj b/project/VS2010Express/UnrarXLib.vcxproj index 2f8d090a9c..35f7dde56e 100644 --- a/project/VS2010Express/UnrarXLib.vcxproj +++ b/project/VS2010Express/UnrarXLib.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,11 +21,13 @@ <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/project/VS2010Express/XBMC.defaults.props b/project/VS2010Express/XBMC.defaults.props index 6ba8a27a42..80f42a034c 100644 --- a/project/VS2010Express/XBMC.defaults.props +++ b/project/VS2010Express/XBMC.defaults.props @@ -2,12 +2,12 @@ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros" /> - <!-- Common configuration settings --> <PropertyGroup> <IncludePath>$(SolutionDir)\..\BuildDependencies\include;$(SolutionDir)\..\BuildDependencies\include\python;$(IncludePath)</IncludePath> <ExecutablePath>$(SolutionDir)\..\..\tools\win32buildtools;$(ExecutablePath)</ExecutablePath> - <LocalDebuggerEnvironment>KODI_HOME=$(SolutionDir)..\..
PATH=$(SolutionDir)..\Win32BuildSetup\dependencies;%PATH%</LocalDebuggerEnvironment> + <LocalDebuggerEnvironment>KODI_HOME=$(SolutionDir)..\.. +PATH=$(SolutionDir)..\Win32BuildSetup\dependencies;%PATH%</LocalDebuggerEnvironment> </PropertyGroup> <ItemDefinitionGroup> <ClCompile> @@ -27,7 +27,6 @@ <LinkErrorReporting>QueueForNextLogin</LinkErrorReporting> </Link> </ItemDefinitionGroup> - <!-- "Debug" specific settings --> <PropertyGroup Condition="'$(UseDebugLibraries)'=='true'"> <LibraryPath>$(SolutionDir)\..\BuildDependencies\lib\Debug-vc120;$(SolutionDir)\..\BuildDependencies\lib;$(LibraryPath)</LibraryPath> @@ -37,7 +36,7 @@ <ClCompile> <Optimization>Disabled</Optimization> <OmitFramePointers>false</OmitFramePointers> - <PreprocessorDefinitions>_DEBUG;TARGET_WINDOWS;_WINDOWS;WIN32;_XBMC;_WIN32_WINNT=0x0600;NTDDI_VERSION=0x06000000;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_DEBUG;TARGET_WINDOWS;_WINDOWS;WIN32;_XBMC;_WIN32_WINNT=0x0600;NTDDI_VERSION=0x06000000;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary Condition="'$(ConfigurationType)'=='Application'">MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary Condition="'$(ConfigurationType)'=='StaticLibrary'">MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary Condition="'$(ConfigurationType)'=='DynamicLibrary'">MultiThreadedDebugDLL</RuntimeLibrary> @@ -48,7 +47,6 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> - <!-- "Release" specific settings --> <PropertyGroup Condition="'$(UseDebugLibraries)'!='true'"> <LibraryPath>$(SolutionDir)\..\BuildDependencies\lib\Release-vc120;$(SolutionDir)\..\BuildDependencies\lib;$(LibraryPath)</LibraryPath> @@ -79,4 +77,4 @@ </Lib> </ItemDefinitionGroup> <ItemGroup /> -</Project> +</Project>
\ No newline at end of file diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index 1cfe059387..3a9c2651c7 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -19,6 +19,7 @@ <RootNamespace>XBMC_PC</RootNamespace> <Keyword>Win32Proj</Keyword> <ProjectName>Kodi</ProjectName> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(SolutionDir)\XBMC.core-defaults.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -26,18 +27,22 @@ <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> <CLRSupport>false</CLRSupport> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Testsuite|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> <CLRSupport>false</CLRSupport> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -91,7 +96,7 @@ <IgnoreSpecificDefaultLibraries>libcpmt;libc;msvcrt;libcmt;msvcrtd;msvcprtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <ModuleDefinitionFile> </ModuleDefinitionFile> - <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;ssh.dll;sqlite3.dll;avcodec-57.dll;avfilter-6.dll;avformat-57.dll;avutil-55.dll;postproc-54.dll;swresample-2.dll;swscale-4.dll;d3dcompiler_47.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>zlib.dll;libmysql.dll;libxslt.dll;dnssd.dll;dwmapi.dll;ssh.dll;sqlite3.dll;avcodec-57.dll;avfilter-6.dll;avformat-57.dll;avutil-55.dll;postproc-54.dll;swresample-2.dll;swscale-4.dll;d3dcompiler_47.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> <EntryPointSymbol> </EntryPointSymbol> @@ -163,7 +168,7 @@ <AdditionalDependencies>d3d11.lib;DInput8.lib;DSound.lib;winmm.lib;CrossGuid.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;yajl.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile> <IgnoreSpecificDefaultLibraries>libc;msvcrt;libci;msvcprt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> - <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;ssh.dll;sqlite3.dll;avcodec-57.dll;avfilter-6.dll;avformat-57.dll;avutil-55.dll;postproc-54.dll;swresample-2.dll;swscale-4.dll;d3dcompiler_47.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>zlib.dll;libmysql.dll;libxslt.dll;dnssd.dll;dwmapi.dll;ssh.dll;sqlite3.dll;avcodec-57.dll;avfilter-6.dll;avformat-57.dll;avutil-55.dll;postproc-54.dll;swresample-2.dll;swscale-4.dll;d3dcompiler_47.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> <RandomizedBaseAddress>true</RandomizedBaseAddress> @@ -3141,4 +3146,4 @@ </VisualStudio> </ProjectExtensions> <Import Project="$(SolutionDir)\$(ProjectFileName).targets.user" Condition="Exists('$(SolutionDir)\$(ProjectFileName).targets.user')" /> -</Project> +</Project>
\ No newline at end of file diff --git a/project/VS2010Express/XbmcCommons.vcxproj b/project/VS2010Express/XbmcCommons.vcxproj index 18af62a925..0643b36669 100644 --- a/project/VS2010Express/XbmcCommons.vcxproj +++ b/project/VS2010Express/XbmcCommons.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -29,10 +29,12 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug (DirectX)|Win32'"> <ConfigurationType>StaticLibrary</ConfigurationType> diff --git a/project/VS2010Express/XbmcThreads.vcxproj b/project/VS2010Express/XbmcThreads.vcxproj index a5cecd8f6e..0db38a0cb9 100644 --- a/project/VS2010Express/XbmcThreads.vcxproj +++ b/project/VS2010Express/XbmcThreads.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -60,10 +60,12 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug (DirectX)|Win32'"> <ConfigurationType>StaticLibrary</ConfigurationType> diff --git a/project/VS2010Express/libPlatinum.vcxproj b/project/VS2010Express/libPlatinum.vcxproj index 9f94507395..c49784a859 100644 --- a/project/VS2010Express/libPlatinum.vcxproj +++ b/project/VS2010Express/libPlatinum.vcxproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> @@ -21,11 +21,13 @@ <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat index 3364d24403..f3e1d8e392 100644 --- a/project/Win32BuildSetup/BuildSetup.bat +++ b/project/Win32BuildSetup/BuildSetup.bat @@ -49,14 +49,14 @@ SET buildconfig=Release set WORKSPACE=%CD%\..\.. - REM look for MSBuild.exe delivered with Visual Studio 2013 - FOR /F "tokens=2,* delims= " %%A IN ('REG QUERY HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0 /v MSBuildToolsRoot') DO SET MSBUILDROOT=%%B - SET NET="%MSBUILDROOT%12.0\bin\MSBuild.exe" + REM look for MSBuild.exe delivered with Visual Studio 2015 + FOR /F "tokens=2,* delims= " %%A IN ('REG QUERY HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 /v MSBuildToolsRoot') DO SET MSBUILDROOT=%%B + SET NET="%MSBUILDROOT%14.0\bin\MSBuild.exe" IF EXIST "!NET!" ( set msbuildemitsolution=1 - set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /t:Build /p:Configuration="%buildconfig%" /property:VCTargetsPath="%MSBUILDROOT%Microsoft.Cpp\v4.0\V120" /m - set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /t:Clean /p:Configuration="%buildconfig%" /property:VCTargetsPath="%MSBUILDROOT%Microsoft.Cpp\v4.0\V120" + set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /t:Build /p:Configuration="%buildconfig%" /property:VCTargetsPath="%MSBUILDROOT%Microsoft.Cpp\v4.0\V140" /m + set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /t:Clean /p:Configuration="%buildconfig%" /property:VCTargetsPath="%MSBUILDROOT%Microsoft.Cpp\v4.0\V140" ) IF NOT EXIST %NET% ( diff --git a/project/cmake/modules/FindCrossGUID.cmake b/project/cmake/modules/FindCrossGUID.cmake index 0d4a915ef3..df40c9eaf7 100644 --- a/project/cmake/modules/FindCrossGUID.cmake +++ b/project/cmake/modules/FindCrossGUID.cmake @@ -30,10 +30,8 @@ if(ENABLE_INTERNAL_CROSSGUID) else() find_path(CROSSGUID_INCLUDE_DIR guid.h) - find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid - ${CONFIGURATION_LIBDIR_RELEASE}) - find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd - ${CONFIGURATION_LIBDIR_DEBUG}) + find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid) + find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd) include(SelectLibraryConfigurations) select_library_configurations(CROSSGUID) diff --git a/project/cmake/modules/FindD3DX11Effects.cmake b/project/cmake/modules/FindD3DX11Effects.cmake index 9de8c2bc48..a640a84758 100644 --- a/project/cmake/modules/FindD3DX11Effects.cmake +++ b/project/cmake/modules/FindD3DX11Effects.cmake @@ -10,7 +10,7 @@ ExternalProject_Add(d3dx11effects SOURCE_DIR ${CORE_SOURCE_DIR}/lib/win32/Effects11 PREFIX ${CORE_BUILD_DIR}/Effects11 CONFIGURE_COMMAND "" - BUILD_COMMAND msbuild ${CORE_SOURCE_DIR}/lib/win32/Effects11/Effects11_2013.sln + BUILD_COMMAND msbuild ${CORE_SOURCE_DIR}/lib/win32/Effects11/Effects11_2015.sln /t:Effects11 /p:Configuration=${CORE_BUILD_CONFIG} INSTALL_COMMAND "") diff --git a/project/cmake/modules/FindMySqlClient.cmake b/project/cmake/modules/FindMySqlClient.cmake index 12fee5ca3f..2295c81c11 100644 --- a/project/cmake/modules/FindMySqlClient.cmake +++ b/project/cmake/modules/FindMySqlClient.cmake @@ -15,10 +15,10 @@ # MySqlClient::MySqlClient - The MySqlClient library find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql_time.h) -find_library(MYSQLCLIENT_LIBRARY_RELEASE NAMES mysqlclient mysqlclient_r - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} mysql) -find_library(MYSQLCLIENT_LIBRARY_DEBUG NAMES mysqlclient - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} mysql) +find_library(MYSQLCLIENT_LIBRARY_RELEASE NAMES mysqlclient libmysql + PATH_SUFFIXES mysql) +find_library(MYSQLCLIENT_LIBRARY_DEBUG NAMES mysqlclient libmysql + PATH_SUFFIXES mysql) include(SelectLibraryConfigurations) select_library_configurations(MYSQLCLIENT) diff --git a/project/cmake/modules/FindPCRE.cmake b/project/cmake/modules/FindPCRE.cmake index 54c4ab4a5f..8babed3b60 100644 --- a/project/cmake/modules/FindPCRE.cmake +++ b/project/cmake/modules/FindPCRE.cmake @@ -22,16 +22,12 @@ endif() find_path(PCRE_INCLUDE_DIR pcrecpp.h PATHS ${PC_PCRE_INCLUDEDIR}) find_library(PCRECPP_LIBRARY_RELEASE NAMES pcrecpp - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} PATHS ${PC_PCRE_LIBDIR}) find_library(PCRE_LIBRARY_RELEASE NAMES pcre - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} PATHS ${PC_PCRE_LIBDIR}) find_library(PCRECPP_LIBRARY_DEBUG NAMES pcrecppd - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} PATHS ${PC_PCRE_LIBDIR}) find_library(PCRE_LIBRARY_DEBUG NAMES pcred - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} PATHS ${PC_PCRE_LIBDIR}) set(PCRE_VERSION ${PC_PCRE_VERSION}) diff --git a/project/cmake/modules/FindTagLib.cmake b/project/cmake/modules/FindTagLib.cmake index b515e8118a..06b615d8a2 100644 --- a/project/cmake/modules/FindTagLib.cmake +++ b/project/cmake/modules/FindTagLib.cmake @@ -20,10 +20,8 @@ endif() find_path(TAGLIB_INCLUDE_DIR taglib/tag.h PATHS ${PC_TAGLIB_INCLUDEDIR}) find_library(TAGLIB_LIBRARY_RELEASE NAMES tag - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} PATHS ${PC_TAGLIB_LIBDIR}) -find_library(TAGLIB_LIBRARY_DEBUG NAMES tag - PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} +find_library(TAGLIB_LIBRARY_DEBUG NAMES tagd PATHS ${PC_TAGLIB_LIBDIR}) set(TAGLIB_VERSION ${PC_TAGLIB_VERSION}) diff --git a/project/cmake/modules/FindTinyXML.cmake b/project/cmake/modules/FindTinyXML.cmake index 0168f40ae5..54ec946955 100644 --- a/project/cmake/modules/FindTinyXML.cmake +++ b/project/cmake/modules/FindTinyXML.cmake @@ -22,10 +22,10 @@ find_path(TINYXML_INCLUDE_DIR tinyxml.h PATH_SUFFIXES tinyxml PATHS ${PC_TINYXML_INCLUDEDIR}) find_library(TINYXML_LIBRARY_RELEASE NAMES tinyxml tinyxmlSTL - PATH_SUFFIXES tinyxml ${CONFIGURATION_LIBDIR_RELEASE} + PATH_SUFFIXES tinyxml PATHS ${PC_TINYXML_LIBDIR}) -find_library(TINYXML_LIBRARY_DEBUG NAMES tinyxml tinyxmlSTL - PATH_SUFFIXES tinyxml ${CONFIGURATION_LIBDIR_DEBUG} +find_library(TINYXML_LIBRARY_DEBUG NAMES tinyxmld tinyxmlSTLd + PATH_SUFFIXES tinyxml PATHS ${PC_TINYXML_LIBDIR}) set(TINYXML_VERSION ${PC_TINYXML_VERSION}) diff --git a/project/cmake/scripts/windows/archsetup.cmake b/project/cmake/scripts/windows/archsetup.cmake index 7c9615aafb..0b86b05223 100644 --- a/project/cmake/scripts/windows/archsetup.cmake +++ b/project/cmake/scripts/windows/archsetup.cmake @@ -15,9 +15,6 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32) list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg) list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin) list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../BuildDependencies) -set(CONFIGURATION_LIBDIR lib/${CORE_BUILD_CONFIG}-vc120) -set(CONFIGURATION_LIBDIR_RELEASE lib/Release-vc120) -set(CONFIGURATION_LIBDIR_DEBUG lib/Debug-vc120) set(JPEG_NAMES ${JPEG_NAMES} jpeg-static) set(PYTHON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../BuildDependencies/include/python) @@ -32,7 +29,7 @@ set(SYSTEM_DEFINES -DNOMINMAX -D_USE_32BIT_TIME_T -DHAS_DX -D__STDC_CONSTANT_MAC -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" -DBUILDING_WITH_CMAKE - $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO -D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0>) + $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO -D_SECURE_SCL=0>) # Compile with /MT (to be compatible with the dependent libraries) foreach(CompilerFlag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE @@ -53,8 +50,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") # For #pragma comment(lib X) # TODO: It would certainly be better to handle these libraries via CMake modules. link_directories(${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin - ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib - ${PROJECT_SOURCE_DIR}/../BuildDependencies/${CONFIGURATION_LIBDIR}) + ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib) # Additional libraries list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib diff --git a/tools/buildsteps/win32/make-addons.bat b/tools/buildsteps/win32/make-addons.bat index 6373ea4b74..9fa18984d1 100644 --- a/tools/buildsteps/win32/make-addons.bat +++ b/tools/buildsteps/win32/make-addons.bat @@ -24,7 +24,7 @@ FOR %%b IN (%*) DO ( SETLOCAL DisableDelayedExpansion rem set Visual C++ build environment -call "%VS120COMNTOOLS%..\..\VC\bin\vcvars32.bat" +call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat" SET WORKDIR=%WORKSPACE% diff --git a/tools/buildsteps/win32/make-xbmc.bat b/tools/buildsteps/win32/make-xbmc.bat deleted file mode 100644 index 1be66c020b..0000000000 --- a/tools/buildsteps/win32/make-xbmc.bat +++ /dev/null @@ -1,176 +0,0 @@ -@ECHO OFF -rem ----Usage---- -rem BuildSetup [clean|noclean] -rem clean to force a full rebuild -rem noclean to force a build without clean -rem noprompt to avoid all prompts -CLS -COLOR 1B -TITLE XBMC for Windows Build Script -rem ----PURPOSE---- -rem - Create a working XBMC build with a single click -rem ------------------------------------------------------------- -rem Config -rem If you get an error that Visual studio was not found, SET your path for VSNET main executable. -rem ------------------------------------------------------------- -rem CONFIG START -SET comp=vs2010 -SET buildconfig=Release (DirectX) -SET buildmode=ask -SET promptlevel=prompt -SET buildmingwlibs=true -SET exitcode=0 -FOR %%b in (%1, %2, %3, %4, %5) DO ( - IF %%b==clean SET buildmode=clean - IF %%b==noclean SET buildmode=noclean - IF %%b==noprompt SET promptlevel=noprompt - IF %%b==nomingwlibs SET buildmingwlibs=false -) - -IF $%Configuration%$ == $$ ( - IF %Configuration%==Release SET buildconfig=Release (DirectX) - IF %Configuration%==Debug SET buildconfig=Debug (DirectX) -) - -SET BS_DIR=%WORKSPACE%\project\Win32BuildSetup -cd %BS_DIR% - -IF %comp%==vs2010 ( - IF "%VS100COMNTOOLS%"=="" ( - set NET="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" - ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" ( - set NET="%VS100COMNTOOLS%\..\IDE\VCExpress.exe" - ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\devenv.exe" ( - set NET="%VS100COMNTOOLS%\..\IDE\devenv.exe" - ) -) - -IF NOT EXIST %NET% ( - set DIETEXT=Visual Studio .NET 2010 Express was not found. - goto DIE -) - -set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /build "%buildconfig%" -set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /clean "%buildconfig%" -set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe" -set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb" - -rem CONFIG END -rem ------------------------------------------------------------- - -echo : -echo ::: -echo :::: -echo :::: -echo ::::::: ::::::::::::::::: :::::: :::::: ::::::: -echo ::::::::: :::::::::::::::::::: :::::::::: :::::::::: ::::::::: -echo ::::::::: :::::::::::::::::::::: :::::::::::::::::::::::: ::::::::: -echo ::::::::: ::: ::::: ::::: :::::::: :::: ::::: -echo :::::: :::: :::: :::: ::::: ::::::: -echo ::::: :::: ::::::: ::::: :::::: -echo ::::: ::: :::::: ::: :::::: -echo :::: ::: :::::: :::: :::::: -echo :::: ::: ::::::: :::: :::::: -echo ::::: :::: ::::::: :::: :::::: -echo ::::::: :::: :::::::: ::: ::::::: -echo ::::::::::::::: ::::: ::::: ::: ::: ::::::::: -echo ::::::::: ::::::::: ::::::::::: ::: ::: ::: ::::::::: -echo :::::::: ::::::::: ::::::::: ::: ::: ::: :::::::: -echo :::::: ::::::: ::::: : :: :: :::::: -echo Building %buildconfig% -goto EXE_COMPILE - -:EXE_COMPILE - IF EXIST buildlog.html del buildlog.html /q - IF %buildmode%==clean goto COMPILE_EXE - IF %buildmode%==noclean goto COMPILE_NO_CLEAN_EXE - rem --------------------------------------------- - rem check for existing exe - rem --------------------------------------------- - - IF EXIST %EXE% ( - goto EXE_EXIST - ) - goto COMPILE_EXE - -:EXE_EXIST - IF %promptlevel%==noprompt goto COMPILE_EXE - ECHO ------------------------------------------------------------ - ECHO Found a previous Compiled WIN32 EXE! - ECHO [1] a NEW EXE will be compiled for the BUILD_WIN32 - ECHO [2] existing EXE will be updated (quick mode compile) for the BUILD_WIN32 - ECHO ------------------------------------------------------------ - set /P APP_COMPILE_ANSWER=Compile a new EXE? [1/2]: - if /I %APP_COMPILE_ANSWER% EQU 1 goto COMPILE_EXE - if /I %APP_COMPILE_ANSWER% EQU 2 goto COMPILE_NO_CLEAN_EXE - -:COMPILE_EXE - ECHO Wait while preparing the build. - ECHO ------------------------------------------------------------ - ECHO Cleaning Solution... - %NET% %CLEAN_EXE% - ECHO Compiling XBMC... - %NET% %OPTS_EXE% - IF NOT EXIST %EXE% ( - set DIETEXT="XBMC.EXE failed to build! See %WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - IF %promptlevel%==noprompt ( - type "%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - ) - goto DIE - ) - ECHO Done! - ECHO ------------------------------------------------------------ - set buildmode=clean - GOTO END - -:COMPILE_NO_CLEAN_EXE - ECHO Wait while preparing the build. - ECHO ------------------------------------------------------------ - ECHO Compiling Solution... - %NET% %OPTS_EXE% - IF NOT EXIST %EXE% ( - set DIETEXT="XBMC.EXE failed to build! See %WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - IF %promptlevel%==noprompt ( - type "%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - ) - goto DIE - ) - ECHO Done! - ECHO ------------------------------------------------------------ - GOTO END - - -:DIE - ECHO ------------------------------------------------------------ - ECHO !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!- - ECHO ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR - ECHO !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!- - set DIETEXT=ERROR: %DIETEXT% - echo %DIETEXT% - SET exitcode=1 - ECHO ------------------------------------------------------------ - -:VIEWLOG_EXE - SET log="%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - IF NOT EXIST %log% goto END - - copy %log% ./buildlog.html > NUL - - IF %promptlevel%==noprompt ( - goto END - ) - - set /P APP_BUILD_ANSWER=View the build log in your HTML browser? [y/n] - if /I %APP_BUILD_ANSWER% NEQ y goto END - - SET log="%WORKSPACE%\project\vs2010express\XBMC\%buildconfig%\objs\" XBMC.log - - start /D%log% - goto END - -:END - IF %promptlevel% NEQ noprompt ( - ECHO Press any key to exit... - pause > NUL - ) - EXIT /B %exitcode%
\ No newline at end of file diff --git a/xbmc/ContextMenuManager.cpp b/xbmc/ContextMenuManager.cpp index 3f93f1b55e..e4ad14ea53 100644 --- a/xbmc/ContextMenuManager.cpp +++ b/xbmc/ContextMenuManager.cpp @@ -29,6 +29,8 @@ #include "video/ContextMenus.h" #include "utils/log.h" +#include <iterator> + using namespace ADDON; diff --git a/xbmc/addons/AddonDatabase.cpp b/xbmc/addons/AddonDatabase.cpp index 00bd7a51e5..d5eac2ba4c 100644 --- a/xbmc/addons/AddonDatabase.cpp +++ b/xbmc/addons/AddonDatabase.cpp @@ -21,6 +21,7 @@ #include "AddonDatabase.h" #include <algorithm> +#include <iterator> #include <utility> #include "addons/AddonBuilder.h" @@ -33,7 +34,6 @@ #include "DllLibCPluff.h" #include "XBDateTime.h" - using namespace ADDON; CAddonDatabase::CAddonDatabase() @@ -253,7 +253,6 @@ void CAddonDatabase::SyncInstalled(const std::set<std::string>& ids, const std:: } } - void CAddonDatabase::GetInstalled(std::vector<CAddonBuilder>& addons) { try @@ -279,7 +278,6 @@ void CAddonDatabase::GetInstalled(std::vector<CAddonBuilder>& addons) } } - bool CAddonDatabase::SetLastUpdated(const std::string& addonId, const CDateTime& dateTime) { try @@ -830,7 +828,6 @@ std::pair<CDateTime, ADDON::AddonVersion> CAddonDatabase::LastChecked(const std: return std::make_pair(date, version); } - bool CAddonDatabase::SetLastChecked(const std::string& id, const ADDON::AddonVersion& version, const std::string& time) { diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp index 43ffcc0191..c4b2db77e5 100644 --- a/xbmc/addons/AddonManager.cpp +++ b/xbmc/addons/AddonManager.cpp @@ -20,6 +20,7 @@ #include "AddonManager.h" +#include <iterator> #include <memory> #include <utility> @@ -382,21 +383,21 @@ void CAddonMgr::RemoveFromUpdateableAddons(AddonPtr &pAddon) { CSingleLock lock(m_critSection); VECADDONS::iterator it = std::find(m_updateableAddons.begin(), m_updateableAddons.end(), pAddon); - + if(it != m_updateableAddons.end()) { m_updateableAddons.erase(it); } } -struct AddonIdFinder -{ +struct AddonIdFinder +{ AddonIdFinder(const std::string& id) : m_id(id) {} - - bool operator()(const AddonPtr& addon) - { + + bool operator()(const AddonPtr& addon) + { return m_id == addon->ID(); } private: @@ -407,7 +408,7 @@ bool CAddonMgr::ReloadSettings(const std::string &id) { CSingleLock lock(m_critSection); VECADDONS::iterator it = std::find_if(m_updateableAddons.begin(), m_updateableAddons.end(), AddonIdFinder(id)); - + if( it != m_updateableAddons.end()) { return (*it)->ReloadSettings(); diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp index cf8a060cb1..d89a0161f1 100644 --- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp +++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp @@ -17,13 +17,28 @@ * <http://www.gnu.org/licenses/>. * */ - + #include "EmuFileWrapper.h" #include "filesystem/File.h" #include "threads/SingleLock.h" CEmuFileWrapper g_emuFileWrapper; +namespace +{ + +#if defined(TARGET_WINDOWS) +constexpr kodi_iobuf* FileDescriptor(FILE& f) +{ + return static_cast<kodi_iobuf*>(f._Placeholder); +} +#else +constexpr FILE* FileDescriptor(FILE& f) +{ + return &f; +} +#endif +} CEmuFileWrapper::CEmuFileWrapper() { // since we always use dlls we might just initialize it directly @@ -31,12 +46,16 @@ CEmuFileWrapper::CEmuFileWrapper() { memset(&m_files[i], 0, sizeof(EmuFileObject)); m_files[i].used = false; - m_files[i].file_emu._file = -1; +#if defined(TARGET_WINDOWS) + m_files[i].file_emu._Placeholder = new kodi_iobuf(); +#endif + FileDescriptor(m_files[i].file_emu)->_file = -1; } } CEmuFileWrapper::~CEmuFileWrapper() { + CleanUp(); } void CEmuFileWrapper::CleanUp() @@ -52,18 +71,25 @@ void CEmuFileWrapper::CleanUp() if (m_files[i].file_lock) { delete m_files[i].file_lock; - m_files[i].file_lock = NULL; + m_files[i].file_lock = nullptr; } +#if !defined(TARGET_WINDOWS) + //Don't memset on Windows as it overwrites our pointer memset(&m_files[i], 0, sizeof(EmuFileObject)); +#endif m_files[i].used = false; - m_files[i].file_emu._file = -1; + FileDescriptor(m_files[i].file_emu)->_file = -1; } +#if defined(TARGET_WINDOWS) && _MSC_VER >= 1900 + delete static_cast<kodi_iobuf*>(m_files[i].file_emu._Placeholder); + m_files[i].file_emu._Placeholder = nullptr; +#endif } } EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) { - EmuFileObject* object = NULL; + EmuFileObject* object = nullptr; CSingleLock lock(m_criticalSection); @@ -75,7 +101,7 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) object = &m_files[i]; object->used = true; object->file_xbmc = pFile; - object->file_emu._file = (i + FILE_WRAPPER_OFFSET); + FileDescriptor(object->file_emu)->_file = (i + FILE_WRAPPER_OFFSET); object->file_lock = new CCriticalSection(); break; } @@ -87,33 +113,33 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd) { int i = fd - FILE_WRAPPER_OFFSET; - if (i >= 0 && i < MAX_EMULATED_FILES) - { - if (m_files[i].used) - { - CSingleLock lock(m_criticalSection); + if (! (i >= 0 && i < MAX_EMULATED_FILES)) + return; - // we assume the emulated function alreay deleted the CFile object - if (m_files[i].used) - { - if (m_files[i].file_lock) - { - delete m_files[i].file_lock; - m_files[i].file_lock = NULL; - } - memset(&m_files[i], 0, sizeof(EmuFileObject)); - m_files[i].used = false; - m_files[i].file_emu._file = -1; - } - } + if (!m_files[i].used) + return; + + CSingleLock lock(m_criticalSection); + + // we assume the emulated function alreay deleted the CFile object + if (m_files[i].file_lock) + { + delete m_files[i].file_lock; + m_files[i].file_lock = nullptr; } +#if !defined(TARGET_WINDOWS) + //Don't memset on Windows as it overwrites our pointer + memset(&m_files[i], 0, sizeof(EmuFileObject)); +#endif + m_files[i].used = false; + FileDescriptor(m_files[i].file_emu)->_file = -1; } void CEmuFileWrapper::UnRegisterFileObjectByStream(FILE* stream) { - if (stream != NULL) + if (stream != nullptr) { - return UnRegisterFileObjectByDescriptor(stream->_file); + return UnRegisterFileObjectByDescriptor(FileDescriptor(*stream)->_file); } } @@ -130,12 +156,12 @@ void CEmuFileWrapper::LockFileObjectByDescriptor(int fd) } bool CEmuFileWrapper::TryLockFileObjectByDescriptor(int fd) -{ - int i = fd - FILE_WRAPPER_OFFSET; +{ + int i = fd - FILE_WRAPPER_OFFSET; if (i >= 0 && i < MAX_EMULATED_FILES) - { + { if (m_files[i].used) - { + { return m_files[i].file_lock->try_lock(); } } @@ -143,12 +169,12 @@ bool CEmuFileWrapper::TryLockFileObjectByDescriptor(int fd) } void CEmuFileWrapper::UnlockFileObjectByDescriptor(int fd) -{ - int i = fd - FILE_WRAPPER_OFFSET; +{ + int i = fd - FILE_WRAPPER_OFFSET; if (i >= 0 && i < MAX_EMULATED_FILES) - { + { if (m_files[i].used) - { + { m_files[i].file_lock->unlock(); } } @@ -164,50 +190,50 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd) return &m_files[i]; } } - return NULL; + return nullptr; } EmuFileObject* CEmuFileWrapper::GetFileObjectByStream(FILE* stream) { - if (stream != NULL) + if (stream != nullptr) { - return GetFileObjectByDescriptor(stream->_file); + return GetFileObjectByDescriptor(FileDescriptor(*stream)->_file); } - return NULL; + return nullptr; } XFILE::CFile* CEmuFileWrapper::GetFileXbmcByDescriptor(int fd) { - EmuFileObject* object = GetFileObjectByDescriptor(fd); - if (object != NULL && object->used) + auto object = GetFileObjectByDescriptor(fd); + if (object != nullptr && object->used) { return object->file_xbmc; } - return NULL; + return nullptr; } XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream) { - if (stream != NULL) + if (stream != nullptr) { - EmuFileObject* object = GetFileObjectByDescriptor(stream->_file); - if (object != NULL && object->used) + auto object = GetFileObjectByDescriptor(FileDescriptor(*stream)->_file); + if (object != nullptr && object->used) { return object->file_xbmc; } } - return NULL; + return nullptr; } int CEmuFileWrapper::GetDescriptorByStream(FILE* stream) { - if (stream != NULL) + if (stream != nullptr) { - int i = stream->_file - FILE_WRAPPER_OFFSET; + int i = FileDescriptor(*stream)->_file - FILE_WRAPPER_OFFSET; if (i >= 0 && i < MAX_EMULATED_FILES) { - return stream->_file; + return i + FILE_WRAPPER_OFFSET; } } return -1; @@ -215,29 +241,19 @@ int CEmuFileWrapper::GetDescriptorByStream(FILE* stream) FILE* CEmuFileWrapper::GetStreamByDescriptor(int fd) { - EmuFileObject* object = GetFileObjectByDescriptor(fd); - if (object != NULL && object->used) + auto object = GetFileObjectByDescriptor(fd); + if (object != nullptr && object->used) { return &object->file_emu; } - return NULL; -} - -bool CEmuFileWrapper::DescriptorIsEmulatedFile(int fd) -{ - int i = fd - FILE_WRAPPER_OFFSET; - if (i >= 0 && i < MAX_EMULATED_FILES) - { - return true; - } - return false; + return nullptr; } bool CEmuFileWrapper::StreamIsEmulatedFile(FILE* stream) { - if (stream != NULL) + if (stream != nullptr) { - return DescriptorIsEmulatedFile(stream->_file); + return DescriptorIsEmulatedFile(FileDescriptor(*stream)->_file); } return false; } diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h index 597d38c224..cdf285e840 100644 --- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h +++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h @@ -32,20 +32,27 @@ #endif #define MAX_EMULATED_FILES 50 -#define FILE_WRAPPER_OFFSET 0x00000100 +#define FILE_WRAPPER_OFFSET 0x00000200 namespace XFILE { class CFile; } +#if defined(TARGET_WINDOWS) +struct kodi_iobuf { + int _file; +}; +#endif + typedef struct stEmuFileObject { - bool used; FILE file_emu; XFILE::CFile* file_xbmc; CCriticalSection *file_lock; int mode; + //Stick this last to avoid 3-7 bytes of padding + bool used; } EmuFileObject; class CEmuFileWrapper @@ -53,25 +60,28 @@ class CEmuFileWrapper public: CEmuFileWrapper(); ~CEmuFileWrapper(); - + /** * Only to be called when shutting down xbmc */ void CleanUp(); - + EmuFileObject* RegisterFileObject(XFILE::CFile* pFile); void UnRegisterFileObjectByDescriptor(int fd); void UnRegisterFileObjectByStream(FILE* stream); void LockFileObjectByDescriptor(int fd); bool TryLockFileObjectByDescriptor(int fd); void UnlockFileObjectByDescriptor(int fd); - EmuFileObject* GetFileObjectByDescriptor(int fd); - EmuFileObject* GetFileObjectByStream(FILE* stream); + EmuFileObject* GetFileObjectByDescriptor(int fd); + EmuFileObject* GetFileObjectByStream(FILE* stream); XFILE::CFile* GetFileXbmcByDescriptor(int fd); XFILE::CFile* GetFileXbmcByStream(FILE* stream); static int GetDescriptorByStream(FILE* stream); FILE* GetStreamByDescriptor(int fd); - static bool DescriptorIsEmulatedFile(int fd); + static constexpr bool DescriptorIsEmulatedFile(int fd) + { + return fd >= FILE_WRAPPER_OFFSET && fd < FILE_WRAPPER_OFFSET + MAX_EMULATED_FILES; + } static bool StreamIsEmulatedFile(FILE* stream); private: EmuFileObject m_files[MAX_EMULATED_FILES]; diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp index c2422c3df4..1380ede411 100644 --- a/xbmc/dbwrappers/mysqldataset.cpp +++ b/xbmc/dbwrappers/mysqldataset.cpp @@ -33,7 +33,7 @@ #include "mysqldataset.h" #include "mysql/errmsg.h" #if defined(TARGET_WINDOWS) && !defined(BUILDING_WITH_CMAKE) -#pragma comment(lib, "mysqlclient.lib") +#pragma comment(lib, "libmysql.lib") #endif #define MYSQL_OK 0 diff --git a/xbmc/filesystem/ZipFile.cpp b/xbmc/filesystem/ZipFile.cpp index a3a6900ed5..8c403e03bb 100644 --- a/xbmc/filesystem/ZipFile.cpp +++ b/xbmc/filesystem/ZipFile.cpp @@ -26,6 +26,9 @@ #include <sys/stat.h> +#if defined (TARGET_WINDOWS) +#pragma comment(lib, "zlib.lib") +#endif #define ZIP_CACHE_LIMIT 4*1024*1024 using namespace XFILE; diff --git a/xbmc/games/controllers/windows/GUIControllerList.cpp b/xbmc/games/controllers/windows/GUIControllerList.cpp index 307195ab1d..79c8f161b5 100644 --- a/xbmc/games/controllers/windows/GUIControllerList.cpp +++ b/xbmc/games/controllers/windows/GUIControllerList.cpp @@ -19,6 +19,10 @@ */ #include "GUIControllerList.h" + +#include <assert.h> +#include <iterator> + #include "GUIControllerDefines.h" #include "GUIControllerWindow.h" #include "GUIFeatureList.h" @@ -33,8 +37,6 @@ #include "input/joysticks/DefaultJoystick.h" // for DEFAULT_CONTROLLER_ID #include "peripherals/Peripherals.h" -#include <assert.h> - using namespace ADDON; using namespace GAME; diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp index 6d8a19ae41..9b623a5fc2 100644 --- a/xbmc/guilib/GUIWindowManager.cpp +++ b/xbmc/guilib/GUIWindowManager.cpp @@ -845,7 +845,7 @@ void CGUIWindowManager::OnApplicationMessage(ThreadMessage* pMsg) { switch (pMsg->dwMessage) { - case TMSG_GUI_DIALOG_OPEN: + case TMSG_GUI_DIALOG_OPEN: { if (pMsg->lpVoid) static_cast<CGUIDialog*>(pMsg->lpVoid)->Open(pMsg->strParam); @@ -1032,7 +1032,7 @@ void CGUIWindowManager::RenderPass() const // we render the dialogs based on their render order. std::vector<CGUIWindow *> renderList = m_activeDialogs; stable_sort(renderList.begin(), renderList.end(), RenderOrderSortFunction); - + for (iDialog it = renderList.begin(); it != renderList.end(); ++it) { if ((*it)->IsDialogRunning()) diff --git a/xbmc/interfaces/python/PythonInvoker.cpp b/xbmc/interfaces/python/PythonInvoker.cpp index c5d25862b3..4cbcac3655 100644 --- a/xbmc/interfaces/python/PythonInvoker.cpp +++ b/xbmc/interfaces/python/PythonInvoker.cpp @@ -51,6 +51,7 @@ #include "utils/URIUtils.h" #ifdef TARGET_WINDOWS +#pragma comment(lib, "python27.lib") extern "C" FILE *fopen_utf8(const char *_Filename, const char *_Mode); #else #define fopen_utf8 fopen diff --git a/xbmc/music/tags/TagLibVFSStream.cpp b/xbmc/music/tags/TagLibVFSStream.cpp index eb29f7826d..02f2e4ed77 100644 --- a/xbmc/music/tags/TagLibVFSStream.cpp +++ b/xbmc/music/tags/TagLibVFSStream.cpp @@ -27,8 +27,12 @@ using namespace TagLib; using namespace MUSIC_INFO; #if defined(TARGET_WINDOWS) && !defined(BUILDING_WITH_CMAKE) +#ifdef _DEBUG +#pragma comment(lib, "tagd.lib") +#else #pragma comment(lib, "tag.lib") #endif +#endif /*! * Construct a File object and opens the \a file. \a file should be a diff --git a/xbmc/utils/CharsetConverter.cpp b/xbmc/utils/CharsetConverter.cpp index 39b4b8995a..8c912768ba 100644 --- a/xbmc/utils/CharsetConverter.cpp +++ b/xbmc/utils/CharsetConverter.cpp @@ -57,15 +57,20 @@ #define UTF16_CHARSET "UTF-16" ENDIAN_SUFFIX #define UTF32_CHARSET "UTF-32" ENDIAN_SUFFIX #define UTF8_SOURCE "UTF-8" - #define WCHAR_CHARSET UTF16_CHARSET + #define WCHAR_CHARSET UTF16_CHARSET +#if _DEBUG + #pragma comment(lib, "libfribidi.lib") + #pragma comment(lib, "libiconvd.lib") +#else #pragma comment(lib, "libfribidi.lib") #pragma comment(lib, "libiconv.lib") +#endif #elif defined(TARGET_ANDROID) #define WCHAR_IS_UCS_4 1 #define UTF16_CHARSET "UTF-16" ENDIAN_SUFFIX #define UTF32_CHARSET "UTF-32" ENDIAN_SUFFIX #define UTF8_SOURCE "UTF-8" - #define WCHAR_CHARSET UTF32_CHARSET + #define WCHAR_CHARSET UTF32_CHARSET #else #define UTF16_CHARSET "UTF-16" ENDIAN_SUFFIX #define UTF32_CHARSET "UTF-32" ENDIAN_SUFFIX @@ -88,7 +93,7 @@ enum SpecialCharset { NotSpecialCharset = 0, SystemCharset, - UserCharset /* locale.charset */, + UserCharset /* locale.charset */, SubtitleCharset /* subtitles.charset */, }; @@ -193,7 +198,7 @@ iconv_t CConverterType::GetConverter(CSingleLock& converterLock) m_targetCharset = ResolveSpecialCharset(m_targetSpecialCharset); m_iconv = iconv_open(m_targetCharset.c_str(), m_sourceCharset.c_str()); - + if (m_iconv == NO_ICONV) CLog::Log(LOGERROR, "%s: iconv_open() for \"%s\" -> \"%s\" failed, errno = %d (%s)", __FUNCTION__, m_sourceCharset.c_str(), m_targetCharset.c_str(), errno, strerror(errno)); @@ -275,13 +280,13 @@ enum StdConversionType /* Keep it in sync with CCharsetConverter::CInnerConverte NumberOfStdConversionTypes /* Dummy sentinel entry */ }; -/* We don't want to pollute header file with many additional includes and definitions, so put +/* We don't want to pollute header file with many additional includes and definitions, so put here all staff that require usage of types defined in this file or in additional headers */ class CCharsetConverter::CInnerConverter { public: static bool logicalToVisualBiDi(const std::u32string& stringSrc, std::u32string& stringDst, FriBidiCharType base = FRIBIDI_TYPE_LTR, const bool failOnBadString = false); - + template<class INPUT,class OUTPUT> static bool stdConvert(StdConversionType convertType, const INPUT& strSource, OUTPUT& strDest, bool failOnInvalidChar = false); template<class INPUT,class OUTPUT> @@ -496,7 +501,7 @@ bool CCharsetConverter::CInnerConverter::logicalToVisualBiDi(const std::u32strin lineEnd = srcLen; else lineEnd++; // include '\n' - + const size_t lineLen = lineEnd - lineStart; FriBidiChar* visual = (FriBidiChar*) malloc((lineLen + 1) * sizeof(FriBidiChar)); @@ -708,7 +713,7 @@ bool CCharsetConverter::wToUtf32(const std::wstring& wStringSrc, std::u32string& // The bVisualBiDiFlip forces a flip of characters for hebrew/arabic languages, only set to false if the flipping // of the string is already made or the string is not displayed in the GUI -bool CCharsetConverter::utf8ToW(const std::string& utf8StringSrc, std::wstring& wStringDst, bool bVisualBiDiFlip /*= true*/, +bool CCharsetConverter::utf8ToW(const std::string& utf8StringSrc, std::wstring& wStringDst, bool bVisualBiDiFlip /*= true*/, bool forceLTRReadingOrder /*= false*/, bool failOnBadChar /*= false*/) { // Try to flip hebrew/arabic characters, if any @@ -724,7 +729,7 @@ bool CCharsetConverter::utf8ToW(const std::string& utf8StringSrc, std::wstring& return CInnerConverter::stdConvert(Utf32ToW, utf32flipped, wStringDst, failOnBadChar) && bidiResult; } - + return CInnerConverter::stdConvert(Utf8toW, utf8StringSrc, wStringDst, failOnBadChar); } @@ -763,7 +768,7 @@ bool CCharsetConverter::ToUtf8(const std::string& strSourceCharset, const std::s utf8StringDst = stringSrc; return true; } - + return CInnerConverter::customConvert(strSourceCharset, "UTF-8", stringSrc, utf8StringDst, failOnBadChar); } diff --git a/xbmc/utils/XBMCTinyXML.h b/xbmc/utils/XBMCTinyXML.h index 567f3ba8f1..4a62652d72 100644 --- a/xbmc/utils/XBMCTinyXML.h +++ b/xbmc/utils/XBMCTinyXML.h @@ -26,8 +26,12 @@ #ifdef TARGET_WINDOWS #ifndef BUILDING_WITH_CMAKE #define TIXML_USE_STL +#ifdef _DEBUG +#pragma comment(lib, "tinyxmlSTLd.lib") +#else #pragma comment(lib, "tinyxmlSTL.lib") #endif +#endif #else //compile fix for TinyXml < 2.6.0 #define DOCUMENT TINYXML_DOCUMENT |