Skip to content

Commit

Permalink
Moved version processing to the build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyONeal committed Aug 6, 2013
1 parent 1f96503 commit 8601e6b
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ UpgradeLog.XML
thirdParty/cryptopp562/adhoc.cpp
*.vsp
TestResults/*
Drop
5 changes: 3 additions & 2 deletions pevFind/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/trim.hpp>
#include "../pevLib/utility.h"
#include "../pevLib/Version.hpp"

//Subprogram definitions
#include "../pevLib/clsidCompressor.h"
Expand Down Expand Up @@ -81,14 +80,16 @@ int __cdecl wmain(int argc, wchar_t* argv[])
}
catch (std::exception& except)
{
#define STRINGIZE_LITERAL(x) #x
#define STRINGIZE(x) STRINGIZE_LITERAL(x)
std::cerr <<
" _____ _ _ \n"
" _ __ _____ _| ___(_)_ __ __| |\n"
" | '_ \\ / _ \\ \\ / / |_ | | '_ \\ / _` |\n"
" | |_) | __/\\ V /| _| | | | | | (_| |\n"
" | .__/ \\___| \\_/ |_| |_|_| |_|\\__,_|\n"
" |_| by Billy Robert O'Neal III\n"
" Version " PEVFIND_VERSION "\n"
" Version " STRINGIZE(PEVFIND_VERSION) "\n"
" Distributed under the Boost Software License, Version 1.0.\n"
" http://www.boost.org/LICENSE_1_0.txt\n"
"pevFind contains some code from Info-ZIP, used with permission.\n"
Expand Down
10 changes: 10 additions & 0 deletions pevFind/pevFind.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(SolutionDir)pevFindCpp.props" />
<PropertyGroup Condition="'$(Platform)'=='Win32'">
<DropFileName>pevFind_$(PevFindVersion).exe</DropFileName>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'">
<DropFileName>pevFind_$(PevFindVersion)_x64.exe</DropFileName>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down Expand Up @@ -55,4 +61,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="AfterBuild" Condition="'$(Configuration)'!='Debug'">
<MakeDir Directories="$(OutDir)..\..\Drop" />
<Copy SourceFiles="$(TargetPath)" DestinationFiles="$(OutDir)..\..\Drop\$(DropFileName)" />
</Target>
</Project>
4 changes: 1 addition & 3 deletions pevFindCpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
<OutDir>$(SolutionDir)Build\$(Configuration)_$(Platform)\</OutDir>
<IntDir>$(OutDir)Intermediate\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'">
<TargetName>$(ProjectName)_x64</TargetName>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)\pevFindVersion.props" />
<ItemDefinitionGroup>
<ClCompile>
<SDLCheck>true</SDLCheck>
Expand Down
11 changes: 11 additions & 0 deletions pevFindVersion.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PevFindVersion>1.5.17</PevFindVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>PEVFIND_VERSION=$(PevFindVersion);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
</Project>
8 changes: 0 additions & 8 deletions pevLib/Version.hpp

This file was deleted.

3 changes: 1 addition & 2 deletions pevLib/pevLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
<ClInclude Include="unzip.h" />
<ClInclude Include="utility.h" />
<ClInclude Include="uZip.h" />
<ClInclude Include="Version.hpp" />
<ClInclude Include="vFind.h" />
<ClInclude Include="volumeEnumerate.h" />
<ClInclude Include="wait.hpp" />
Expand Down Expand Up @@ -132,4 +131,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
5 changes: 1 addition & 4 deletions pevLib/pevLib.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,5 @@
<ClInclude Include="pch.hpp">
<Filter>Header Files\Precompiled</Filter>
</ClInclude>
<ClInclude Include="Version.hpp">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
</Project>

0 comments on commit 8601e6b

Please sign in to comment.