First Commit
This commit is contained in:
71
common/vsprops/BaseProjectConfig.props
Normal file
71
common/vsprops/BaseProjectConfig.props
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug AVX2|x64">
|
||||
<Configuration>Debug AVX2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug Clang|x64">
|
||||
<Configuration>Debug Clang</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug Clang AVX2|x64">
|
||||
<Configuration>Debug Clang AVX2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Devel|x64">
|
||||
<Configuration>Devel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Devel AVX2|x64">
|
||||
<Configuration>Devel AVX2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Devel Clang|x64">
|
||||
<Configuration>Devel Clang</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Devel Clang AVX2|x64">
|
||||
<Configuration>Devel Clang AVX2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release AVX2|x64">
|
||||
<Configuration>Release AVX2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release Clang|x64">
|
||||
<Configuration>Release Clang</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release Clang AVX2|x64">
|
||||
<Configuration>Release Clang AVX2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug Clang|ARM64">
|
||||
<Configuration>Debug Clang</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Devel Clang|ARM64">
|
||||
<Configuration>Devel Clang</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release Clang|ARM64">
|
||||
<Configuration>Release Clang</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- This better belongs in BaseProperies.props, but it needs to be set before the default props file is imported. -->
|
||||
<PropertyGroup>
|
||||
<UseMultiToolTask>true</UseMultiToolTask>
|
||||
<EnforceProcessCountAcrossBuilds>true</EnforceProcessCountAcrossBuilds>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
7
common/vsprops/BaseProperties.props
Normal file
7
common/vsprops/BaseProperties.props
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<OutDir Condition="'$(Platform)'!='ARM64'">$(SolutionDir)bin\</OutDir>
|
||||
<OutDir Condition="'$(Platform)'=='ARM64'">$(SolutionDir)bin-arm64\</OutDir>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
12
common/vsprops/CodeGen_Debug.props
Normal file
12
common/vsprops/CodeGen_Debug.props
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
15
common/vsprops/CodeGen_Devel.props
Normal file
15
common/vsprops/CodeGen_Devel.props
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
26
common/vsprops/CodeGen_Release.props
Normal file
26
common/vsprops/CodeGen_Release.props
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>NDEBUG;_SECURE_SCL_=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
32
common/vsprops/CopyResources.props
Normal file
32
common/vsprops/CopyResources.props
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- Copy resources for ARM -->
|
||||
<ItemGroup>
|
||||
<BinRes Include="$(SolutionDir)bin\resources\**\*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BinDocs Include="$(SolutionDir)bin\docs\**\*" />
|
||||
</ItemGroup>
|
||||
<Target Name="CopyBinResources"
|
||||
AfterTargets="Build"
|
||||
Inputs="@(BinRes)"
|
||||
Outputs="@(BinRes -> '$(OutDir)resources\%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
<Message Text="Copying Resources" Importance="High" />
|
||||
<Copy
|
||||
SourceFiles="@(BinRes)"
|
||||
DestinationFolder="$(OutDir)resources\%(RecursiveDir)"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
</Target>
|
||||
<Target Name="CopyBinDocs"
|
||||
AfterTargets="Build"
|
||||
Inputs="@(BinDocs)"
|
||||
Outputs="@(BinDocs -> '$(OutDir)docs\%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
<Message Text="Copying Docs" Importance="High" />
|
||||
<Copy
|
||||
SourceFiles="@(BinDocs)"
|
||||
DestinationFolder="$(OutDir)docs\%(RecursiveDir)"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
||||
9
common/vsprops/GenerateSCMVersion.props
Normal file
9
common/vsprops/GenerateSCMVersion.props
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup>
|
||||
<!-- This sucks. Need a better solution. -->
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)common\vsprops\preBuild.cmd"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
16
common/vsprops/IncrementalLinking.props
Normal file
16
common/vsprops/IncrementalLinking.props
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>false</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
40
common/vsprops/LinkPCSX2Deps.props
Normal file
40
common/vsprops/LinkPCSX2Deps.props
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- Dependency linking and DLL copying -->
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(DepsLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);freetype.lib;jpeg.lib;libpng16.lib;libwebp.lib;lz4.lib;SDL3.lib;zlib.lib;zstd.lib;plutovg.lib;plutosvg.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="$(Configuration.Contains(Debug))">%(AdditionalDependencies);kddockwidgets-qt6d.lib;</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="!$(Configuration.Contains(Debug))">%(AdditionalDependencies);kddockwidgets-qt6.lib;</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<DepsDLLs Include="$(DepsBinDir)freetype.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)harfbuzz.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)jpeg62.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)libpng16.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)libsharpyuv.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)libwebp.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)lz4.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)SDL3.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)shaderc_shared.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)zlib1.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)zstd.dll" />
|
||||
<DepsDLLs Condition="$(Configuration.Contains(Debug))" Include="$(DepsBinDir)kddockwidgets-qt6d.dll" />
|
||||
<DepsDLLs Condition="!$(Configuration.Contains(Debug))" Include="$(DepsBinDir)kddockwidgets-qt6.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)plutovg.dll" />
|
||||
<DepsDLLs Include="$(DepsBinDir)plutosvg.dll" />
|
||||
</ItemGroup>
|
||||
<Target Name="DepsCopyDLLs"
|
||||
AfterTargets="Build"
|
||||
Inputs="@(DepsDLLs)"
|
||||
Outputs="@(DepsDLLs -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
<Message Text="Copying Dependency DLLs" Importance="High" />
|
||||
<Copy
|
||||
SourceFiles="@(DepsDLLs)"
|
||||
DestinationFolder="$(OutDir)"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
||||
234
common/vsprops/QtCompile.props
Normal file
234
common/vsprops/QtCompile.props
Normal file
@@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<QtBinaryOutputDir Condition="'$(Platform)'!='ARM64'">$(SolutionDir)bin\</QtBinaryOutputDir>
|
||||
<QtBinaryOutputDir Condition="'$(Platform)'=='ARM64'">$(SolutionDir)bin-arm64\</QtBinaryOutputDir>
|
||||
<PCSX2QTDIRDefault Condition="'$(Platform)'=='x64'">$(SolutionDir)deps\</PCSX2QTDIRDefault>
|
||||
<PCSX2QTDIRDefault Condition="'$(Platform)'=='ARM64'">$(SolutionDir)deps-arm64\</PCSX2QTDIRDefault>
|
||||
<PCSX2QTDIR Condition="Exists('$(PCSX2QTDIRDefault)') And ('$(PCSX2QTDIR)'=='' Or !Exists('$(PCSX2QTDIR)'))">$(PCSX2QTDIRDefault)</PCSX2QTDIR>
|
||||
<PCSX2QTDIR Condition="Exists('$(PCSX2QTDIR)') And !HasTrailingSlash('$(PCSX2QTDIR)')">$(PCSX2QTDIR)\</PCSX2QTDIR>
|
||||
<PCSX2QTDIRHost>$(SolutionDir)deps\</PCSX2QTDIRHost>
|
||||
<QtDirValid>false</QtDirValid>
|
||||
<QtDirValid Condition="Exists('$(PCSX2QTDIR)')">true</QtDirValid>
|
||||
<QtIncludeDir>$(PCSX2QTDIR)include\</QtIncludeDir>
|
||||
<QtLibDir>$(PCSX2QTDIR)lib\</QtLibDir>
|
||||
<QtBinDir>$(PCSX2QTDIR)bin\</QtBinDir>
|
||||
<QtHostBinDir>$(PCSX2QTDIRHost)bin\</QtHostBinDir>
|
||||
<QtPluginsDir>$(PCSX2QTDIR)plugins\</QtPluginsDir>
|
||||
<QtTranslationsDir>$(PCSX2QTDIR)translations\</QtTranslationsDir>
|
||||
<QtToolOutDir>$(IntDir)</QtToolOutDir>
|
||||
<QtMocOutPrefix>$(QtToolOutDir)moc_</QtMocOutPrefix>
|
||||
<QtTsOutDir>$(QtBinaryOutputDir)translations\</QtTsOutDir>
|
||||
<QtDebugSuffix>d</QtDebugSuffix>
|
||||
<QtLibSuffix Condition="$(Configuration.Contains(Debug))">$(QtDebugSuffix)</QtLibSuffix>
|
||||
<QtPluginFolder>QtPlugins</QtPluginFolder>
|
||||
<QtEntryPointLib>$(QtLibDir)Qt6EntryPoint$(QtLibSuffix).lib</QtEntryPointLib>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions Condition="!$(Configuration.Contains(Debug))">QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtToolOutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir)\QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir)\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir)\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Qt6Core$(QtLibSuffix).lib;Qt6Gui$(QtLibSuffix).lib;Qt6Widgets$(QtLibSuffix).lib;Qt6Concurrent$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<!--Passes all .qrc files to rcc and puts output in the build directory-->
|
||||
<ItemGroup>
|
||||
<ResFiles Include="$(MSBuildProjectDirectory)\**\*.qrc" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtResource"
|
||||
BeforeTargets="ClCompile"
|
||||
Inputs="@(ResFiles)"
|
||||
Condition="'@(QtResource)'!=''"
|
||||
Outputs="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).cpp')">
|
||||
<Message Text="rcc %(ResFiles.Filename)" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)" />
|
||||
<Exec Command=""$(QtHostBinDir)rcc.exe" "%(ResFiles.FullPath)" -o "$(QtToolOutDir)qrc_%(ResFiles.Filename).cpp"" />
|
||||
</Target>
|
||||
|
||||
<Target Name="QtResourceClean">
|
||||
<Delete Files="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).cpp')" />
|
||||
</Target>
|
||||
|
||||
<!--Passes .ui files to uic and puts output in the build directory-->
|
||||
<!--We need to create tlogs so that VS knows the ui files are used-->
|
||||
<!--See https://learn.microsoft.com/en-us/visualstudio/extensibility/visual-cpp-project-extensibility?view=vs-2022#tlog-files-->
|
||||
<Target Name="QtUi"
|
||||
BeforeTargets="ClCompile"
|
||||
Condition="'@(QtUi)'!=''">
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)" />
|
||||
<!--Setup metadata for following tasks-->
|
||||
<ItemGroup>
|
||||
<QtUi>
|
||||
<Message>uic %(Filename)</Message>
|
||||
<Command>
|
||||
"$(QtHostBinDir)uic.exe" "%(FullPath)" -o "$(QtToolOutDir)ui_%(Filename).h"
|
||||
</Command>
|
||||
<Outputs>$(QtToolOutDir)ui_%(Filename).h</Outputs>
|
||||
</QtUi>
|
||||
</ItemGroup>
|
||||
|
||||
<!--Helper for dealing with tlogs-->
|
||||
<!--https://learn.microsoft.com/en-us/visualstudio/msbuild/getoutofdateitems-task?view=vs-2022-->
|
||||
<GetOutOfDateItems Sources="@(QtUi)"
|
||||
OutputsMetadataName="Outputs"
|
||||
CommandMetadataName="Command"
|
||||
TLogDirectory="$(TLogLocation)"
|
||||
TLogNamePrefix="QtUi">
|
||||
<Output TaskParameter="OutOfDateSources" ItemName="OutOfDateQtUi"/>
|
||||
</GetOutOfDateItems>
|
||||
|
||||
<CustomBuild Condition="'@(OutOfDateQtUi)'!=''"
|
||||
Sources="@(OutOfDateQtUi)" />
|
||||
</Target>
|
||||
|
||||
<!--Compile files needed to MOC and output in the build directory-->
|
||||
<!--TODO find a way to autocreate from ClCompile settings-->
|
||||
<PropertyGroup>
|
||||
<MocDefines></MocDefines>
|
||||
<MocDefines Condition="!$(Configuration.Contains(Debug))">-DQT_NO_DEBUG -DNDEBUG $(MocDefines)</MocDefines>
|
||||
<MocIncludes>-I"$(QtIncludeDir)." -I"$(SolutionDir)pcsx2" "-I$(SolutionDir)." -I.</MocIncludes>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMoc"
|
||||
BeforeTargets="ClCompile"
|
||||
Condition="'@(QtMoc)'!=''"
|
||||
Inputs="%(QtMoc.Identity);$(QtHostBinDir)moc.exe"
|
||||
Outputs="$(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp">
|
||||
<Message Text="moc %(QtMoc.Filename) $(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)%(QtMoc.RelativeDir)" />
|
||||
<Exec Command=""$(QtHostBinDir)moc.exe" "%(QtMoc.FullPath)" -o "$(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp" -f%(QtMoc.Filename)%(QtMoc.Extension) $(MocDefines) $(MocIncludes)" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<MocOutputs Include="$(QtToolOutDir)**/moc_*.cpp" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtMocClean">
|
||||
<Delete Files="@(MocOutputs)" />
|
||||
</Target>
|
||||
|
||||
<!--Expose the new targets to VS-->
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||
<AvailableItemName Include="QtResource">
|
||||
<Targets>QtResource</Targets>
|
||||
</AvailableItemName>
|
||||
<AvailableItemName Include="QtUi">
|
||||
<Targets>QtUi</Targets>
|
||||
</AvailableItemName>
|
||||
<AvailableItemName Include="QtMoc">
|
||||
<Targets>QtMoc</Targets>
|
||||
</AvailableItemName>
|
||||
<AvailableItemName Include="QtTs">
|
||||
<Targets>QtTs</Targets>
|
||||
</AvailableItemName>
|
||||
</ItemGroup>
|
||||
|
||||
<!--Copy the needed dlls-->
|
||||
<ItemGroup>
|
||||
<QtLibNames Include="Qt6Core$(QtLibSuffix);Qt6Gui$(QtLibSuffix);Qt6Widgets$(QtLibSuffix);Qt6Svg$(QtLibSuffix);Qt6Concurrent$(QtLibSuffix)" />
|
||||
<QtDlls Include="@(QtLibNames -> '$(QtBinDir)%(Identity).dll')" />
|
||||
<!--Filter plugins to copy based on the observation that all debug versions end in "d"-->
|
||||
<QtAllPlugins Include="$(QtPluginsDir)**\*$(QtLibSuffix).dll" />
|
||||
<QtPlugins Condition="$(Configuration.Contains(Debug))" Include="@(QtAllPlugins)" />
|
||||
<QtPlugins Condition="!$(Configuration.Contains(Debug))" Exclude="$(QtPluginsDir)**\*$(QtDebugSuffix).dll" Include="@(QtAllPlugins)" />
|
||||
<QtPluginsDest Include="@(QtPlugins -> '$(QtBinaryOutputDir)$(QtPluginFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<QtConfFile>$(QtBinaryOutputDir)qt.conf</QtConfFile>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtCopyBinaries"
|
||||
AfterTargets="Build"
|
||||
Inputs="@(QtDlls);@(QtPlugins)"
|
||||
Outputs="@(QtDlls -> '$(QtBinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)');@(QtPluginsDest)">
|
||||
<Message Text="Copying Qt .dlls" Importance="High" />
|
||||
<Copy
|
||||
SourceFiles="@(QtDlls)"
|
||||
DestinationFolder="$(QtBinaryOutputDir)"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
<Copy
|
||||
SourceFiles="@(QtPlugins)"
|
||||
DestinationFiles="@(QtPluginsDest)"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
</Target>
|
||||
<Target Name="QtCreateConf"
|
||||
BeforeTargets="QtCopyBinaries"
|
||||
Condition="!Exists('$(QtConfFile)')">
|
||||
<!--
|
||||
Create a file which tells Qt where to look for "plugins".
|
||||
Otherwise Qt only looks in ./<subtype>/type.dll instead of ./$(QtPluginFolder)/<subtype>/type.dll, which is messy
|
||||
-->
|
||||
<WriteLinesToFile
|
||||
File="$(QtConfFile)"
|
||||
Lines="[Paths];Plugins = ./$(QtPluginFolder)"
|
||||
Overwrite="true"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<!--Copies base translation files, and combines split into one -->
|
||||
<ItemGroup>
|
||||
<AllQmFiles Include="$(QtTranslationsDir)qt*.qm">
|
||||
<Language>$([System.String]::Copy('%(Filename)').Substring($([MSBuild]::Add($([System.String]::Copy('%(Filename)').IndexOf('_')), 1))))</Language>
|
||||
</AllQmFiles>
|
||||
<BaseQmFiles Include="$(QtTranslationsDir)qtbase_*.qm" />
|
||||
<SourceMergeQmFileNames Include="@(BaseQmFiles -> '%(Filename)%(Extension)'->Replace('qtbase_', 'qt_'))" />
|
||||
<SourceMergeQmFiles Include="@(SourceMergeQmFileNames -> '$(QtTranslationsDir)%(Filename)%(Extension)')" />
|
||||
<MergedQmFiles Include="@(SourceMergeQmFileNames -> '$(QtTsOutDir)%(Filename)%(Extension)')">
|
||||
<Language>$([System.String]::Copy('%(Filename)').Replace('qt_', ''))</Language>
|
||||
</MergedQmFiles>
|
||||
<CopyTsFilesSource Include="$(QtTranslationsDir)qt_*.qm" Exclude="@(SourceMergeQmFiles);$(QtTranslationsDir)\qt_help_*.qm" />
|
||||
<CopyTsFilesDest Include="@(CopyTsFilesSource -> '$(QtTsOutDir)%(Filename)%(Extension)')" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtGenerateBaseTranslations" AfterTargets="Build" Inputs="@(SourceMergeQmFiles)" Outputs="%(MergedQmFiles.FullPath)">
|
||||
<PropertyGroup>
|
||||
<Language>%(MergedQmFiles.Language)</Language>
|
||||
</PropertyGroup>
|
||||
<Message Text="Generate Base Translation qt_$(Language).qm" Importance="High" />
|
||||
<ItemGroup>
|
||||
<SourceQmFiles Include="%(AllQmFiles.FullPath)" Condition="'%(AllQmFiles.Language)' == '$(Language)'" />
|
||||
</ItemGroup>
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
<MakeDir Directories="$(QtTsOutDir)" />
|
||||
<Exec Command=""$(QtHostBinDir)lconvert.exe" -verbose -of qm -o "$(QtTsOutDir)qt_$(Language).qm" @(SourceQmFiles -> '"%(FullPath)"', ' ')" />
|
||||
</Target>
|
||||
<Target Name="QtCopyBaseTranslations"
|
||||
AfterTargets="Build"
|
||||
Inputs="@(CopyTsFilesSource)"
|
||||
Outputs="@(CopyTsFilesDest.FullPath)">
|
||||
<Message Text="Copy Base Translation %(CopyTsFilesSource.Filename)%(CopyTsFilesSource.Extension)" />
|
||||
<Copy SourceFiles="@(CopyTsFilesSource)" DestinationFiles="@(CopyTsFilesDest)" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<!--Compiles all translation files-->
|
||||
<ItemGroup>
|
||||
<TsFiles Include="$(MSBuildProjectDirectory)\**\*.ts" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtTs"
|
||||
BeforeTargets="ClCompile"
|
||||
Inputs="@(TsFiles)"
|
||||
Condition="'@(QtTs)'!=''"
|
||||
Outputs="@(TsFiles->'$(QtTsOutDir)%(Filename).qm')">
|
||||
<Message Text="lrelease %(TsFiles.Filename)" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
<MakeDir Directories="$(QtTsOutDir)" />
|
||||
<Exec Command=""$(QtHostBinDir)lrelease.exe" "%(TsFiles.FullPath)" -qm "$(QtTsOutDir)%(TsFiles.Filename).qm"" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<TsOutputs Include="$(QtTsOutDir)*.qm" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtTsClean">
|
||||
<Delete Files="@(TsOutputs)" />
|
||||
</Target>
|
||||
</Project>
|
||||
10
common/vsprops/QtCompile.targets
Normal file
10
common/vsprops/QtCompile.targets
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CleanDependsOn>QtResourceClean;QtMocClean;QtTsClean;$(CleanDependsOn)</CleanDependsOn>
|
||||
<!--
|
||||
<ComputeLinkInputsTargets>$(ComputeLinkInputsTargets);QtComputeMocOutput;</ComputeLinkInputsTargets>
|
||||
<ComputeLibInputsTargets>$(ComputeLibInputsTargets);QtComputeMocOutput;</ComputeLibInputsTargets>
|
||||
-->
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
14
common/vsprops/QtCompile.xml
Normal file
14
common/vsprops/QtCompile.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties">
|
||||
<ItemType Name="QtResource" DisplayName="Qt Resource File" />
|
||||
<ItemType Name="QtUi" DisplayName="Qt User Interface File" />
|
||||
<ItemType Name="QtMoc" DisplayName="Qt Meta Object File" />
|
||||
<ItemType Name="QtTs" DisplayName="Qt Translation File" />
|
||||
<ContentType Name="QtResource" DisplayName="Qt Resource Compiler" ItemType="QtResource" />
|
||||
<ContentType Name="QtUi" DisplayName="Qt User Interface Compiler" ItemType = "QtUi"/>
|
||||
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" ItemType="QtMoc" />
|
||||
<ContentType Name="QtTs" DisplayName="Qt Translation Compiler" ItemType="QtTs" />
|
||||
<FileExtension Name="*.qrc" ContentType="QtResource" />
|
||||
<FileExtension Name="*.ui" ContentType="QtUi" />
|
||||
<FileExtension Name="*.ts" ContentType="QtTs" />
|
||||
</ProjectSchemaDefinitions>
|
||||
9
common/vsprops/WinSDK.props
Normal file
9
common/vsprops/WinSDK.props
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- TODO: vs2017 doesn't support using the latest installed, 2019 does, this is the workaround -->
|
||||
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
|
||||
<LatestTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</LatestTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
<TargetPlatformVersion>$(LatestTargetPlatformVersion)</TargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
74
common/vsprops/common.props
Normal file
74
common/vsprops/common.props
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<SSEString />
|
||||
<SSEString Condition="$(Configuration.Contains(AVX2))">-avx2</SSEString>
|
||||
<ArchString />
|
||||
<ArchString Condition="'$(Platform)'=='x64'">x64</ArchString>
|
||||
<BuildString />
|
||||
<BuildString Condition="$(Configuration.Contains(Debug))">-dbg</BuildString>
|
||||
<BuildString Condition="$(Configuration.Contains(Devel))">-dev</BuildString>
|
||||
<ToolkitString />
|
||||
<ToolkitString Condition="$(Configuration.Contains(Clang))">-clang</ToolkitString>
|
||||
<EXEString>$(ProjectName)$(ArchString)$(SSEString)$(ToolkitString)$(BuildString)</EXEString>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)build\lib-$(PlatformName)-$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\obj-$(ProjectName)-$(PlatformName)-$(Configuration)\</IntDir>
|
||||
<DepsRootDir Condition="'$(Platform)'=='x64'">$(SolutionDir)deps\</DepsRootDir>
|
||||
<DepsRootDir Condition="'$(Platform)'=='ARM64'">$(SolutionDir)deps-arm64\</DepsRootDir>
|
||||
<DepsBinDir>$(DepsRootDir)bin\</DepsBinDir>
|
||||
<DepsLibDir>$(DepsRootDir)lib\</DepsLibDir>
|
||||
<DepsIncludeDir>$(DepsRootDir)include\</DepsIncludeDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories);$(DepsIncludeDir)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;NOMINMAX;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_HAS_EXCEPTIONS=0;WINVER=0x0A00;_WIN32_WINNT=0x0A00;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Platform)'=='ARM64'">OVERRIDE_HOST_PAGE_SIZE=0x1000;OVERRIDE_HOST_CACHE_LINE_SIZE=64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="$(Configuration.Contains(Debug))">PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="$(Configuration.Contains(Devel))">PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="$(Configuration.Contains(Release))">NDEBUG;_SECURE_SCL_=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>4063;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
||||
|
||||
<!-- SH 2/3 flashlight, explicitly set here don't change -->
|
||||
<!-- https://github.com/PCSX2/pcsx2/commit/16431653e4d92fda4069031897e24fbe4688d36a -->
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
|
||||
<!-- MSVC automatically adds __AVX__ and __AVX2__ appropriately -->
|
||||
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">_M_X86;__SSE4_1__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='ARM64' Or !$(Configuration.Contains(AVX2))">NotSet</EnableEnhancedInstructionSet>
|
||||
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='x64' And $(Configuration.Contains(AVX2))">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
||||
<!-- Allow SSE4 intrinsics on non-AVX Clang-cl builds -->
|
||||
<AdditionalOptions Condition="'$(Platform)'=='x64' And $(Configuration.Contains(Clang)) And !$(Configuration.Contains(AVX2))"> -march=nehalem %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions Condition="'$(Platform)'=='ARM64' And $(Configuration.Contains(Clang))"> -march=armv8.4-a %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions Condition="!$(Configuration.Contains(Clang))">%(AdditionalOptions) /Zc:externConstexpr /Zc:__cplusplus /Zo /utf-8</AdditionalOptions>
|
||||
|
||||
<!-- Force ThinLTO for Release builds, MSVC doesn't seem to do it otherwise. -->
|
||||
<!-- Also due to include order, needs to be set here, rather than in CodeGen_Release.props -->
|
||||
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And $(Configuration.Contains(Release))"> -flto=thin %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>dxguid.lib;dinput8.lib;hid.lib;PowrProf.lib;d3dcompiler.lib;d3d11.lib;d3d12.lib;dxgi.lib;strmiids.lib;comsuppw.lib;OneCore.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Platform)'!='ARM64'">opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
90
common/vsprops/preBuild.cmd
Normal file
90
common/vsprops/preBuild.cmd
Normal file
@@ -0,0 +1,90 @@
|
||||
::@echo off
|
||||
:: This file GENERATES the automatic GIT revision/version tag.
|
||||
:: It uses the git.exe program to create an "svnrev.h" file for whichever
|
||||
:: project is being compiled, during the project's pre-build step.
|
||||
::
|
||||
:: The git.exe program is part of the msysgit installation.
|
||||
::
|
||||
:: MsysGit can be downloaded from http://msysgit.github.io/
|
||||
::
|
||||
:: Usage: preBuild.cmd ProjectSrcDir VspropsDir
|
||||
::
|
||||
:: ProjectSrcDir - $(ProjectDir)\.. - Top-level Directory of project source code.
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
|
||||
|
||||
IF EXIST "%ProgramFiles(x86)%\Git\bin\git.exe" SET "GITPATH=%ProgramFiles(x86)%\Git\bin"
|
||||
IF EXIST "%ProgramFiles%\Git\bin\git.exe" SET "GITPATH=%ProgramFiles%\Git\bin"
|
||||
IF EXIST "%ProgramW6432%\Git\bin\git.exe" SET "GITPATH=%ProgramW6432%\Git\bin"
|
||||
IF DEFINED GITPATH SET "PATH=%PATH%;%GITPATH%"
|
||||
|
||||
git describe --tags > NUL 2>NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
FOR /F %%i IN ('"git describe --tags 2> NUL"') do (
|
||||
set GIT_REV=%%i
|
||||
)
|
||||
) else (
|
||||
FOR /F %%i IN ('"git rev-parse --short HEAD 2> NUL"') do (
|
||||
set GIT_REV=%%i
|
||||
)
|
||||
)
|
||||
|
||||
FOR /F "tokens=* USEBACKQ" %%i IN (`git tag --points-at HEAD`) DO (
|
||||
set GIT_TAG=%%i
|
||||
)
|
||||
|
||||
FOR /F "tokens=* USEBACKQ" %%i IN (`git rev-parse HEAD`) DO (
|
||||
set GIT_HASH=%%i
|
||||
)
|
||||
|
||||
FOR /F "tokens=* USEBACKQ" %%i IN (`git log -1 "--format=%%cd" "--date=local"`) DO (
|
||||
set GIT_DATE=%%i
|
||||
)
|
||||
|
||||
SET SIGNATURELINE=// R[%GIT_REV%] H[%GIT_HASH%] T[%GIT_TAG%]
|
||||
SET /P EXISTINGLINE=<"%CD%\svnrev.h"
|
||||
|
||||
IF "%EXISTINGLINE%"=="%SIGNATURELINE%" (
|
||||
goto cleanup
|
||||
)
|
||||
|
||||
ECHO Updating "%CD%\svnrev.h"...
|
||||
echo %SIGNATURELINE%> "%CD%\svnrev.h"
|
||||
|
||||
echo #define GIT_HASH "%GIT_HASH%" >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAG "%GIT_TAG%" >> "%CD%\svnrev.h"
|
||||
echo #define GIT_DATE "%GIT_DATE%" >> "%CD%\svnrev.h"
|
||||
|
||||
echo %GIT_TAG%|FINDSTR /R "^v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$" > NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
echo #define GIT_REV "%GIT_TAG%" >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAGGED_COMMIT 1 >> "%CD%\svnrev.h"
|
||||
FOR /F "tokens=1,2,3 delims=v." %%a in ("%GIT_TAG%") DO (
|
||||
echo #define GIT_TAG_HI %%a >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAG_MID %%b >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAG_LO %%c >> "%CD%\svnrev.h"
|
||||
)
|
||||
) else (
|
||||
:: Local branches
|
||||
echo #define GIT_REV "%GIT_REV%" >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAGGED_COMMIT 0 >> "%CD%\svnrev.h"
|
||||
echo %GIT_REV%|FINDSTR /R "^v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]-*" > NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
FOR /F "tokens=1,2,3 delims=v." %%a in ("%GIT_REV%") DO (
|
||||
echo #define GIT_TAG_HI %%a >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAG_MID %%b >> "%CD%\svnrev.h"
|
||||
FOR /F "tokens=1 delims=-" %%d in ("%%c%") DO (
|
||||
echo #define GIT_TAG_LO %%d >> "%CD%\svnrev.h"
|
||||
)
|
||||
)
|
||||
) else (
|
||||
echo #define GIT_TAG_HI 0 >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAG_MID 0 >> "%CD%\svnrev.h"
|
||||
echo #define GIT_TAG_LO 0 >> "%CD%\svnrev.h"
|
||||
)
|
||||
)
|
||||
|
||||
:cleanup
|
||||
ENDLOCAL
|
||||
:: Always return an errorlevel of 0 -- this allows compilation to continue if SubWCRev failed.
|
||||
exit /B 0
|
||||
29
common/vsprops/readme.txt
Normal file
29
common/vsprops/readme.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
Decriptions of Provided .vsprops Sheets
|
||||
---------------------------------------
|
||||
|
||||
* plugin_svnroot - Provides a set of semi-standard user macros for plugins that
|
||||
conform to an expected folder layout. Each user macro can be optionally overridden
|
||||
by the plugin using its own property sheet, if needed.
|
||||
|
||||
See the contents of plugin_svnroot for explanations of the User Macros used by all
|
||||
other properties sheets lested below.
|
||||
|
||||
|
||||
* 3rdPartyDeps - Adds the /deps folder to the linker search path. Does not add
|
||||
any actual dependencies. You must add those manually.
|
||||
|
||||
* pthreads - Adds the w32pthreads library to your project, along with the expected
|
||||
compiler defines for correctly compiling and linking pthreads.
|
||||
|
||||
* BaseProperties - Sets up standard Output and Intermediate directories, warning levels,
|
||||
struct alignment, and other settings required for Pcsx2 and its libs to link in
|
||||
a workable fashion. Adds standard preprocessor defines for:
|
||||
__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
* IncrementalLinking - Enables incremental linking, for use in devel/debug modes only.
|
||||
Incremental linking force-disables Whole Program Optimization, but builds the result
|
||||
.exe/.dll much quicker usually.
|
||||
|
||||
* GlobalLinking - Enables full support for Whole Program Optimization, and force-
|
||||
disables any conflicting incremental link settings.
|
||||
Reference in New Issue
Block a user