Permalink
Browse files

Add gen_version_win.bat for windows builds

  • Loading branch information...
JonnyH committed Sep 10, 2015
1 parent cc41d93 commit be2c0784ba24dd4b065ffb6752536f1c01d1e0db
Showing with 51 additions and 0 deletions.
  1. +40 −0 OpenApoc.vcxproj
  2. +11 −0 gen_version_win.bat
View
@@ -71,23 +71,27 @@
<LinkIncremental>true</LinkIncremental>
<LibraryPath>$(LIB);$(LibraryPath)</LibraryPath>
<IncludePath>$(ProjectDir)\dependencies\physfs\src;$(ProjectDir)\dependencies\tinyxml2;$(ProjectDir)\dependencies\allegro\addons\physfs;$(ProjectDir)\dependencies\allegro\addons\native_dialog;$(ProjectDir)\dependencies\allegro\addons\primitives;$(ProjectDir)\dependencies\allegro\addons\ttf;$(ProjectDir)\dependencies\allegro\addons\image;$(ProjectDir)\dependencies\allegro\addons\font;$(ProjectDir)\dependencies\allegro\addons\color;$(ProjectDir)\dependencies\allegro\addons\acodec;$(ProjectDir)\dependencies\allegro\addons\audio;$(ProjectDir)\dependencies\include;$(ProjectDir)\dependencies\allegro\include;$(ProjectDir)\dependencies\icu55\source\io;$(ProjectDir)\dependencies\icu55\source\i18n;$(ProjectDir)\dependencies\icu55\source\common;$(ProjectDir)\dependencies\glm;$(IncludePath);$(ProjectDir)\</IncludePath>
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<LibraryPath>$(LIB);$(LibraryPath)</LibraryPath>
<IncludePath>$(ProjectDir)\dependencies\physfs\src;$(ProjectDir)\dependencies\tinyxml2;$(ProjectDir)\dependencies\allegro\addons\physfs;$(ProjectDir)\dependencies\allegro\addons\native_dialog;$(ProjectDir)\dependencies\allegro\addons\primitives;$(ProjectDir)\dependencies\allegro\addons\ttf;$(ProjectDir)\dependencies\allegro\addons\image;$(ProjectDir)\dependencies\allegro\addons\font;$(ProjectDir)\dependencies\allegro\addons\color;$(ProjectDir)\dependencies\allegro\addons\acodec;$(ProjectDir)\dependencies\allegro\addons\audio;$(ProjectDir)\dependencies\include;$(ProjectDir)\dependencies\allegro\include;$(ProjectDir)\dependencies\icu55\source\io;$(ProjectDir)\dependencies\icu55\source\i18n;$(ProjectDir)\dependencies\icu55\source\common;$(ProjectDir)\dependencies\glm;$(IncludePath);$(ProjectDir)\</IncludePath>
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
<LibraryPath>$(LIB);$(LibraryPath)</LibraryPath>
<IncludePath>$(ProjectDir)\dependencies\physfs\src;$(ProjectDir)\dependencies\tinyxml2;$(ProjectDir)\dependencies\allegro\addons\physfs;$(ProjectDir)\dependencies\allegro\addons\native_dialog;$(ProjectDir)\dependencies\allegro\addons\primitives;$(ProjectDir)\dependencies\allegro\addons\ttf;$(ProjectDir)\dependencies\allegro\addons\image;$(ProjectDir)\dependencies\allegro\addons\font;$(ProjectDir)\dependencies\allegro\addons\color;$(ProjectDir)\dependencies\allegro\addons\acodec;$(ProjectDir)\dependencies\allegro\addons\audio;$(ProjectDir)\dependencies\include;$(ProjectDir)\dependencies\allegro\include;$(ProjectDir)\dependencies\icu55\source\io;$(ProjectDir)\dependencies\icu55\source\i18n;$(ProjectDir)\dependencies\icu55\source\common;$(ProjectDir)\dependencies\glm;$(IncludePath);$(ProjectDir)\</IncludePath>
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<LibraryPath>$(LIB);$(LibraryPath)</LibraryPath>
<IncludePath>$(ProjectDir)\dependencies\physfs\src;$(ProjectDir)\dependencies\tinyxml2;$(ProjectDir)\dependencies\allegro\addons\physfs;$(ProjectDir)\dependencies\allegro\addons\native_dialog;$(ProjectDir)\dependencies\allegro\addons\primitives;$(ProjectDir)\dependencies\allegro\addons\ttf;$(ProjectDir)\dependencies\allegro\addons\image;$(ProjectDir)\dependencies\allegro\addons\font;$(ProjectDir)\dependencies\allegro\addons\color;$(ProjectDir)\dependencies\allegro\addons\acodec;$(ProjectDir)\dependencies\allegro\addons\audio;$(ProjectDir)\dependencies\include;$(ProjectDir)\dependencies\allegro\include;$(ProjectDir)\dependencies\icu55\source\io;$(ProjectDir)\dependencies\icu55\source\i18n;$(ProjectDir)\dependencies\icu55\source\common;$(ProjectDir)\dependencies\glm;$(IncludePath);$(ProjectDir)\</IncludePath>
<CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -118,6 +122,15 @@
<PostBuildEvent>
<Message>Copy ICU DLLs</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>gen_version_win.bat</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Generating version.h</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>version.h</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@@ -143,6 +156,15 @@
<PostBuildEvent>
<Message>Copy ICU DLLs</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>gen_version_win.bat</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Generating version.h</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>version.h</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -171,6 +193,15 @@
<PostBuildEvent>
<Message>Copy ICU DLLs</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>gen_version_win.bat</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Generating version.h</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>version.h</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -199,6 +230,15 @@
<PostBuildEvent>
<Message>Copy ICU DLLs</Message>
</PostBuildEvent>
<CustomBuildStep>
<Command>gen_version_win.bat</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Generating version.h</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>version.h</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="forms\checkbox.cpp" />
View
@@ -0,0 +1,11 @@
git describe --all --tags --long
if %ERRORLEVEL% NEQ 0 GOTO :error
for /f "delims=" %%i in ('git describe --all --tags --long') do echo #define OPENAPOC_VERSION "%%i" > version.h
GOTO :end
:error
echo #define OPENAPOC_VERSION "0.0-git_not_in_path" > version.h
GOTO :end
:end

0 comments on commit be2c078

Please sign in to comment.