winport: remove userconfig, replace with msbuild-based system. easily support newer SSE versions while we're at it
This commit is contained in:
parent
8e7c58e11f
commit
9766d2d8a6
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="IntegrityChecks" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<PropertyGroup>
|
||||||
|
<SSE_Level>0,10,20,30,31,40</SSE_Level> (31 is SSSE3; 0 is disabled. if using x64, SSE2 or better will be forcibly enabled)
|
||||||
|
<AVX_Level>0,10,20</AVX_Level> (10 is AVX; 20 is AVX2; 0 is disabled. if using AVX, SSE2 or better will be forcibly enabled)
|
||||||
|
<DEVELOPER>true</DEVELOPER> (enable dev+ feature)
|
||||||
|
<GDB_STUB>true</GDB_STUB> (enable GDB stub feature)
|
||||||
|
<EXPERIMENTAL_WIFI_COMM>true</EXPERIMENTAL_WIFI_COMM> (enable EXPERIMENTAL_WIFI_COMM feature)
|
||||||
|
</PropertyGroup>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</Project>
|
|
@ -72,13 +72,7 @@
|
||||||
<ClCompile Include="..\arm_jit.cpp" />
|
<ClCompile Include="..\arm_jit.cpp" />
|
||||||
<ClCompile Include="..\bios.cpp" />
|
<ClCompile Include="..\bios.cpp" />
|
||||||
<ClCompile Include="..\cheatSystem.cpp" />
|
<ClCompile Include="..\cheatSystem.cpp" />
|
||||||
<ClCompile Include="..\commandline.cpp">
|
<ClCompile Include="..\commandline.cpp" />
|
||||||
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Dev+|Win32'">Cdecl</CallingConvention>
|
|
||||||
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Cdecl</CallingConvention>
|
|
||||||
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|Win32'">Cdecl</CallingConvention>
|
|
||||||
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Cdecl</CallingConvention>
|
|
||||||
<CallingConvention Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|x64'">Cdecl</CallingConvention>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\common.cpp" />
|
<ClCompile Include="..\common.cpp" />
|
||||||
<ClCompile Include="..\cp15.cpp" />
|
<ClCompile Include="..\cp15.cpp" />
|
||||||
<ClCompile Include="..\debug.cpp" />
|
<ClCompile Include="..\debug.cpp" />
|
||||||
|
@ -587,7 +581,6 @@
|
||||||
<ClInclude Include="throttle.h" />
|
<ClInclude Include="throttle.h" />
|
||||||
<ClInclude Include="winpcap.h" />
|
<ClInclude Include="winpcap.h" />
|
||||||
<ClInclude Include="winutil.h" />
|
<ClInclude Include="winutil.h" />
|
||||||
<ClInclude Include="userconfig\userconfig.h" />
|
|
||||||
<ClInclude Include="disView.h" />
|
<ClInclude Include="disView.h" />
|
||||||
<ClInclude Include="ginfo.h" />
|
<ClInclude Include="ginfo.h" />
|
||||||
<ClInclude Include="IORegView.h" />
|
<ClInclude Include="IORegView.h" />
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
<Filter Include="Windows">
|
<Filter Include="Windows">
|
||||||
<UniqueIdentifier>{56813aa6-2261-4011-8938-105c0b4b3773}</UniqueIdentifier>
|
<UniqueIdentifier>{56813aa6-2261-4011-8938-105c0b4b3773}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Windows\userconfig">
|
|
||||||
<UniqueIdentifier>{78bb8fa0-5d56-4cf5-94b3-b020f4f4c290}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Windows\tools">
|
<Filter Include="Windows\tools">
|
||||||
<UniqueIdentifier>{947281ba-49a1-4379-ab51-078980176832}</UniqueIdentifier>
|
<UniqueIdentifier>{947281ba-49a1-4379-ab51-078980176832}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
@ -1232,9 +1229,6 @@
|
||||||
<ClInclude Include="winutil.h">
|
<ClInclude Include="winutil.h">
|
||||||
<Filter>Windows</Filter>
|
<Filter>Windows</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="userconfig\userconfig.h">
|
|
||||||
<Filter>Windows\userconfig</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="disView.h">
|
<ClInclude Include="disView.h">
|
||||||
<Filter>Windows\tools</Filter>
|
<Filter>Windows\tools</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#ifndef _CONFIG_H
|
|
||||||
#define _CONFIG_H
|
|
||||||
|
|
||||||
#include "userconfig.h"
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,19 +0,0 @@
|
||||||
#ifndef _USERCONFIG_H
|
|
||||||
#define _USERCONFIG_H
|
|
||||||
|
|
||||||
//this is a default file. it should not be edited, or else you will mess up the defaults.
|
|
||||||
//to customize your build, place a customized copy in the userconfig directory
|
|
||||||
//(alongside this defaultconfig directory)
|
|
||||||
|
|
||||||
//disables SSE and SSE2 optimizations (better change it in the vc++ codegen options too)
|
|
||||||
//note that you may have to use this if your compiler doesn't support standard SSE intrinsics
|
|
||||||
//#define NOSSE
|
|
||||||
//#define NOSSE2
|
|
||||||
|
|
||||||
//#define DEVELOPER //enables dev+ features
|
|
||||||
//#define GDB_STUB //enables the gdb stub. for some reason this is separate from dev+ for now. requires DEVELOPER.
|
|
||||||
|
|
||||||
//#define EXPERIMENTAL_WIFI_COMM //enables experimental wifi communication features which do not actually work yet
|
|
||||||
//basic wifi register emulation is still enabled, to at least make it seem like the wifi is working in an empty universe
|
|
||||||
|
|
||||||
#endif //_USERCONFIG_H
|
|
|
@ -11,10 +11,19 @@
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- reformat version to be more useful -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<NDS_VSVER Condition="'$(VisualStudioVersion)' == '10.0'">10</NDS_VSVER>
|
||||||
|
<NDS_VSVER Condition="'$(VisualStudioVersion)' == '11.0'">11</NDS_VSVER>
|
||||||
|
<NDS_VSVER Condition="'$(VisualStudioVersion)' == '12.0'">12</NDS_VSVER>
|
||||||
|
<NDS_VSVER Condition="'$(VisualStudioVersion)' == '14.0'">14</NDS_VSVER>
|
||||||
|
<!-- others may not be supported, so lets not list them here -->
|
||||||
|
<NDS_VisualStudioName Condition="'$(NDS_VSVER)' == '10'">VS2010</NDS_VisualStudioName>
|
||||||
|
<NDS_VisualStudioName Condition="'$(NDS_VSVER)' == '14'">VS2015</NDS_VisualStudioName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- General project setup -->
|
<!-- General project setup -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NDS_VisualStudioName Condition="'$(VisualStudioVersion)' == '10.0'">VS2010</NDS_VisualStudioName>
|
|
||||||
<NDS_VisualStudioName Condition="'$(VisualStudioVersion)' == '14.0'">VS2015</NDS_VisualStudioName>
|
|
||||||
<IntDir>$(SolutionDir).obj\$(NDS_VisualStudioName)-$(Platform)-$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir).obj\$(NDS_VisualStudioName)-$(Platform)-$(Configuration)\</IntDir>
|
||||||
<OutDir>$(SolutionDir)__bins\</OutDir>
|
<OutDir>$(SolutionDir)__bins\</OutDir>
|
||||||
<TargetName>$(ProjectName)-$(NDS_VisualStudioName)-$(Configuration)</TargetName>
|
<TargetName>$(ProjectName)-$(NDS_VisualStudioName)-$(Configuration)</TargetName>
|
||||||
|
@ -22,6 +31,28 @@
|
||||||
<TargetPath>$(OutDir)$(TargetName).exe</TargetPath>
|
<TargetPath>$(OutDir)$(TargetName).exe</TargetPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- load user preferences -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<UserProps_Path>$(MSBuildThisFileDirectory)DeSmuME-user.props</UserProps_Path>
|
||||||
|
<UserProps_Path Condition="!Exists($(UserProps_Path))">$(MSBuildThisFileDirectory)DeSmuME-user.props.template</UserProps_Path>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="$(UserProps_Path)" />
|
||||||
|
|
||||||
|
<!-- some defaults and validation of user prefs -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<SSE_Level Condition="'$(SSE_Level)' == ''">20</SSE_Level>
|
||||||
|
<AVX_Level Condition="'$(AVX_Level)' == ''">0</AVX_Level>
|
||||||
|
<!-- dont use optimizations the compiler cant handle. this isn't accurate to the compiler capabilities but we're only supporting 2010 and 2015 -->
|
||||||
|
<SSE_Level Condition="'$(NDS_VSVER)' < '14' AND '$(SSE_Level)' > '20'">20</SSE_Level>
|
||||||
|
<!-- validation: x64 14.0 can't handle SSE_Level 1.0 and anyway SSE2 is automatically available -->
|
||||||
|
<SSE_Level Condition="'$(Platform)' == 'x64' AND '$(SSE_Level)' < '20'">20</SSE_Level>
|
||||||
|
<!-- no AVX support on 2010 -->
|
||||||
|
<AVX_Level Condition="'$(NDS_VSVER)' < '14' AND '$(AVX_Level)' != '0'">0</AVX_Level>
|
||||||
|
<!-- AVX implies SSE2 at least -->
|
||||||
|
<SSE_Level Condition="'$(AVX_Level)' != '0' AND '$(SSE_Level)' < '20'">20</SSE_Level>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- global optimizations -->
|
<!-- global optimizations -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<WholeProgramOptimization Condition="'$(Configuration)' == 'Release'">true</WholeProgramOptimization>
|
<WholeProgramOptimization Condition="'$(Configuration)' == 'Release'">true</WholeProgramOptimization>
|
||||||
|
@ -77,14 +108,33 @@
|
||||||
<!-- Not sure why we chose this, study it later -->
|
<!-- Not sure why we chose this, study it later -->
|
||||||
<CallingConvention>Cdecl</CallingConvention>
|
<CallingConvention>Cdecl</CallingConvention>
|
||||||
|
|
||||||
|
|
||||||
<RuntimeLibrary Condition="'$(Configuration)' == 'Debug'">MultiThreadedDebugDll</RuntimeLibrary>
|
<RuntimeLibrary Condition="'$(Configuration)' == 'Debug'">MultiThreadedDebugDll</RuntimeLibrary>
|
||||||
<RuntimeLibrary Condition="'$(Configuration)' != 'Debug'">MultiThreadedDll</RuntimeLibrary>
|
<RuntimeLibrary Condition="'$(Configuration)' != 'Debug'">MultiThreadedDll</RuntimeLibrary>
|
||||||
|
|
||||||
|
<!-- optimizatons / instruction sets -->
|
||||||
|
<EnableEnhancedInstructionSet Condition="'$(SSE_Level)' >= '10'">StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<EnableEnhancedInstructionSet Condition="'$(SSE_Level)' >= '20'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||||
|
<EnableEnhancedInstructionSet Condition="'$(SSE_Level)' >= '30'">StreamingSIMDExtensions3</EnableEnhancedInstructionSet>
|
||||||
|
<EnableEnhancedInstructionSet Condition="'$(AVX_Level)' >= '10'">AdvancedVectorExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<EnableEnhancedInstructionSet Condition="'$(AVX_Level)' >= '20'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
||||||
|
<PreprocessorDefinitions Condition="'$(SSE_Level)' >= '10'">ENABLE_SSE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(SSE_Level)' >= '20'">ENABLE_SSE2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(SSE_Level)' >= '30'">ENABLE_SSE3=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(SSE_Level)' >= '31'">ENABLE_SSSE3=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(SSE_Level)' >= '40'">ENABLE_SSE4=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(AVX_Level)' >= '10'">ENABLE_AVX=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(AVX_Level)' >= '20'">ENABLE_AVX2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
||||||
|
<!-- export other user options to preprocessor -->
|
||||||
|
<PreprocessorDefinitions Condition="'$(DEVELOPER)' == 'true'">DEVELOPER=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(GDB_STUB)' == 'true'">GDB_STUB=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(EXPERIMENTAL_WIFI_COMM)' == 'true'">EXPERIMENTAL_WIFI_COMM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>$(TargetPath)</OutputFile>
|
<OutputFile>$(TargetPath)</OutputFile>
|
||||||
|
<ProgramDatabaseFile>$(IntDir)TargetName.pdb</ProgramDatabaseFile>
|
||||||
|
|
||||||
<!-- deps config for x64 -->
|
<!-- deps config for x64 -->
|
||||||
<AdditionalLibraryDirectories Condition="'$(Platform)' == 'x64'">.\zlib128;agg;.libs;.libs\x64</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories Condition="'$(Platform)' == 'x64'">.\zlib128;agg;.libs;.libs\x64</AdditionalLibraryDirectories>
|
||||||
|
@ -95,7 +145,7 @@
|
||||||
<AdditionalDependencies Condition="'$(Platform)' == 'Win32'">directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib;zlib-vc8-Win32.lib;agg-2.5.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies Condition="'$(Platform)' == 'Win32'">directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib;zlib-vc8-Win32.lib;agg-2.5.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
|
||||||
<!-- special deps config for newer VS -->
|
<!-- special deps config for newer VS -->
|
||||||
<AdditionalDependencies Label="Configuration" Condition="'$(VisualStudioVersion)' == '14.0'">legacy_stdio_definitions.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies Label="Configuration" Condition="'$(NDS_VSVER)' == '14'">legacy_stdio_definitions.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
|
||||||
<!-- general deps config -->
|
<!-- general deps config -->
|
||||||
<AdditionalDependencies>lua51.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>lua51.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
@ -172,7 +222,6 @@
|
||||||
</UsingTask>
|
</UsingTask>
|
||||||
|
|
||||||
<Target Name="UNDUPOBJ">
|
<Target Name="UNDUPOBJ">
|
||||||
<message importance="high" text="PLATFORM: $(Platform)"/>
|
|
||||||
<!-- see stackoverflow topics for discussion on why we need to do some loopy copying stuff here -->
|
<!-- see stackoverflow topics for discussion on why we need to do some loopy copying stuff here -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompileCopy Include="@(ClCompile)"/>
|
<ClCompileCopy Include="@(ClCompile)"/>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
see the defaultconfig directory for more information on what this is all about
|
|
Loading…
Reference in New Issue