lbrycrd/build_msvc
Jim Posen 2068f089c8 scripted-diff: Move util files to separate directory.
-BEGIN VERIFY SCRIPT-
mkdir -p src/util
git mv src/util.h src/util/system.h
git mv src/util.cpp src/util/system.cpp
git mv src/utilmemory.h src/util/memory.h
git mv src/utilmoneystr.h src/util/moneystr.h
git mv src/utilmoneystr.cpp src/util/moneystr.cpp
git mv src/utilstrencodings.h src/util/strencodings.h
git mv src/utilstrencodings.cpp src/util/strencodings.cpp
git mv src/utiltime.h src/util/time.h
git mv src/utiltime.cpp src/util/time.cpp

sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')

sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h
sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h

sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am
sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am

sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh
sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
-END VERIFY SCRIPT-
2018-11-04 22:46:07 -08:00
..
bench_bitcoin Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
bitcoin-cli Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
bitcoin-tx Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
bitcoind Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
libbitcoin_cli auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoin_common auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoin_crypto auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoin_qt Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
libbitcoin_server auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoin_util auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoin_wallet auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoin_zmq auto generate MSVC project files 2018-08-26 23:54:26 +08:00
libbitcoinconsensus scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
libunivalue Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
msbuild/tasks Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
test_bitcoin wallet: Add walletdir arg unit tests 2018-09-12 21:05:53 -04:00
test_bitcoin-qt Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
testconsensus Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
.gitignore auto generate MSVC project files 2018-08-26 23:54:26 +08:00
bitcoin.sln Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
bitcoin_config.h Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
common.init.vcxproj Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00
common.vcxproj Make MSVC compiler read the source code using utf-8 2018-09-26 08:47:42 +08:00
msvc-autogen.py auto generate MSVC project files 2018-08-26 23:54:26 +08:00
README.md auto generate MSVC project files 2018-08-26 23:54:26 +08:00

Building Bitcoin Core with Visual Studio

Introduction

Solution and project files to build the Bitcoin Core applications (except Qt dependent ones) with Visual Studio 2017 can be found in the build_msvc directory.

Building with Visual Studio is an alternative to the Linux based cross-compiler build.

Dependencies

A number of open source libraries are required in order to be able to build Bitcoin.

Options for installing the dependencies in a Visual Studio compatible manner are:

  • Use Microsoft's vcpkg to download the source packages and build locally. This is the recommended approach.
  • Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files.
  • Use nuget packages with the understanding that any binary files have been compiled by an untrusted third party.

The external dependencies required for the Visual Studio build are (see the dependencies doc for versions):

  • Berkeley DB,
  • OpenSSL,
  • Boost,
  • libevent,
  • ZeroMQ

Additional dependencies required from the bitcoin-core github repository are:

  • SECP256K1,
  • LevelDB

Building

The instructions below use vcpkg to install the dependencies.

  • Clone and vcpkg from the github repository and install as per the instructions in the main README.md.
  • Install the required packages (replace x64 with x86 as required):
  • Install the required dependencies with vcpkg:
    PS >.\vcpkg install boost:x64-windows-static `
    libevent:x64-windows-static `
    openssl:x64-windows-static `
    zeromq:x64-windows-static `
    berkeleydb:x64-windows-static `
    secp256k1:x64-windows-static `
    leveldb:x64-windows-static
  • Use Python to generate *.vcxproj from Makefile
    PS >python msvc-autogen.py
  • Build in Visual Studio.