This is a guide for users who like to build a Windows-based Steem miner. Many thanks to @arhag who helped me clear the last Win-build error.
Edit: A user requested the rar files be changed to zip files. These files are changed. Winrar is no longer needed.
You will need to have a basic level of understanding of Microsoft Windows and Visual Studio compilation.
You will need have 64bit Microsoft Windows7 and above, at least 4GB RAM and 500GB disk space. And a good Internet connection.
First download the following software:
|Visual Studio 2013 Express (Desktop)||https://www.microsoft.com/en-sg/download/details.aspx?id=44914|
|ActivePerl 5.16.3 for Windows||http://www.activestate.com/activeperl/downloads|
|Python (2.7 or 3.x)||https://www.python.org/|
- Make sure you have sufficient space for Visual Studio 2013. The download file itself is huge, taking up a few Gig of space.
- Install VS2013 and you will need to use it to compile the rest.
>bootstrap.bat >b2 --build-dir=build-directory toolset=msvc-12.0 address-model=64 --build-type=complete stage
The compiled library is in this folder - \boost_1_58_0\stage\lib
>Look under the section "Building the 64-bit Release Static Library" >Change to the source directory, for example T:\openssl-src-64 >Run perl Configure VC-WIN64A --prefix=T:\Build-OpenSSL-VC64-Release-Static. This will make T:\Build-OpenSSL-VC64-Release-Static your output directory; it should be fairly obvious how you can change that. >Run ms\do_win64a >Run nmake -f ms\nt.mak >Run nmake -f ms\nt.mak install
If you need to dive deeper, you can refer to this guide - http://developer.covenanteyes.com/building-openssl-for-visual-studio/
Use this guide: http://www.stack.nl/~dimitri/doxygen/download.html
>git clone https://github.com/doxygen/doxygen.git >cd doxygen >cmake.exe -G "Visual Studio 12 Win64" >Open the generated Visual Studio solution file and use it to compile doxygen
> Right-click on the "ALL_BUILD" project file and click Build.
Let's Check Out Steem
I have encountered numerous obstacles with building Steem on Visual Studio 2013, namely it does not follow C++ standards closely. I am sharing with you a working build and possible pit holes to watch out for.
There are some changes needed to be make to the original Steem source codes to make it compatible with Windows. I have made the pull requests and they are pending review and approval by the developers. For now, I place the changes in btscube repository in github.
>Add CMake.exe to the PATH environment variable >L:\mkdir steem >cd steem >https://github.com/btscube/steem >cd steem >git submodule update --init --recursive >mkdir build >cd build >set BOOST_ROOT=L:\boost_1_58_0 >set OPENSSL_ROOT_DIR=L:\OpenSSL >set DOXYGEN_EXECUTABLE=L:\doxygen\bin\doxygen.exe >cmake.exe -G "Visual Studio 12 Win64" -DBOOST_ROOT="$BOOST_ROOT" -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT" -DDOXYGEN_EXECUTABLE="$DOXYGEN_EXECUTABLE" -DCMAKE_BUILD_TYPE=Release -DLOW_MEMORY_NODE=ON ..\steem
You should see an output as follows:
-- BUILD_STEEM_TESTNET: OFF -- LOW_MEMORY_NODE: ON -- -- CONFIGURING FOR LOW MEMORY NODE -- -- Using custom FindBoost.cmake -- Boost version: 1.58.0 -- Found the following Boost libraries: -- thread -- date_time -- system -- filesystem -- program_options -- signals -- serialization -- chrono -- unit_test_framework -- context -- locale -- Using custom FindBoost.cmake -- Boost version: 1.58.0 -- Found the following Boost libraries: -- coroutine -- Configuring Steem on WIN32 -- tcl INCLUDE PATH: /include -- Could NOT find Tclsh (missing: TCL_TCLSH) -- Could NOT find TCL (missing: TCL_LIBRARY) -- Could NOT find TCLTK (missing: TCL_LIBRARY TK_LIBRARY TK_INCLUDE_PATH) -- Could NOT find TK (missing: TK_LIBRARY TK_INCLUDE_PATH) -- tcl_library: TCL_LIBRARY-NOTFOUND -- Configuring project fc located in: L:/stm2/steem/libraries/fc -- Configuring fc to build on Win32 -- Using custom FindBoost.cmake -- Boost version: 1.58.0 -- Found the following Boost libraries: -- thread -- date_time -- system -- filesystem -- program_options -- signals -- serialization -- chrono -- unit_test_framework -- context -- locale -- iostreams -- Using custom FindBoost.cmake -- Boost version: 1.58.0 -- Found the following Boost libraries: -- coroutine -- Setting up OpenSSL root and include vars to L:\OpenSSL, L:\OpenSSL/include -- Found OpenSSL: L:/openssl/lib/ssleay32.lib;L:/openssl/lib/libeay32.lib (found version "1.0.1g") ** websocketpp =========== Used Build Configuration ============= -- ENABLE_CPP11 = ON -- BUILD_EXAMPLES = OFF -- BUILD_TESTS = OFF -- WEBSOCKETPP_ROOT = L:/steem/steem/libraries/fc/vendor/websocketpp -- WEBSOCKETPP_BIN = L:/steem/build/libraries/fc/vendor/websocketpp/bin -- WEBSOCKETPP_LIB = L:/steem/build/libraries/fc/vendor/websocketpp/lib -- Install prefix = L:/steem/steem/libraries/fc/vendor/websocketpp/install -- WEBSOCKETPP_BOOST_LIBS = -- WEBSOCKETPP_PLATFORM_LIBS = -- WEBSOCKETPP_PLATFORM_TLS_LIBS = -- OPENSSL_FOUND = TRUE -- OPENSSL_INCLUDE_DIR = L:\OpenSSL/include -- OPENSSL_LIBRARIES = L:/openssl/lib/ssleay32.lib;L:/openssl/lib/libeay32.lib -- OPENSSL_VERSION = 1.0.1g -- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) -- Readline path -- Could NOT find Readline (missing: Readline_INCLUDE_DIR Readline_LIBRARY) -- eay=L:/openssl/bin/libeay32.dll -- Finished fc module configuration... -- CONFIGURED FOR STEEM NETWORK -- CONFIGURED FOR LOW MEMORY NODE -- Configuring done -- Generating done -- Build files have been written to: L:/steem/build
- The example above uses drive L:. You may use other path location.
- This configuration builds steem as a low-memory node, you can opt to turn it off.
- This configuration has "ENABLE_CONTENT_PATCHING" off. You can opt to turn it on by adding this parameter to the cmake command "-ENABLE_CONTENT_PATCHING=ON"
- You can safely ignore the error with ncurses and readline. They are not really needed.
Let's build Steem!
CMake will generate a list of files and folders for the build.
>Open the Steem.sln solution
On the right plane, you will see a list of projects.
>Right-click the secp256k1 project and unload it. >Get the extra file secp256k1-zkp.zip from https://mega.nz/#!2Zo0GKII!sX2kIA-1hiRcjvLei1cCz7gqdCNJC9IjnUwvClrUK0o >Extra the folder from the rar file and replace the your local subfolder eg L:\steem\steem\libraries\fc\vendor\secp256k1-zkp with it.
- The original secp256k1 project included is slow in mining. We will use a highly optimised one from btscube github instead.
>Right-click on the steemd project and build it >Once it is successfully built, you will find steem.exe in the folder \build\programs\steemd\Release
Now we are ready to build the cli_wallet.
>Right-click on the cli_wallet project and build it >Once it is successfully built, you will find cli_wallet.exe in the folder \build\programs\cli_wallet\Release
Running the newly built Steem
I will touch on running Steem in Part 2 of the guide. You will need the following runtime components.
|Steem Runtime Components||Link|
|Visual C++ Redistributable Packages for Visual Studio 2013||https://www.microsoft.com/en-us/download/details.aspx?id=40784|