mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 22:09:35 +00:00
Add getRevision.bat
Add pre-build step in Visual Studio projects to generate Revision.h
This commit is contained in:
parent
a3807827c0
commit
b20090c06c
|
@ -150,6 +150,9 @@
|
|||
<PostBuildEvent>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -182,6 +185,9 @@
|
|||
<PostBuildEvent>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus_uniformset|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -247,6 +253,9 @@
|
|||
<PostBuildEvent>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_mupenplus|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -285,6 +294,9 @@
|
|||
<PostBuildEvent>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\3DMath.cpp" />
|
||||
|
|
|
@ -151,6 +151,9 @@
|
|||
<PostBuildEvent>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -181,6 +184,9 @@
|
|||
<Message>Copy result to plugins folder</Message>
|
||||
<Command>copy /Y "$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir)"</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus_uniformset|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -244,6 +250,9 @@
|
|||
<Command>copy /Y "$(OutDir)$(TargetName).*" "$(N64PluginsDir)"</Command>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_mupenplus|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -282,6 +291,9 @@
|
|||
<PostBuildEvent>
|
||||
<Message>Copy result to plugins folder</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>call ..\..\src\getRevision.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\3DMath.cpp" />
|
||||
|
|
7
src/getRevision.bat
Normal file
7
src/getRevision.bat
Normal file
|
@ -0,0 +1,7 @@
|
|||
@echo off
|
||||
set "SCRIPT_DIRECTORY=%~dp0"
|
||||
|
||||
for /f "delims=" %%A in ('git rev-parse --short HEAD') do set "rev=%%A"
|
||||
echo current revision %rev%
|
||||
echo #define PLUGIN_REVISION "%rev%">%SCRIPT_DIRECTORY%/Revision.h
|
||||
echo #define PLUGIN_REVISION_W L"%rev%">>%SCRIPT_DIRECTORY%/Revision.h
|
Loading…
Reference in New Issue
Block a user