vcxproj file fixes (#75)

* vcxproj file fixes
* Platform version is now 8.1
* Platform toolset is now v141_xp
* Fixed IncludePath not inheriting default paths
* Disabled ConformanceMode since it causes the "IUnknown" issue on v141_xp

* Update README.md

* Update README.md
* Includes screenshots

* Update README.md

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
This commit is contained in:
Brent
2023-09-04 04:11:56 -05:00
committed by GitHub
parent 2e55f99a54
commit 3fa70ad387
5 changed files with 25 additions and 19 deletions

View File

@@ -62,14 +62,26 @@ build.
### Windows (VS 2022)
This is simple enough - just open the project and compile.
The project is configured to target Windows XP by default by using "v141_xp" build tools. If you would like to build with Windows XP support, please follow the guide [here](https://learn.microsoft.com/en-us/cpp/build/configuring-programs-for-windows-xp?view=msvc-170#install-the-windows-xp-platform-toolset) to obtain the build tools via the Visual Studio installer.
If you would like to strictly target more modern versions of Windows, you can change the build toolset by doing the following:
1. Right-click the project and click "Properties".
![Visual Studio Project](screenshots/visualstudio/mcpe_project.png)
![Visual Studio Project Properties Option](screenshots/visualstudio/properties_contextmenu.png)
2. Click the dropdown for the "Platform Toolset" property and select "Visual Studio 2022 (v143)" or newer.
![Selecting v143 Platform Toolset](screenshots/visualstudio/mcpe_project_properties_v143.png)
3. Click "Apply"
Once have the proper build tools installed (v140_xp or newer), just right-click the project and click "Build".
After building, place the `assets` folder you have prepared in the working directory of the output executable.
(if running from VS, it's in `game/`, otherwise, where your executable is)
### Windows (VS 2010)
This target is only around to target Windows XP (or potentially earlier) versions.
This target is only around to allow for building on older versions of Windows and to allow for the potential targetting of pre-XP versions of Windows.
To compile, you will **need the Microsoft Platform SDK and the DirectX (June 2010) SDK**. After that, follow
the same steps as the VS2022 build. (open the minecraftcpp_vs2010.sln project instead of the minecraftcpp.sln

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="DebugAsan|Win32">
@@ -747,26 +747,26 @@
<ProjectGuid>{ad85f5f3-6ad0-4c11-bb1d-33adb8eeb0b9}</ProjectGuid>
<RootNamespace>minecraftcpp</RootNamespace>
<ProjectName>minecraftcpp</ProjectName>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugAsan|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
<EnableASAN>true</EnableASAN>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
@@ -821,32 +821,32 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugAsan|Win32'">
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugAsan|x64'">
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<IncludePath>$(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
@@ -855,7 +855,6 @@
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>HANDLE_CHARS_SEPARATELY;_USE_MATH_DEFINES;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Precise</FloatingPointModel>
<ShowIncludes>false</ShowIncludes>
@@ -872,7 +871,6 @@
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>HANDLE_CHARS_SEPARATELY;_USE_MATH_DEFINES;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Precise</FloatingPointModel>
<ShowIncludes>false</ShowIncludes>
@@ -891,7 +889,6 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>HANDLE_CHARS_SEPARATELY;_USE_MATH_DEFINES;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Precise</FloatingPointModel>
<ShowIncludes>false</ShowIncludes>
@@ -910,7 +907,6 @@
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>HANDLE_CHARS_SEPARATELY;_USE_MATH_DEFINES;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Precise</FloatingPointModel>
<ShowIncludes>false</ShowIncludes>
@@ -927,7 +923,6 @@
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>HANDLE_CHARS_SEPARATELY;_USE_MATH_DEFINES;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Precise</FloatingPointModel>
<ShowIncludes>false</ShowIncludes>
@@ -946,7 +941,6 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>HANDLE_CHARS_SEPARATELY;_USE_MATH_DEFINES;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Precise</FloatingPointModel>
<ShowIncludes>false</ShowIncludes>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB