Skip to content

Commit

Permalink
Share build and version between dxwrapper and stub
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Nov 6, 2024
1 parent d7906d4 commit 289f96d
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7260
#define BUILD_NUMBER 7300
8 changes: 8 additions & 0 deletions Dllmain/Resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once

#include "..\Dllmain\BuildNo.rc"

#define APP_MAJOR 1
#define APP_MINOR 2
#define APP_BUILDNUMBER BUILD_NUMBER
#define APP_REVISION 25
6 changes: 1 addition & 5 deletions Dllmain/dxwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
// Microsoft Visual C++ generated include file.
// Used by dxwrapper.rc

#include "Dllmain\BuildNo.rc"
#include "..\Dllmain\Resource.h"

// Main resource file details
#define APP_NAME "DirectX Dynamic Link Library"
#define APP_MAJOR 1
#define APP_MINOR 2
#define APP_BUILDNUMBER BUILD_NUMBER
#define APP_REVISION 25
#define APP_COMPANYNAME "Sadrate Presents"
#define APP_DESCRPTION "Wraps or hooks DirectX files to fix compatibility issues in older games. Also allows code to be executed from inside the application."
#define APP_COPYRIGHT "Copyright (C) 2024 Elisha Riedlinger"
Expand Down
1 change: 0 additions & 1 deletion Stub/BuildNo.rc

This file was deleted.

6 changes: 1 addition & 5 deletions Stub/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
// Microsoft Visual C++ generated include file.
// Used by stub.rc

#include "BuildNo.rc"
#include "..\Dllmain\Resource.h"

// Main resource file details
#define APP_NAME "DxWrapper Stub"
#define APP_MAJOR 1
#define APP_MINOR 0
#define APP_BUILDNUMBER BUILD_NUMBER
#define APP_REVISION 1
#define APP_COMPANYNAME "Sadrate Presents"
#define APP_DESCRPTION "Stub for DxWrapper. Supports: bcrypt.dll, cryptsp.dll, d2d1.dll, d3d8.dll, d3d9.dll, d3d10.dll, d3d11.dll, d3d12.dll, dciman32.dll, ddraw.dll, dinput.dll, dinput8.dll, dplayx.dll, dsound.dll, msacm32.dll, msvfw32.dll, version.dll, winmm.dll, winmmbase.dll" // Can only be 256 characters long
#define APP_COPYRIGHT "Copyright (C) 2024 Elisha Riedlinger"
Expand Down
8 changes: 0 additions & 8 deletions Stub/stub.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ copy /Y "$(TargetDir)$(TargetName).dll" "$(TargetDir)Build\Stub\wsock32.dll" &gt
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<PreBuildEvent>
<Command>cmd /c "@echo off &amp;&amp; cd /D ""$(ProjectDir)"" &amp;&amp; if not exist BuildNo.rc echo #define BUILD_NUMBER 0 &gt;BuildNo.rc"
cmd /c "@echo off &amp;&amp; cd /D ""$(ProjectDir)"" &amp;&amp; FOR /F "tokens=3" %%i IN (BuildNo.rc) DO set /a var=%%i+1 &gt;Build.txt"
cmd /c "@echo off &amp;&amp; cd /D ""$(ProjectDir)"" &amp;&amp; FOR /F %%i IN (Build.txt) DO echo #define BUILD_NUMBER %%i &gt;BuildNo.rc"
cmd /c "@echo off &amp;&amp; cd /D ""$(ProjectDir)"" &amp;&amp; del Build.txt"
cmd /c "@echo off &amp;&amp; cd /D ""$(ProjectDir)"" &amp;&amp; type BuildNo.rc"</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>IF NOT EXIST "$(TargetDir)Build" mkdir "$(TargetDir)Build" &gt;nul
IF NOT EXIST "$(TargetDir)Build\Stub" mkdir "$(TargetDir)Build\Stub" &gt;nul
Expand Down Expand Up @@ -297,7 +290,6 @@ copy /Y "$(TargetDir)$(TargetName).dll" "$(TargetDir)Build\Stub\wsock32.dll" &gt
<None Include="..\Wrappers\wrapper.def" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BuildNo.rc" />
<ResourceCompile Include="stub.rc" />
</ItemGroup>
<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion Stub/stub.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BuildNo.rc" />
<ResourceCompile Include="stub.rc" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions dxwrapper.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dxwrapper", "dxwrapper.vcxp
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub", "Stub\stub.vcxproj", "{E204DCB3-D122-4F2E-88A8-89AC22CE3274}"
ProjectSection(ProjectDependencies) = postProject
{579E7FE7-2745-4100-A802-23511711FCDE} = {579E7FE7-2745-4100-A802-23511711FCDE}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "depot", "depot", "{6F83E1F5-98B8-4834-913B-52E129EB4822}"
EndProject
Expand Down
1 change: 1 addition & 0 deletions dxwrapper.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@ copy /Y "$(ProjectDir)Settings\Settings.ini" "$(TargetDir)Build\dxwrapper.ini" &
<ClInclude Include="Disasm\disasm.h" />
<ClInclude Include="Dllmain\Dllmain.h" />
<ClInclude Include="Dllmain\dxwrapper.h" />
<ClInclude Include="Dllmain\Resource.h" />
<ClInclude Include="dsound\AddressLookupTable.h" />
<ClInclude Include="dsound\dsound.h" />
<ClInclude Include="dsound\dsoundExternal.h" />
Expand Down
3 changes: 3 additions & 0 deletions dxwrapper.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,9 @@
<ClInclude Include="DDrawCompat\v0.3.2\Win32\Version.h">
<Filter>DDrawCompat\v0.3.2</Filter>
</ClInclude>
<ClInclude Include="Dllmain\Resource.h">
<Filter>Dllmain</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Dllmain\BuildNo.rc">
Expand Down

0 comments on commit 289f96d

Please sign in to comment.