Browse Source

Merge pull request #1719 from arkpar/msvc

Windows build fixes
cl-refactor
Marek Kotewicz 10 years ago
parent
commit
2428fc106b
  1. 9
      extdep/getstuff.bat
  2. 6
      libdevcore/Log.cpp
  3. 8
      libdevcore/Log.h

9
extdep/getstuff.bat

@ -24,10 +24,10 @@ set eth_version=%2
cd download
if not exist %eth_name%-%eth_version%.tar.gz (
bitsadmin /cancel %eth_name%-%eth_version%.tar.gz
bitsadmin /create %eth_name%-%eth_version%.tar.gz
bitsadmin /transfer %eth_name%-%eth_version%.tar.gz /download /priority normal %eth_server%/%eth_name%-%eth_version%.tar.gz %cd%\%eth_name%-%eth_version%.tar.gz
bitsadmin /cancel %eth_name%-%eth_version%.tar.gz
for /f "tokens=2 delims={}" %%g in ('bitsadmin /create %eth_name%-%eth_version%.tar.gz') do (
bitsadmin /transfer {%%g} /download /priority normal %eth_server%/%eth_name%-%eth_version%.tar.gz %cd%\%eth_name%-%eth_version%.tar.gz
bitsadmin /cancel {%%g}
)
)
if not exist %eth_name%-%eth_version% cmake -E tar -zxvf %eth_name%-%eth_version%.tar.gz
cmake -E copy_directory %eth_name%-%eth_version% ..\install\windows
@ -35,3 +35,4 @@ cmake -E copy_directory %eth_name%-%eth_version% ..\install\windows
cd ..
goto :EOF

6
libdevcore/Log.cpp

@ -24,6 +24,7 @@
#include <string>
#include <iostream>
#include <thread>
#include <boost/asio/ip/tcp.hpp>
#include "Guards.h"
using namespace std;
using namespace dev;
@ -69,6 +70,11 @@ LogOutputStreamBase::LogOutputStreamBase(char const* _id, std::type_info const*
}
}
void LogOutputStreamBase::append(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const& _t)
{
m_sstr << EthNavyUnder "tcp://" << _t << EthReset;
}
/// Associate a name with each thread for nice logging.
struct ThreadLocalLogName
{

8
libdevcore/Log.h

@ -26,7 +26,6 @@
#include <ctime>
#include <chrono>
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include "vector_ref.h"
#include "Common.h"
#include "CommonIO.h"
@ -34,6 +33,8 @@
#include "FixedHash.h"
#include "Terminal.h"
namespace boost { namespace asio { namespace ip { template<class T>class basic_endpoint; class tcp; } } }
namespace dev
{
@ -125,6 +126,7 @@ public:
void append(std::string const& _t) { m_sstr << EthGreen "\"" + _t + "\"" EthReset; }
void append(bytes const& _t) { m_sstr << EthYellow "%" << toHex(_t) << EthReset; }
void append(bytesConstRef _t) { m_sstr << EthYellow "%" << toHex(_t) << EthReset; }
void append(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const& _t);
template <class T> void append(std::vector<T> const& _t)
{
m_sstr << EthWhite "[" EthReset;
@ -172,10 +174,6 @@ public:
{
m_sstr << toString(_t);
}
template <class T> void append(boost::asio::ip::tcp::endpoint const& _t)
{
m_sstr << EthNavyUnder "tcp://" << _t << EthReset;
}
protected:
bool m_autospacing = false;

Loading…
Cancel
Save