aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installing-solidity.rst
diff options
context:
space:
mode:
authorBob Summerwill <bob@summerwill.net>2016-08-25 04:33:59 +0800
committerBob Summerwill <bob@summerwill.net>2016-08-25 05:06:36 +0800
commitd49cfebbf794685df78783f510a484ac4ea74d71 (patch)
tree7e61ebd09b790c4d332d5b55b52e00e72ff7f471 /docs/installing-solidity.rst
parent9fc1bcb2becf48192e5c52d6af1fac2b88656f2d (diff)
downloaddexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.tar
dexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.tar.gz
dexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.tar.bz2
dexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.tar.lz
dexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.tar.xz
dexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.tar.zst
dexon-solidity-d49cfebbf794685df78783f510a484ac4ea74d71.zip
Updated Solidity documentation's "building from source" section.
It now references install_deps.sh/.bat, and also adds instructions for Windows. Cherry picked some further tweaks from Denton-L. Thanks :-)
Diffstat (limited to 'docs/installing-solidity.rst')
-rw-r--r--docs/installing-solidity.rst145
1 files changed, 81 insertions, 64 deletions
diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst
index ba40c99f..5c481beb 100644
--- a/docs/installing-solidity.rst
+++ b/docs/installing-solidity.rst
@@ -32,102 +32,119 @@ Details about the usage of the Node.js package can be found in the
Binary Packages
===============
-Binary packages of Solidity together with its IDE Mix are available through
-the `C++ bundle <https://github.com/ethereum/webthree-umbrella/releases>`_ of
-Ethereum.
+Binary packages of Solidity available at
+`solidity/releases <https://github.com/ethereum/solidity/releases>`_.
+
Building from Source
====================
-Building Solidity is quite similar on MacOS X, Ubuntu and probably other Unices.
-This guide starts explaining how to install the dependencies for each platform
-and then shows how to build Solidity itself.
+Clone the Repository
+--------------------
+
+To clone the source code, execute the following command:
+
+.. code:: bash
+
+ git clone --recursive https://github.com/ethereum/solidity.git
+ cd solidity
+
+If you want to help developing Solidity,
+you should fork Solidity and add your personal fork as a second remote:
+
+.. code:: bash
-MacOS X
--------
+ cd solidity
+ git remote add personal git@github.com:[username]/solidity.git
-Requirements:
+Prerequisites - macOS
+----------------------
-- OS X Yosemite (10.10.5)
-- Homebrew
-- Xcode
+For macOS, ensure that you have the latest version of
+`xcode installed <https://developer.apple.com/xcode/download/>`_.
+This contains the `Clang C++ compiler <https://en.wikipedia.org/wiki/Clang>`_, the
+`xcode IDE <https://en.wikipedia.org/wiki/Xcode>`_ and other Apple development
+tools which are required for building C++ applications on OS X.
+If you are installing xcode for the first time, or have just installed a new
+version then you will need to agree to the license before you can do
+command-line builds:
-Set up Homebrew:
+.. code:: bash
-.. code-block:: bash
+ sudo xcodebuild -license accept
- brew update
- brew upgrade
+Our OS X builds require you to `install the Homebrew <http://brew.sh>`_
+package manager for installing external dependencies.
+Here's how to `uninstall Homebrew
+<https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#how-do-i-uninstall-homebrew>`_,
+if you ever want to start again from scratch.
- brew install boost --c++11 # this takes a while
- brew install cmake cryptopp gmp jsoncpp
-Ubuntu Trusty (14.04)
----------------------
+Prerequisites - Windows
+------------------------
-Below are the instructions to install the minimal dependencies required
-to compile Solidity on Ubuntu 14.04 (Trusty Tahr).
+You will need to install the following dependencies for Windows builds of Solidity:
-.. code-block:: bash
++------------------------------+-------------------------------------------------------+
+| Software | Notes |
++==============================+=======================================================+
+| `Git for Windows`_ | Command-line tool for retrieving source from Github. |
++------------------------------+-------------------------------------------------------+
+| `CMake`_ | Cross-platform build file generator. |
++------------------------------+-------------------------------------------------------+
+| `Visual Studio 2015`_ | C++ compiler and dev environment. |
++------------------------------+-------------------------------------------------------+
- sudo apt-get -y install build-essential git cmake libgmp-dev libboost-all-dev \
- libjsoncpp-dev
+.. _Git for Windows: https://git-scm.com/download/win
+.. _CMake: https://cmake.org/download/
+.. _Visual Studio 2015: https://www.visualstudio.com/products/vs-2015-product-editions
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo add-apt-repository -y ppa:ethereum/ethereum-dev
- sudo apt-get -y update
- sudo apt-get -y upgrade # this will update cmake to version 3.x
- sudo apt-get -y install libcryptopp-dev libjsoncpp-dev
-Ubuntu Xenial (16.04)
+External Dependencies
---------------------
-Below are the instructions to install the minimal dependencies required
-to compile Solidity on Ubuntu 16.04 (Xenial Xerus).
+We now have a "one button" script which installs all required external dependencies
+on macOS, Windows and on numerous Linux distros. This used to be a multi-step
+manual process, but is now a one-liner:
-One of the dependencies (Crypto++ Library, with version >= 5.6.2) can be
-installed either by adding the Ethereum PPA (Option 1) or by backporting
-``libcrypto++`` from Ubuntu Development to Ubuntu Xenial (Option 2).
+.. code:: bash
-.. code-block:: bash
+ ./scripts/install_deps.sh
- sudo apt-get -y install build-essential git cmake libgmp-dev libboost-all-dev \
- libjsoncpp-dev
+Or, on Windows:
- # (Option 1) For those willing to add the Ethereum PPA:
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo add-apt-repository -y ppa:ethereum/ethereum-dev
- sudo apt-get -y update
- sudo apt-get -y upgrade
- sudo apt-get -y install libcryptopp-dev
+.. code:: bash
- ## (Option 2) For those willing to backport libcrypto++:
- #sudo apt-get -y install ubuntu-dev-tools
- #sudo pbuilder create
- #mkdir ubuntu
- #cd ubuntu
- #backportpackage --workdir=. --build --dont-sign libcrypto++
- #sudo dpkg -i buildresult/libcrypto++6_*.deb buildresult/libcrypto++-dev_*.deb
- #cd ..
+ scripts\install_deps.bat
-Building
---------
-Run this if you plan on installing Solidity only:
+Command-Line Build
+------------------
-.. code-block:: bash
+Building Solidity is quite similar on Linux, macOS and other Unices:
+
+.. code:: bash
- git clone --recursive https://github.com/ethereum/solidity.git
- cd solidity
mkdir build
cd build
cmake .. && make
-If you want to help developing Solidity,
-you should fork Solidity and add your personal fork as a second remote:
+And even on Windows:
-.. code-block:: bash
+.. code:: bash
- cd solidity
- git remote add personal git@github.com:username/solidity.git
+ mkdir build
+ cd build
+ cmake -G "Visual Studio 14 2015 Win64" ..
+
+This latter set of instructions should result in the creation of
+**solidity.sln** in that build directory. Double-clicking on that file
+should result in Visual Studio firing up. We suggest building
+**RelWithDebugInfo** configuration, but all others work.
+
+Alternatively, you can build for Windows on the command-line, like so:
+
+.. code:: bash
+
+ cmake --build . --config RelWithDebInfo