Browse Source

Merge branch 'develop' of github.com:ethereum/cpp-ethereum into develop

cl-refactor
Gav Wood 11 years ago
parent
commit
175b061c38
  1. 2
      test/hexPrefix.cpp
  2. 2
      test/trie.cpp
  3. 33
      windows/Alethzero.vcxproj
  4. 3
      windows/Alethzero.vcxproj.filters
  5. 25
      windows/BuildInfo.lua
  6. 25
      windows/Ethereum.vcxproj
  7. 16
      windows/Ethereum.vcxproj.filters
  8. 6
      windows/LibEthereum.props
  9. 6
      windows/UseQt.props

2
test/hexPrefix.cpp

@ -46,7 +46,7 @@ public:
cnote << i.first; cnote << i.first;
bytes v; bytes v;
for (auto& i: o["seq"].get_array()) for (auto& i: o["seq"].get_array())
v.push_back(i.get_int()); v.push_back((byte)i.get_int());
auto e = hexPrefixEncode(v, o["term"].get_bool()); auto e = hexPrefixEncode(v, o["term"].get_bool());
if (!o["out"].is_null() && o["out"].get_str() != asHex(e)) if (!o["out"].is_null() && o["out"].get_str() != asHex(e))
{ {

2
test/trie.cpp

@ -53,7 +53,7 @@ public:
vector<pair<string, string>> ss; vector<pair<string, string>> ss;
for (auto& i: o["in"].get_obj()) for (auto& i: o["in"].get_obj())
ss.push_back(make_pair(i.first, i.second.get_str())); ss.push_back(make_pair(i.first, i.second.get_str()));
for (unsigned j = 0; j < fac(ss.size()); ++j) for (unsigned j = 0; j < fac((unsigned)ss.size()); ++j)
{ {
next_permutation(ss.begin(), ss.end()); next_permutation(ss.begin(), ss.end());
BasicMap m; BasicMap m;

33
windows/Alethzero.vcxproj

@ -170,17 +170,17 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="..\alethzero\MainWin.h"> <CustomBuild Include="..\alethzero\MainWin.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)moc_%(FileName).cpp</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)moc_%(FileName).cpp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</Message> </Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</Message> </Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</Message> </Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</Message> </Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)moc_%(FileName).cpp</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)moc_%(FileName).cpp</Outputs>
@ -206,6 +206,31 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)ui_%(FileName).h</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)ui_%(FileName).h</Outputs>
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup>
<CustomBuild Include="BuildInfo.lua">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(FileName).h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(FileName).h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(FileName).h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(FileName).h</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../.git/index</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

3
windows/Alethzero.vcxproj.filters

@ -24,5 +24,8 @@
<ItemGroup> <ItemGroup>
<CustomBuild Include="..\alethzero\MainWin.h" /> <CustomBuild Include="..\alethzero\MainWin.h" />
<CustomBuild Include="..\alethzero\Main.ui" /> <CustomBuild Include="..\alethzero\Main.ui" />
<CustomBuild Include="BuildInfo.lua">
<Filter>Windows</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
</Project> </Project>

25
windows/BuildInfo.lua

@ -0,0 +1,25 @@
function os.capture(cmd)
local f = io.popen(cmd, 'r')
if (f) then
local s = f:read('*a')
if (f:close()) then
return s
end
end
return nil
end
hash = (os.capture("git rev-parse HEAD") or "UnknownRevision"):gsub("\n$", "")
clean = ((os.capture("git diff --name-only") or "0"):gsub("\n$", "") == "") and "1" or "0"
local output = io.open(arg[1], "w")
if (output) then
output:write("// This file was automatically generated by buildinfo.lua\n#pragma once\n\n")
output:write("#define ETH_COMMIT_HASH "..hash.."\n")
output:write("#define ETH_CLEAN_REPO "..clean.."\n")
output:close()
end

25
windows/Ethereum.vcxproj

@ -160,6 +160,31 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="..\eth\main.cpp" /> <ClCompile Include="..\eth\main.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<CustomBuild Include="BuildInfo.lua">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(FileName).h</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(FileName).h</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(FileName).h</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(FileName).h</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../.git/index</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

16
windows/Ethereum.vcxproj.filters

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\eth\main.cpp" />
</ItemGroup>
<ItemGroup>
<Filter Include="Windows">
<UniqueIdentifier>{ed0eafbf-bbfb-4700-b7c0-9b58049cc681}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="BuildInfo.lua">
<Filter>Windows</Filter>
</CustomBuild>
</ItemGroup>
</Project>

6
windows/LibEthereum.props

@ -3,6 +3,7 @@
<ImportGroup Label="PropertySheets" /> <ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros"> <PropertyGroup Label="UserMacros">
<BoostDir>../../boost</BoostDir> <BoostDir>../../boost</BoostDir>
<Lua>"../../lua/lua"</Lua>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<OutDir>..\..\_build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir> <OutDir>..\..\_build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir>
@ -14,7 +15,7 @@
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<AdditionalIncludeDirectories>include/$(ProjectName);../libethereum;$(BoostDir);../../leveldb/include;../../cryptopp;../secp256k1;../../miniupnp</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>include/$(ProjectName);$(IntDir);../libethereum;$(BoostDir);../../leveldb/include;../../cryptopp;../secp256k1;../../miniupnp</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ETH_BUILD_PLATFORM=Windows/VS2013;ETH_BUILD_TYPE=$(Configuration)-$(Platform);STATICLIB;LEVELDB_PLATFORM_WINDOWS;USE_NUM_BOOST;USE_FIELD_10X26;USE_FIELD_INV_BUILTIN;_WIN32_WINNT=0x0501;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>ETH_BUILD_PLATFORM=Windows/VS2013;ETH_BUILD_TYPE=$(Configuration)-$(Platform);STATICLIB;LEVELDB_PLATFORM_WINDOWS;USE_NUM_BOOST;USE_FIELD_10X26;USE_FIELD_INV_BUILTIN;_WIN32_WINNT=0x0501;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -27,5 +28,8 @@
<BuildMacro Include="BoostDir"> <BuildMacro Include="BoostDir">
<Value>$(BoostDir)</Value> <Value>$(BoostDir)</Value>
</BuildMacro> </BuildMacro>
<BuildMacro Include="Lua">
<Value>$(Lua)</Value>
</BuildMacro>
</ItemGroup> </ItemGroup>
</Project> </Project>

6
windows/UseQt.props

@ -6,13 +6,12 @@
<QtBin>$(QtDir)/qtbase/bin</QtBin> <QtBin>$(QtDir)/qtbase/bin</QtBin>
<QtInclude>$(QtDir)/qtbase/include;../../Qt/Src/qtbase/include</QtInclude> <QtInclude>$(QtDir)/qtbase/include;../../Qt/Src/qtbase/include</QtInclude>
<QtLib>$(QtDir)/qtbase/lib;$(QtDir)/qtbase/plugins/platforms</QtLib> <QtLib>$(QtDir)/qtbase/lib;$(QtDir)/qtbase/plugins/platforms</QtLib>
<Lua>../../lua/lua</Lua>
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<ItemDefinitionGroup> <ItemDefinitionGroup>
<Link /> <Link />
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>..;$(IntDir);$(QtInclude);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..;$(QtInclude);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalLibraryDirectories>$(QtLib);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(QtLib);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@ -31,8 +30,5 @@
<BuildMacro Include="QtLib"> <BuildMacro Include="QtLib">
<Value>$(QtLib)</Value> <Value>$(QtLib)</Value>
</BuildMacro> </BuildMacro>
<BuildMacro Include="Lua">
<Value>$(Lua)</Value>
</BuildMacro>
</ItemGroup> </ItemGroup>
</Project> </Project>
Loading…
Cancel
Save