diff options
Diffstat (limited to 'build_msvc')
-rw-r--r-- | build_msvc/.gitignore | 1 | ||||
-rw-r--r-- | build_msvc/README.md | 21 | ||||
-rw-r--r-- | build_msvc/common.vcxproj | 5 | ||||
-rw-r--r-- | build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj.in (renamed from build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj) | 2 | ||||
-rw-r--r-- | build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in (renamed from build_msvc/libbitcoin_common/libbitcoin_common.vcxproj) | 38 | ||||
-rw-r--r-- | build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in (renamed from build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj) | 20 | ||||
-rw-r--r-- | build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in (renamed from build_msvc/libbitcoin_server/libbitcoin_server.vcxproj) | 42 | ||||
-rw-r--r-- | build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in (renamed from build_msvc/libbitcoin_util/libbitcoin_util.vcxproj) | 18 | ||||
-rw-r--r-- | build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in (renamed from build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj) | 13 | ||||
-rw-r--r-- | build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in (renamed from build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj) | 5 | ||||
-rw-r--r-- | build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj | 10 | ||||
-rw-r--r-- | build_msvc/msvc-autogen.py | 63 | ||||
-rw-r--r-- | build_msvc/test_bitcoin/test_bitcoin.vcxproj | 2 |
13 files changed, 92 insertions, 148 deletions
diff --git a/build_msvc/.gitignore b/build_msvc/.gitignore index fbcd1077b3..d5aa22c05e 100644 --- a/build_msvc/.gitignore +++ b/build_msvc/.gitignore @@ -8,3 +8,4 @@ packages/* */Release */x64 *.vcxproj.user +*.vcxproj diff --git a/build_msvc/README.md b/build_msvc/README.md index 6de464e92f..63c5babf35 100644 --- a/build_msvc/README.md +++ b/build_msvc/README.md @@ -31,20 +31,19 @@ Additional dependencies required from the [bitcoin-core](https://github.com/bitc Building --------------------- -The instructions below use vcpkg to install the dependencies. +The instructions below use `vcpkg` to install the dependencies. -- Clone and vcpkg from the [github repository](https://github.com/Microsoft/vcpkg) and install as per the instructions in the main README.md. +- Clone `vcpkg` from the [github repository](https://github.com/Microsoft/vcpkg) 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 + PS >.\vcpkg install --triplet x64-windows-static boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb ``` -- Build in Visual Studio.
\ No newline at end of file +- Use Python to generate *.vcxproj from Makefile + +``` + PS >python msvc-autogen.py +``` + +- Build in Visual Studio. diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj index 3a53f3bad3..5c87026efe 100644 --- a/build_msvc/common.vcxproj +++ b/build_msvc/common.vcxproj @@ -12,4 +12,9 @@ Outputs="$(MSBuildThisFileDirectory)..\src\config\bitcoin-config.h"> <Copy SourceFiles="$(MSBuildThisFileDirectory)bitcoin_config.h" DestinationFiles="$(MSBuildThisFileDirectory)..\src\config\bitcoin-config.h" /> </Target> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + </ItemDefinitionGroup> </Project>
\ No newline at end of file diff --git a/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj b/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj.in index 623d24da10..b7265054fb 100644 --- a/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj +++ b/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj.in @@ -20,7 +20,7 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\src\rpc\client.cpp" /> +@SOURCE_FILES@ </ItemGroup> <ItemGroup> <None Include="packages.config" /> diff --git a/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj b/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in index e6d95ed5f3..42145c15ad 100644 --- a/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj +++ b/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in @@ -165,43 +165,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClInclude Include="..\..\src\base58.h" /> - <ClInclude Include="..\..\src\bech32.h" /> - <ClInclude Include="..\..\src\chainparams.h" /> - <ClInclude Include="..\..\src\coins.h" /> - <ClInclude Include="..\..\src\compressor.h" /> - <ClInclude Include="..\..\src\key.h" /> - <ClInclude Include="..\..\src\keystore.h" /> - <ClInclude Include="..\..\src\netaddress.h" /> - <ClInclude Include="..\..\src\netbase.h" /> - <ClInclude Include="..\..\src\policy\feerate.h" /> - <ClInclude Include="..\..\src\protocol.h" /> - <ClInclude Include="..\..\src\scheduler.h" /> - <ClInclude Include="..\..\src\script\sign.h" /> - <ClInclude Include="..\..\src\script\standard.h" /> - <ClInclude Include="..\..\src\warnings.h" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\src\base58.cpp" /> - <ClCompile Include="..\..\src\bech32.cpp" /> - <ClCompile Include="..\..\src\chainparams.cpp" /> - <ClCompile Include="..\..\src\coins.cpp" /> - <ClCompile Include="..\..\src\compressor.cpp" /> - <ClCompile Include="..\..\src\core_read.cpp" /> - <ClCompile Include="..\..\src\core_write.cpp" /> - <ClCompile Include="..\..\src\key.cpp" /> - <ClCompile Include="..\..\src\key_io.cpp" /> - <ClCompile Include="..\..\src\keystore.cpp" /> - <ClCompile Include="..\..\src\netaddress.cpp" /> - <ClCompile Include="..\..\src\netbase.cpp" /> - <ClCompile Include="..\..\src\policy\feerate.cpp" /> - <ClCompile Include="..\..\src\protocol.cpp" /> - <ClCompile Include="..\..\src\scheduler.cpp" /> - <ClCompile Include="..\..\src\script\descriptor.cpp" /> - <ClCompile Include="..\..\src\script\sign.cpp" /> - <ClCompile Include="..\..\src\script\ismine.cpp" /> - <ClCompile Include="..\..\src\script\standard.cpp" /> - <ClCompile Include="..\..\src\warnings.cpp" /> +@SOURCE_FILES@ </ItemGroup> <ItemGroup> <None Include="packages.config" /> diff --git a/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj b/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in index 50519d045f..a05125723a 100644 --- a/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj +++ b/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in @@ -151,25 +151,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClInclude Include="..\..\src\crypto\aes.h" /> - <ClInclude Include="..\..\src\crypto\chacha20.h" /> - <ClInclude Include="..\..\src\crypto\common.h" /> - <ClInclude Include="..\..\src\crypto\hmac_sha256.h" /> - <ClInclude Include="..\..\src\crypto\hmac_sha512.h" /> - <ClInclude Include="..\..\src\crypto\ripemd160.h" /> - <ClInclude Include="..\..\src\crypto\sha1.h" /> - <ClInclude Include="..\..\src\crypto\sha256.h" /> - <ClInclude Include="..\..\src\crypto\sha512.h" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\src\crypto\aes.cpp" /> - <ClCompile Include="..\..\src\crypto\chacha20.cpp" /> - <ClCompile Include="..\..\src\crypto\hmac_sha256.cpp" /> - <ClCompile Include="..\..\src\crypto\hmac_sha512.cpp" /> - <ClCompile Include="..\..\src\crypto\ripemd160.cpp" /> - <ClCompile Include="..\..\src\crypto\sha1.cpp" /> - <ClCompile Include="..\..\src\crypto\sha256.cpp" /> - <ClCompile Include="..\..\src\crypto\sha512.cpp" /> +@SOURCE_FILES@ </ItemGroup> <Import Label="configTarget" Project="..\common.vcxproj" /> </Project> diff --git a/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj b/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in index 9d4ac1a7f7..0a165d0b75 100644 --- a/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj +++ b/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in @@ -154,53 +154,13 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\..\src\addrdb.cpp" /> - <ClCompile Include="..\..\src\addrman.cpp" /> - <ClCompile Include="..\..\src\blockencodings.cpp" /> - <ClCompile Include="..\..\src\bloom.cpp" /> - <ClCompile Include="..\..\src\chain.cpp" /> - <ClCompile Include="..\..\src\checkpoints.cpp" /> - <ClCompile Include="..\..\src\consensus\tx_verify.cpp" /> - <ClCompile Include="..\..\src\dbwrapper.cpp" /> - <ClCompile Include="..\..\src\httprpc.cpp" /> - <ClCompile Include="..\..\src\httpserver.cpp" /> - <ClCompile Include="..\..\src\index\base.cpp" /> - <ClCompile Include="..\..\src\init.cpp" /> - <ClCompile Include="..\..\src\merkleblock.cpp" /> - <ClCompile Include="..\..\src\miner.cpp" /> - <ClCompile Include="..\..\src\net.cpp" /> - <ClCompile Include="..\..\src\net_processing.cpp" /> - <ClCompile Include="..\..\src\noui.cpp" /> - <ClCompile Include="..\..\src\outputtype.cpp" /> - <ClCompile Include="..\..\src\policy\fees.cpp" /> - <ClCompile Include="..\..\src\policy\policy.cpp" /> - <ClCompile Include="..\..\src\policy\rbf.cpp" /> - <ClCompile Include="..\..\src\pow.cpp" /> - <ClCompile Include="..\..\src\rest.cpp" /> - <ClCompile Include="..\..\src\shutdown.cpp" /> - <ClCompile Include="..\..\src\rpc\blockchain.cpp" /> - <ClCompile Include="..\..\src\rpc\mining.cpp" /> - <ClCompile Include="..\..\src\rpc\misc.cpp" /> <ClCompile Include="..\..\src\rpc\net.cpp"> <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)\netrpc.obj</ObjectFileName> <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)\netrpc.obj</ObjectFileName> <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)\netrpc.obj</ObjectFileName> <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)\netrpc.obj</ObjectFileName> </ClCompile> - <ClCompile Include="..\..\src\rpc\rawtransaction.cpp" /> - <ClCompile Include="..\..\src\rpc\server.cpp" /> - <ClCompile Include="..\..\src\rpc\util.cpp" /> - <ClCompile Include="..\..\src\script\ismine.cpp" /> - <ClCompile Include="..\..\src\script\sigcache.cpp" /> - <ClCompile Include="..\..\src\timedata.cpp" /> - <ClCompile Include="..\..\src\torcontrol.cpp" /> - <ClCompile Include="..\..\src\txdb.cpp" /> - <ClCompile Include="..\..\src\txmempool.cpp" /> - <ClCompile Include="..\..\src\ui_interface.cpp" /> - <ClCompile Include="..\..\src\validation.cpp" /> - <ClCompile Include="..\..\src\validationinterface.cpp" /> - <ClCompile Include="..\..\src\versionbits.cpp" /> - <ClCompile Include="..\..\src\index\txindex.cpp" /> +@SOURCE_FILES@ </ItemGroup> <ItemGroup> <None Include="packages.config" /> diff --git a/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj b/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in index 9e960682e5..dc17c98e98 100644 --- a/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj +++ b/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in @@ -174,23 +174,7 @@ </ProjectReference> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\..\src\chainparamsbase.cpp" /> - <ClCompile Include="..\..\src\clientversion.cpp" /> - <ClCompile Include="..\..\src\compat\glibcxx_sanity.cpp" /> - <ClCompile Include="..\..\src\compat\glibc_sanity.cpp" /> - <ClCompile Include="..\..\src\compat\strnlen.cpp" /> - <ClCompile Include="..\..\src\fs.cpp" /> - <ClCompile Include="..\..\src\logging.cpp" /> - <ClCompile Include="..\..\src\random.cpp" /> - <ClCompile Include="..\..\src\rpc\protocol.cpp" /> - <ClCompile Include="..\..\src\support\cleanse.cpp" /> - <ClCompile Include="..\..\src\support\lockedpool.cpp" /> - <ClCompile Include="..\..\src\sync.cpp" /> - <ClCompile Include="..\..\src\threadinterrupt.cpp" /> - <ClCompile Include="..\..\src\util.cpp" /> - <ClCompile Include="..\..\src\utilmoneystr.cpp" /> - <ClCompile Include="..\..\src\utilstrencodings.cpp" /> - <ClCompile Include="..\..\src\utiltime.cpp" /> +@SOURCE_FILES@ </ItemGroup> <Import Label="configTarget" Project="..\common.vcxproj" /> </Project> diff --git a/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj b/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in index 64f3e16289..1bb7be6f7f 100644 --- a/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj +++ b/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in @@ -20,18 +20,7 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\src\wallet\coinselection.cpp" /> - <ClCompile Include="..\..\src\wallet\coincontrol.cpp" /> - <ClCompile Include="..\..\src\wallet\crypter.cpp" /> - <ClCompile Include="..\..\src\wallet\db.cpp" /> - <ClCompile Include="..\..\src\wallet\feebumper.cpp" /> - <ClCompile Include="..\..\src\wallet\fees.cpp" /> - <ClCompile Include="..\..\src\wallet\init.cpp" /> - <ClCompile Include="..\..\src\wallet\rpcdump.cpp" /> - <ClCompile Include="..\..\src\wallet\rpcwallet.cpp" /> - <ClCompile Include="..\..\src\wallet\wallet.cpp" /> - <ClCompile Include="..\..\src\wallet\walletdb.cpp" /> - <ClCompile Include="..\..\src\wallet\walletutil.cpp" /> +@SOURCE_FILES@ </ItemGroup> <ItemGroup> <None Include="packages.config" /> diff --git a/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj b/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in index d7fbdd94b7..e396c1ad0c 100644 --- a/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj +++ b/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in @@ -20,10 +20,7 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\src\zmq\zmqabstractnotifier.cpp" /> - <ClCompile Include="..\..\src\zmq\zmqnotificationinterface.cpp" /> - <ClCompile Include="..\..\src\zmq\zmqpublishnotifier.cpp" /> - <ClCompile Include="..\..\src\zmq\zmqrpc.cpp" /> +@SOURCE_FILES@ </ItemGroup> <ItemGroup> <None Include="packages.config" /> diff --git a/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj b/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj index e6f4885e5e..2c6c0a8b7c 100644 --- a/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj +++ b/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj @@ -40,7 +40,7 @@ <ClCompile Include="..\..\src\script\script.cpp" /> <ClCompile Include="..\..\src\script\script_error.cpp" /> <ClCompile Include="..\..\src\uint256.cpp" /> - <ClCompile Include="..\..\src\utilstrencodings.cpp" /> + <ClCompile Include="..\..\src\util\strencodings.cpp" /> </ItemGroup> <ItemGroup> <None Include="packages.config" /> @@ -127,7 +127,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>false</SDLCheck> <AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories> - <ExceptionHandling>false</ExceptionHandling> + <ExceptionHandling>Sync</ExceptionHandling> <SuppressStartupBanner>false</SuppressStartupBanner> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> </ClCompile> @@ -144,7 +144,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>false</SDLCheck> <AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories> - <ExceptionHandling>false</ExceptionHandling> + <ExceptionHandling>Sync</ExceptionHandling> <SuppressStartupBanner>false</SuppressStartupBanner> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> </ClCompile> @@ -163,7 +163,7 @@ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>false</SDLCheck> <AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories> - <ExceptionHandling>false</ExceptionHandling> + <ExceptionHandling>Sync</ExceptionHandling> <SuppressStartupBanner>false</SuppressStartupBanner> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> @@ -184,7 +184,7 @@ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>false</SDLCheck> <AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories> - <ExceptionHandling>false</ExceptionHandling> + <ExceptionHandling>Sync</ExceptionHandling> <SuppressStartupBanner>false</SuppressStartupBanner> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py new file mode 100644 index 0000000000..f351532f9d --- /dev/null +++ b/build_msvc/msvc-autogen.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 + +import os +import re + +SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src')) + +libs = [ + 'libbitcoin_cli', + 'libbitcoin_common', + 'libbitcoin_crypto', + 'libbitcoin_server', + 'libbitcoin_util', + 'libbitcoin_wallet', + 'libbitcoin_zmq', +] + +ignore_list = [ +] + +lib_sources = {} + + +def parse_makefile(makefile): + with open(makefile, 'r', encoding='utf-8') as file: + current_lib = '' + for line in file.read().splitlines(): + if current_lib: + source = line.split()[0] + if source.endswith('.cpp') and not source.startswith('$') and source not in ignore_list: + source_filename = source.replace('/', '\\') + object_filename = source.replace('/', '_')[:-4] + ".obj" + lib_sources[current_lib].append((source_filename, object_filename)) + if not line.endswith('\\'): + current_lib = '' + continue + for lib in libs: + _lib = lib.replace('-', '_') + if re.search(_lib + '.*_SOURCES \\= \\\\', line): + current_lib = lib + lib_sources[current_lib] = [] + break + + +def main(): + for makefile_name in os.listdir(SOURCE_DIR): + if 'Makefile' in makefile_name: + parse_makefile(os.path.join(SOURCE_DIR, makefile_name)) + for key, value in lib_sources.items(): + vcxproj_filename = os.path.abspath(os.path.join(os.path.dirname(__file__), key, key + '.vcxproj')) + content = '' + for source_filename, object_filename in value: + content += ' <ClCompile Include="..\\..\\src\\' + source_filename + '">\n' + content += ' <ObjectFileName>$(IntDir)' + object_filename + '</ObjectFileName>\n' + content += ' </ClCompile>\n' + with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file: + with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file: + vcxproj_file.write(vcxproj_in_file.read().replace( + '@SOURCE_FILES@\n', content)) + + +if __name__ == '__main__': + main() diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj index 444a2ed725..2316e473aa 100644 --- a/build_msvc/test_bitcoin/test_bitcoin.vcxproj +++ b/build_msvc/test_bitcoin/test_bitcoin.vcxproj @@ -24,7 +24,7 @@ <ClCompile Include="..\..\src\wallet\test\*_tests.cpp" /> <ClCompile Include="..\..\src\test\test_bitcoin.cpp" /> <ClCompile Include="..\..\src\test\test_bitcoin_main.cpp" /> - <ClCompile Include="..\..\src\wallet\test\wallet_test_fixture.cpp" /> + <ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj"> |