mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Update VS2015 build instructions.
* Include Python and Scons, and new OpenSSL lib path.
This commit is contained in:
committed by
Nik Bougalis
parent
d0770cdb1a
commit
b6cb981a8b
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
We do not recommend Windows for rippled production use at this time. Currently, the Ubuntu
|
We do not recommend Windows for rippled production use at this time. Currently, the Ubuntu
|
||||||
platform has received the highest level of quality assurance, testing, and support.
|
platform has received the highest level of quality assurance, testing, and support.
|
||||||
|
Additionally, 32-bit Windows versions are not supported.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -11,27 +12,27 @@ To clone the source code repository, create branches for inspection or modificat
|
|||||||
build rippled under Visual Studio, and run the unit tests you will need these
|
build rippled under Visual Studio, and run the unit tests you will need these
|
||||||
software components:
|
software components:
|
||||||
|
|
||||||
* [Visual Studio 2015](https://www.visualstudio.com/)
|
* [Visual Studio 2015](README.md#install-visual-studio-2015)
|
||||||
* [Git for Windows](http://git-scm.com/)
|
* [Git for Windows](README.md#install-git-for-windows)
|
||||||
* [Google Protocol Buffers Compiler](https://code.google.com/p/protobuf/source/checkout)
|
* [Google Protocol Buffers Compiler](README.md#install-google-protocol-buffers-compiler)
|
||||||
|
* (Optional) [Python and Scons](README.md#optional-install-python-and-scons)
|
||||||
* [OpenSSL Library](README.md#install-openssl)
|
* [OpenSSL Library](README.md#install-openssl)
|
||||||
* [ActivePerl](https://www.activestate.com/activeperl/downloads)
|
* [Boost 1.59 library](README.md#build-boost)
|
||||||
(Recommended to build OpenSSL.)
|
* [Node.js](README.md#install-nodejs)
|
||||||
* [Boost 1.59 library](http://www.boost.org/users/download/)
|
|
||||||
* [Node.js](http://nodejs.org/download/)
|
|
||||||
|
|
||||||
Any version of Visual Studio 2015 may be used, including the Visual Studio Community
|
|
||||||
Edition which is available under a free license.
|
|
||||||
|
|
||||||
## Install Software
|
## Install Software
|
||||||
|
|
||||||
### Install Visual Studio 2015
|
### Install Visual Studio 2015
|
||||||
|
|
||||||
If not already installed on your system, download your choice of installers from the
|
If not already installed on your system, download your choice of installer from the
|
||||||
[Visual Studio 2015 Download](https://www.visualstudio.com/downloads/download-visual-studio-vs)
|
[Visual Studio 2015 Download](https://www.visualstudio.com/downloads/download-visual-studio-vs)
|
||||||
page, run the installer, and follow the directions.
|
page, run the installer, and follow the directions. You may need to choose a "Custom"
|
||||||
The **Visual Studio 2015 Community** edition is available for free, while paid editions
|
installation and ensure that "Visual C++" is selected under "Programming Languages".
|
||||||
may be used for an free initial trial period.
|
|
||||||
|
Any version of Visual Studio 2015 may be used to build rippled.
|
||||||
|
The **Visual Studio 2015 Community** edition is available free of charge (see
|
||||||
|
[the product page](https://www.visualstudio.com/products/visual-studio-community-vs)
|
||||||
|
for licensing details), while paid editions may be used for an free initial trial period.
|
||||||
|
|
||||||
### Install Git for Windows
|
### Install Git for Windows
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ Use of the bash shell under Windows is mandatory for running the unit tests.
|
|||||||
|
|
||||||
* NOTE: To gain full featured access to the
|
* NOTE: To gain full featured access to the
|
||||||
[git-subtree](https://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/)
|
[git-subtree](https://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/)
|
||||||
functionality used in the rippled repository we suggest Git version 1.8.3.2 or later.
|
functionality used in the rippled repository we suggest Git version 2.6.2 or later.
|
||||||
|
|
||||||
### Install Google Protocol Buffers Compiler
|
### Install Google Protocol Buffers Compiler
|
||||||
|
|
||||||
@@ -61,48 +62,51 @@ precompiled Windows executable from the
|
|||||||
Either way, once you have the required version of **protoc.exe**, copy it into
|
Either way, once you have the required version of **protoc.exe**, copy it into
|
||||||
a folder in your command line `%PATH%`.
|
a folder in your command line `%PATH%`.
|
||||||
|
|
||||||
* **NOTE:** If you use an older version of the compiler, the build will fail with
|
* **NOTE:** If you use an older version of the compiler, the build will
|
||||||
errors related to a mismatch of the version of protocol buffer headers versus
|
fail with errors related to a mismatch of the version of protocol
|
||||||
the compiler.
|
buffer headers versus the compiler.
|
||||||
|
|
||||||
### Install ActivePerl
|
### (Optional) Install Python and Scons
|
||||||
|
|
||||||
If not already installed on your system, download your choice of installers from the
|
[Python](https://www.python.org/downloads/) and
|
||||||
[Activeperl Download](https://www.activestate.com/activeperl/downloads)
|
[Scons](http://scons.org/download.php) are not required to build
|
||||||
page, run the installer, and follow the directions.
|
rippled with Visual Studio, but can be used to build from the
|
||||||
|
command line and in scripts, and are required to properly update
|
||||||
|
the `RippleD.vcxproj` file.
|
||||||
|
|
||||||
|
If you wish to build with scons, a version after 2.3.5 is required
|
||||||
|
for Visual Studio 2015 support.
|
||||||
|
|
||||||
## Configure Dependencies
|
## Configure Dependencies
|
||||||
|
|
||||||
### Install OpenSSL
|
### Install OpenSSL
|
||||||
|
|
||||||
1. Download OpenSSL *v1.0.2d or higher* source https://www.openssl.org/source/
|
[Download OpenSSL.](http://slproweb.com/products/Win32OpenSSL.html)
|
||||||
2. Unpack the source archive into a temporary folder.
|
There will be four variants available:
|
||||||
3. Open `cmd.exe`. Change the the folder where you unpacked OpenSSL.
|
|
||||||
4. Build the 64-bit libraries: (
|
|
||||||
[Reference 1](http://developer.covenanteyes.com/building-openssl-for-visual-studio/),
|
|
||||||
[Reference 2](http://www.p-nand-q.com/programming/windows/building_openssl_with_visual_studio_2013.html))
|
|
||||||
|
|
||||||
```powershell
|
1. 64-bit. Use this if you are running 64-bit windows. As of this writing, the link is called: "Win64 OpenSSL v1.0.2d".
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
2. 64-bit light - Don't use this. It is missing files needed to build rippled. As of this writing, the link is called: "Win64 OpenSSL v1.0.2d Light"
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
|
|
||||||
|
|
||||||
perl Configure VC-WIN64A --prefix=C:\lib\openssl-VC-64
|
Run the installer, and choose an appropriate location for your OpenSSL
|
||||||
ms\do_win64a
|
installation. In this guide we use **C:\lib\OpenSSL-Win64** as the
|
||||||
nmake -f ms\nt.mak
|
destination location.
|
||||||
nmake -f ms\nt.mak install
|
|
||||||
|
|
||||||
copy tmp32\lib.pdb C:\lib\openssl-VC-64\lib\
|
You may be informed on running the installer that "Visual C++ 2008
|
||||||
```
|
Redistributables" must first be installed first. If so, download it
|
||||||
5. Optionally, delete the temporary folder.
|
from the [same page](http://slproweb.com/products/Win32OpenSSL.html),
|
||||||
|
again making sure to get the correct 32-/64-bit variant.
|
||||||
|
|
||||||
* NOTE: Since rippled links statically to OpenSSL, it does not matter where the OpenSSL
|
* NOTE: Since rippled links statically to OpenSSL, it does not matter
|
||||||
.DLL files are placed, or what version they are. rippled does not use or require any
|
where the OpenSSL .DLL files are placed, or what version they are.
|
||||||
external .DLL files to run other than the standard operating system ones.
|
rippled does not use or require any external .DLL files to run
|
||||||
|
other than the standard operating system ones.
|
||||||
|
|
||||||
### Build Boost
|
### Build Boost
|
||||||
|
|
||||||
After downloading boost and unpacking it, open a **Developer Command Prompt** for
|
After [downloading boost](http://www.boost.org/users/download/) and
|
||||||
Visual Studio, change to the directory containing boost, then bootstrap the build tools:
|
unpacking it, open a **Developer Command Prompt** for
|
||||||
|
Visual Studio, change to the directory containing boost, then
|
||||||
|
bootstrap the build tools:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cd C:\lib\boost_1_59_0
|
cd C:\lib\boost_1_59_0
|
||||||
@@ -158,10 +162,9 @@ git checkout master
|
|||||||
|
|
||||||
Open the solution file located at **Builds/Visual Studio 2015/ripple.sln**
|
Open the solution file located at **Builds/Visual Studio 2015/ripple.sln**
|
||||||
and select the "View->Other Windows->Property Manager" to bring up the Property Manager.
|
and select the "View->Other Windows->Property Manager" to bring up the Property Manager.
|
||||||
Expand the *debug | x64* section (or similar section on 32-windows) and
|
Expand the *debug | x64* section and
|
||||||
double click the *Microsoft.Cpp.x64.user* property sheet to bring up the
|
double click the *Microsoft.Cpp.x64.user* property sheet to bring up the
|
||||||
*Property Pages* dialog (these sections will be called *Win32* instead of
|
*Property Pages* dialog. These are global properties applied to all
|
||||||
*x64* on 32-bit windows). These are global properties applied to all
|
|
||||||
64-bit build targets:
|
64-bit build targets:
|
||||||
|
|
||||||

|

|
||||||
@@ -179,8 +182,8 @@ of building the boost libraries:
|
|||||||
|
|
||||||
Follow the same procedure for adding the `Additional Include Directories`
|
Follow the same procedure for adding the `Additional Include Directories`
|
||||||
and `Additional Library Directories` required for OpenSSL. In our example
|
and `Additional Library Directories` required for OpenSSL. In our example
|
||||||
these directories are **C:\lib\openssl-VC-64\include** and
|
these directories are **C:\lib\OpenSSL-Win64\include** and
|
||||||
**C:\lib\openssl-VC-64\lib** respectively.
|
**C:\lib\OpenSSL-Win64\lib** respectively.
|
||||||
|
|
||||||
# Setup Environment
|
# Setup Environment
|
||||||
|
|
||||||
@@ -234,11 +237,26 @@ and then choose the **Build->Build Solution** menu item.
|
|||||||
|
|
||||||
# Unit Tests (Recommended)
|
# Unit Tests (Recommended)
|
||||||
|
|
||||||
|
## Internal
|
||||||
|
|
||||||
|
The internal rippled unit tests are written in C++ and are part
|
||||||
|
of the rippled executable.
|
||||||
|
|
||||||
|
From a Windows console, run the unit tests:
|
||||||
|
|
||||||
|
```
|
||||||
|
./build/msvc.debug/rippled.exe --unittest
|
||||||
|
```
|
||||||
|
|
||||||
|
Substitute the correct path to the executable to test different builds.
|
||||||
|
|
||||||
|
## External
|
||||||
|
|
||||||
The external rippled unit tests are written in Javascript using Node.js,
|
The external rippled unit tests are written in Javascript using Node.js,
|
||||||
and utilize the mocha unit test framework. To run the unit tests, it
|
and utilize the mocha unit test framework. To run the unit tests, it
|
||||||
will be necessary to perform the following steps:
|
will be necessary to perform the following steps:
|
||||||
|
|
||||||
## Install Node.js
|
### Install Node.js
|
||||||
|
|
||||||
[Install Node.js](http://nodejs.org/download/). We recommend the Windows
|
[Install Node.js](http://nodejs.org/download/). We recommend the Windows
|
||||||
installer (**.msi** file) as it takes care of updating the *PATH* environment
|
installer (**.msi** file) as it takes care of updating the *PATH* environment
|
||||||
@@ -246,7 +264,7 @@ variable so that scripts can find the command. On Windows systems,
|
|||||||
**Node.js** comes with **npm**. A separate installation of **npm**
|
**Node.js** comes with **npm**. A separate installation of **npm**
|
||||||
is not necessary.
|
is not necessary.
|
||||||
|
|
||||||
## Create node_modules
|
### Create node_modules
|
||||||
|
|
||||||
Open a windows console. From the root of your local rippled repository
|
Open a windows console. From the root of your local rippled repository
|
||||||
directory, invoke **npm** to bring in the necessary components:
|
directory, invoke **npm** to bring in the necessary components:
|
||||||
@@ -263,7 +281,7 @@ Error: ENOENT, stat 'C:\Users\username\AppData\Roaming\npm'
|
|||||||
|
|
||||||
simply create the indicated folder and try again.
|
simply create the indicated folder and try again.
|
||||||
|
|
||||||
## Create a test config.js
|
### Create a test config.js
|
||||||
|
|
||||||
From a *bash* shell (installed with Git for Windows), copy the
|
From a *bash* shell (installed with Git for Windows), copy the
|
||||||
example configuration file into the appropriate location:
|
example configuration file into the appropriate location:
|
||||||
@@ -284,7 +302,7 @@ exports.default_server_config = {
|
|||||||
Also in **test/config.js**, change any occurrences of the
|
Also in **test/config.js**, change any occurrences of the
|
||||||
IP address *0.0.0.0* to *127.0.0.1*.
|
IP address *0.0.0.0* to *127.0.0.1*.
|
||||||
|
|
||||||
## Run Tests
|
### Run Tests
|
||||||
|
|
||||||
From a windows console, run the unit tests:
|
From a windows console, run the unit tests:
|
||||||
|
|
||||||
@@ -303,7 +321,7 @@ node_modules/mocha/bin/mocha test/account_tx-test.js
|
|||||||
facility is usually slightly behind the develop branch of the
|
facility is usually slightly behind the develop branch of the
|
||||||
authoritative ripple-lib repository. Therefore, some tests might fail.
|
authoritative ripple-lib repository. Therefore, some tests might fail.
|
||||||
|
|
||||||
## Development ripple-lib
|
### Development ripple-lib
|
||||||
|
|
||||||
To use the latest branch of **ripple-lib** during the unit tests,
|
To use the latest branch of **ripple-lib** during the unit tests,
|
||||||
first clone the repository in a new location outside of your rippled
|
first clone the repository in a new location outside of your rippled
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 59 KiB |
Reference in New Issue
Block a user