-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Visual Studio build instructions #2355
Conversation
I tagged our other main Windows developers, but appreciate anyone else having time to test these steps out. @manojsdoshi in particular might have some good feedback. |
Builds/VisualStudio2017/README.md
Outdated
Any version of Visual Studio 2017 may be used to build rippled. The **Visual | ||
Studio 2017 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider "an initial free-trial period" instead.
Builds/VisualStudio2017/README.md
Outdated
licensing details), while paid editions may be used for an free initial trial | ||
period. | ||
|
||
As of this writing, the latest version of Visual Studio 2017 for Windows is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't object to this being here, but also don't think there is any benefit to mentioning current latest versions of software (one of them will surely be eclipsed within a short time). What could be useful is a table of known-to-work versions for each dependency. Perhaps this is what you were getting at here - if that's the case, I'd consider just making a table of each prerequisite and the version(s) that are known to work.
CMakeSettings.json
Outdated
"variables": [ | ||
{ | ||
"name": "BOOST_ROOT", | ||
"value": "C:\\lib\\boost_1_66_0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love that we're hard coding the boost version here. Is there a better way? Maybe just lib/boost
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree and that was part of my concern I wrote about in the first comment. Perhaps we just recommend C:\\lib\boost
as you say, and users can do some type of symlink if they want to manage multiple versions.
Jenkins Build SummaryBuilt from this commit Built at 20180129 - 23:11:18 Test Results
|
Builds/VisualStudio2017/README.md
Outdated
|
||
1. 64-bit. Use this if you are running 64-bit windows. As of this writing, the | ||
link is called: "Win64 OpenSSL v1.0.2n". | ||
2. 64-bit light - Don't use this. It is missing files needed to build rippled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider adding emphasis to "Don't use this."
Builds/VisualStudio2017/README.md
Outdated
### Install OpenSSL | ||
|
||
[Download OpenSSL.](http://slproweb.com/products/Win32OpenSSL.html) There will | ||
be four variants available: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mention four variants then only list two. There will also be a link to download openssl 1.1, and people may be tempted to use it. However, rippled does not compile with openssl 1.1, only the 1.0 branch (at least last I checked, is this still true?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is still true AFAIK. I'll fix.
the bash prompt: | ||
|
||
```powershell | ||
git clone [email protected]:ripple/rippled.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to add the --recursive
flag to get the submodules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which components have submodules? I think after #2343 , docca
will no longer be used. Are there others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, according to .gitmodules:
[submodule "src/nudb/extras/beast"]
path = src/nudb/extras/beast
url = https://github.com/vinniefalco/Beast.git
[submodule "src/nudb/extras/rocksdb"]
path = src/nudb/extras/rocksdb
url = https://github.com/facebook/rocksdb.git
[submodule "src/nudb/doc/docca"]
path = src/nudb/doc/docca
url = https://github.com/vinniefalco/docca.git
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are those actually needed for nudb
though? Or just to build nudb
examples and docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we need them, actually. If it works without the recursive them I'm fine leaving it off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My test build did not do a --recursive
clone, so I don't think they are. I'll leave it out unless someone else discovers otherwise.
CMakeSettings.json
Outdated
"name": "x64-Debug", | ||
"generator": "Visual Studio 15 2017 Win64", | ||
"configurationType": "Debug", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is msvc_x64_x64
correct? I use msvc_x64
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they added it after we started using it https://docs.microsoft.com/en-us/cpp/ide/cmake-tools-for-visual-cpp.
msvc_x64_x64 | Compile for AMD64 using 64-bit tools
CMakeSettings.json
Outdated
] | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Add a carriage return for git happiness.
Builds/VisualStudio2017/README.md
Outdated
* [OpenSSL Library](README.md#install-openssl) | ||
* [Boost library](README.md#build-boost) | ||
* (Optional) [Cmake for Windows](README.md#optional-install-cmake-for-windows) - | ||
Only needed if not using the integrated CMake in VS 2017. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is worth mentioning that having Cmake for Windows will allow you to create VS project/solution files.
Builds/CMake/CMakeFuncs.cmake
Outdated
@@ -357,6 +357,12 @@ macro(use_boost) | |||
if(NOT Boost_FOUND) | |||
message(WARNING "Boost directory found, but not all components. May not be able to build.") | |||
endif() | |||
if(MSVC14) | |||
# VS2017 with boost <= 1.66.0 requires a flag to suppress warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: weird indentation here
Builds/CMake/CMakeFuncs.cmake
Outdated
link_directories($ENV{OPENSSL_ROOT}/lib) | ||
if ((NOT DEFINED OPENSSL_ROOT) AND (DEFINED ENV{OPENSSL_ROOT})) | ||
set(OPENSSL_ROOT $ENV{OPENSSL_ROOT}) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: weird indentation here as well
👍 After the indentation issues in CMakeFuncs.cmake are resolved |
👍 |
@bachase I just noticed that this PR doesn't interact well with |
This reverts commit c85c433.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
In 0.90.0-b5 |
This changeset removes the old VS2015 project files and adds Visual Studio 2017 instructions based on CMake.
The first two commits are from #2348, which will start requiring us too use boost 1.66.0.
In b29eddc, I added a default
CMakeSettings.json
file to the top-level directory, which means if you installed boost and openssl in the recommendedC:\lib
directories, the integrated cmake will work properly when opening the top-level folder in VS2017. However, the current convention is to include the boost version in the directory name, i.e.C:\lib\boost_1_66_0
, so this file would need to change if you upgrade boost.