Skip to content

Commit 48b52f8

Browse files
committed
Reuse the same resource file for the standalone compiler tool
1 parent fe15b8c commit 48b52f8

6 files changed

+15
-112
lines changed

ReShadeFXC.vcxproj

+13-4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
<GenerateDebugInformation>true</GenerateDebugInformation>
8686
<AdditionalDependencies>$(SolutionDir)intermediate\ReShade\$(Platform)\$(Configuration)\source\filesystem.obj;%(AdditionalDependencies)</AdditionalDependencies>
8787
</Link>
88+
<ResourceCompile>
89+
<PreprocessorDefinitions>RESHADE_FXC;WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
90+
</ResourceCompile>
8891
</ItemDefinitionGroup>
8992
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
9093
<ClCompile>
@@ -101,6 +104,9 @@
101104
<GenerateDebugInformation>true</GenerateDebugInformation>
102105
<AdditionalDependencies>$(SolutionDir)intermediate\ReShade\$(Platform)\$(Configuration)\source\filesystem.obj;%(AdditionalDependencies)</AdditionalDependencies>
103106
</Link>
107+
<ResourceCompile>
108+
<PreprocessorDefinitions>RESHADE_FXC;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
109+
</ResourceCompile>
104110
</ItemDefinitionGroup>
105111
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
106112
<ClCompile>
@@ -122,6 +128,9 @@
122128
<GenerateDebugInformation>true</GenerateDebugInformation>
123129
<AdditionalDependencies>$(SolutionDir)intermediate\ReShade\$(Platform)\$(Configuration)\source\filesystem.obj;%(AdditionalDependencies)</AdditionalDependencies>
124130
</Link>
131+
<ResourceCompile>
132+
<PreprocessorDefinitions>RESHADE_FXC;WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
133+
</ResourceCompile>
125134
</ItemDefinitionGroup>
126135
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
127136
<ClCompile>
@@ -143,6 +152,9 @@
143152
<GenerateDebugInformation>true</GenerateDebugInformation>
144153
<AdditionalDependencies>$(SolutionDir)intermediate\ReShade\$(Platform)\$(Configuration)\source\filesystem.obj;%(AdditionalDependencies)</AdditionalDependencies>
145154
</Link>
155+
<ResourceCompile>
156+
<PreprocessorDefinitions>RESHADE_FXC;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
157+
</ResourceCompile>
146158
</ItemDefinitionGroup>
147159
<ItemGroup>
148160
<ProjectReference Include="ReShadeFX.vcxproj">
@@ -153,10 +165,7 @@
153165
<ClCompile Include="tools\fxc.cpp" />
154166
</ItemGroup>
155167
<ItemGroup>
156-
<ClInclude Include="res\version.h" />
157-
</ItemGroup>
158-
<ItemGroup>
159-
<ResourceCompile Include="res\fxc.rc" />
168+
<ResourceCompile Include="res\resource.rc" />
160169
</ItemGroup>
161170
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
162171
</Project>

ReShadeFXC.vcxproj.filters

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<ItemGroup>
4-
<Filter Include="resources">
5-
<UniqueIdentifier>{614d966d-6c3d-445d-a43c-6ecc9ec0fde7}</UniqueIdentifier>
6-
</Filter>
7-
</ItemGroup>
83
<ItemGroup>
94
<ClCompile Include="tools\fxc.cpp" />
105
</ItemGroup>
116
<ItemGroup>
12-
<ClInclude Include="res\version.h">
13-
<Filter>resources</Filter>
14-
</ClInclude>
15-
</ItemGroup>
16-
<ItemGroup>
17-
<ResourceCompile Include="res\fxc.rc">
18-
<Filter>resources</Filter>
19-
</ResourceCompile>
7+
<ResourceCompile Include="res\resource.rc" />
208
</ItemGroup>
219
</Project>

res/fxc.rc

-94
This file was deleted.

res/resource.rc

60 Bytes
Binary file not shown.

res/resource.rc2

1.53 KB
Binary file not shown.

tools/fxc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ int main(int argc, char *argv[])
172172
backend = reshadefx::codegen::backend::hlsl;
173173
}
174174

175-
reshadefx::parser parser(backend);
175+
reshadefx::parser parser(backend, shader_model);
176176

177177
if (!parser.parse(pp.current_output()))
178178
{

0 commit comments

Comments
 (0)