Skip to content
Permalink
Browse files

doc: Update build notes

Review and update build-windows.md and build-osx.md, rename “OS X” to the current “macOS” convention.
  • Loading branch information...
Krekeler committed Jan 4, 2019
1 parent 5d254c4 commit 8d195e208aaf157eba2aaba3e6da53a2b1abd8b5
Showing with 108 additions and 83 deletions.
  1. +1 −1 contrib/init/README.md
  2. +12 −6 contrib/seeds/README.md
  3. +2 −2 doc/README.md
  4. +3 −3 doc/README_osx.md
  5. +27 −36 doc/build-osx.md
  6. +58 −30 doc/build-windows.md
  7. +1 −1 doc/gitian-building.md
  8. +3 −3 doc/init.md
  9. +1 −1 qa/README.md
@@ -5,7 +5,7 @@ Upstart: dmsd.conf
OpenRC: dmsd.openrc
dmsd.openrcconf
CentOS: dmsd.init
OS X: org.dms.dmsd.plist
macOS: org.dms.dmsd.plist

have been made available to assist packagers in creating node packages here.

@@ -17,11 +17,17 @@ Ubuntu:

sudo apt-get install python3-dnspython

### Current usage
---

### Internal notice

Compilation computer, ~/documentchain/contrib/seeds$
cp nodes_main.txt ori.txt
vi nodes_main.txt
python3 generate-seeds.py ./

cp nodes_main.txt ori.txt
vi nodes_main.txt
python3 generate-seeds.py ./

Code computer: copy result to chainparamsseeds.h
rm nodes_main.txt
mv ori.txt nodes_main.txt

rm nodes_main.txt
mv ori.txt nodes_main.txt
@@ -18,7 +18,7 @@ Unpack the files into a directory and run:

Unpack the files into a directory, and then run dms-qt.exe.

### OS X
### macOS (formerly OS X)

Drag DMS-Qt to your applications folder, and then run DMS-Qt.

@@ -31,7 +31,7 @@ Building
---------------------
The following are developer notes on how to build DMS Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.

- [OS X Build Notes](build-osx.md)
- [macOS Build Notes](build-osx.md)
- [Unix Build Notes](build-unix.md)
- [Windows Build Notes](build-windows.md)
- [OpenBSD Build Notes](build-openbsd.md)
@@ -1,12 +1,12 @@
Deterministic OS X Dmg Notes.
Deterministic macOS (formerly OS X) Dmg Notes.

Working OS X DMGs are created in Linux by combining a recent clang,
the Apple binutils (ld, ar, etc) and DMG authoring tools.

Apple uses clang extensively for development and has upstreamed the necessary
functionality so that a vanilla clang can take advantage. It supports the use
of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary
when building for OS X.
when building for macOS.

Apple's version of binutils (called cctools) contains lots of functionality
missing in the FSF's binutils. In addition to extra linker options for
@@ -38,7 +38,7 @@ Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1
Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file.
To create a tarball suitable for Gitian input, there are two options:

Using Mac OS X, you can mount the dmg, and then create it with:
Using macOS, you can mount the dmg, and then create it with:
```
$ hdiutil attach Xcode_7.3.1.dmg
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk
@@ -1,58 +1,56 @@
Mac OS X Build Instructions and Notes
macOS (OS X) Build Instructions and Notes
====================================
The commands in this guide should be executed in a Terminal application.
The built-in one is located in `/Applications/Utilities/Terminal.app`.

Preparation
-----------
Install the OS X command line tools:
1. Install the macOS command line tools:

`xcode-select --install`
`xcode-select --install`

When the popup appears, click `Install`.
When the popup appears, click `Install`.

Then install [Homebrew](https://brew.sh).
2. Install [Homebrew](https://brew.sh).

*If you get "Permission denied": `sudo chown -R $USER:admin /usr/local` [can help](https://github.com/Homebrew/legacy-homebrew/issues/19670).*

Dependencies
----------------------

brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf qt libevent

If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG

brew install librsvg

NOTE: Building with Qt4 is still supported, however, doing so could result in a broken UI. Therefore, building with Qt5 is recommended.
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf qt libevent librsvg

Build DMS Core
------------------------

1. Clone the DMS Core source code and cd into `documentchain`
1. Download the source

git clone https://github.com/Krekeler/documentchain
cd documentchain

2. Build DMS Core:

Configure and build the headless dms binaries as well as the GUI (if Qt is found).
2. Build DMS Core

You can disable the GUI build by passing `--without-gui` to configure.
Configure and build the headless binaries dmsd, dms-cli and dms-tx.

cd documentchain
./autogen.sh
./configure
make

3. It is recommended to build and run the unit tests:

make check
3. GUI Wallet

4. You can also create a .dmg that contains the .app bundle (optional):
Build the DMS-Qt.app and DMS-Qt.dmg that contains the .app bundle:

make deploy

Running
-------

### GUI Wallet dms-qt

Run "DMS Core" (DMS-Qt.app)

### Daemon dmsd

DMS Core is now available at `./src/dmsd`

Before running, it's recommended you create an RPC configuration file.
@@ -61,24 +59,24 @@ Before running, it's recommended you create an RPC configuration file.

chmod 600 "/Users/${USER}/Library/Application Support/DMSCore/dms.conf"

The first time you run dmsd, it will start downloading the blockchain. This process could take several hours.
The first time you run the wallet, it will start downloading the blockchain. This process could take several hours.

You can monitor the download process by looking at the debug.log file:

tail -f $HOME/Library/Application\ Support/DMSCore/debug.log

Other commands:
-------
### Other commands:

./src/dmsd -daemon # Starts the dms daemon.
./src/dms-cli --help # Outputs a list of command-line options.
./src/dms-cli help # Outputs a list of RPC commands when the daemon is running.

Using Qt Creator as IDE
Using Qt as IDE
------------------------
You can use Qt Creator as an IDE, for dms development.
Download and install the community edition of [Qt Creator](https://www.qt.io/download/).
Uncheck everything except Qt Creator during the installation process.
*This section of Bitcoin has not yet been reviewed for DMS Core.*

Download and install the open source edition of [Qt](https://www.qt.io/download/).
Check newest Qt version during installation process.

1. Make sure you installed everything through Homebrew mentioned above
2. Do a proper ./configure --enable-debug
@@ -90,10 +88,3 @@ Uncheck everything except Qt Creator during the installation process.
8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
9. Select LLDB as debugger (you might need to set the path to your installation)
10. Start debugging with Qt Creator

Notes
-----

* Tested on OS X 10.8 through 10.12 on 64-bit Intel processors only.

* Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714)
@@ -11,7 +11,7 @@ using the Windows Subsystem For Linux is the most straightforward. If you are bu
another method, please contribute the instructions here for others who are running versions
of Windows that are not compatible with the Windows Subsystem for Linux.

Compiling with Windows Subsystem For Linux
Compiling with Windows Subsystem for Linux (WSL)
-------------------------------------------

With Windows 10, Microsoft has released a new feature named the [Windows
@@ -22,68 +22,96 @@ the need for a separate Linux VM or server.

This feature is not supported in versions of Windows prior to Windows 10 or on
Windows Server SKUs. In addition, it is available [only for 64-bit versions of
Windows](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide).
Windows].

To get the bash shell, you must first activate the feature in Windows.

1. Turn on Developer Mode
* Open Settings -> Update and Security -> For developers
* Select the Developer Mode radio button
* Restart if necessary
2. Enable the Windows Subsystem for Linux feature
* From Start, search for "Turn Windows features on or off" (type 'turn')
* Select Windows Subsystem for Linux (beta)
* Click OK
* Restart if necessary
3. Complete Installation
* Open a cmd prompt and type "bash"
* Accept the license
* Create a new UNIX user account (this is a separate account from your Windows account)

After the bash shell is active, you can follow the instructions below, starting
with the "Cross-compilation" section. Compiling the 64-bit version is
recommended but it is possible to compile the 32-bit version.
1. Follow [Windows Subsystem for Linux Installation](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
and install Ubuntu 18.04 LTS from Microsoft Store.
You can also use Ubuntu 14.04 or 17.04
1. Restart if necessary
1. Create a new UNIX user account (this is a separate account from your Windows account)

After the bash shell is active, you can follow the instructions below.

Cross-compilation
-------------------

These steps can be performed on, for example, an Ubuntu VM. The depends system
These steps can be performed on WSL or, for example, an Ubuntu VM. The depends system
will also work on other Linux distributions, however the commands for
installing the toolchain will be different.

In WSL the entire windows path is part of the linux $PATH variable and it interferes with the
make command. We have to clean $PATH or can add "PATH=$(getconf PATH)" to the make command.
See https://github.com/bitcoin/bitcoin/pull/10889

First, install the general dependencies:

sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl
sudo apt update
sudo apt upgrade
sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git

A host toolchain (`build-essential`) is necessary because some dependency
packages (such as `protobuf`) need to build host utilities that are used in the
build process.

## Building for 64-bit Windows
### BerkeleyDB is required for the wallet

For Ubuntu only: db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
You can add the repository and install using the following commands:

sudo apt install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt install libdb4.8-dev libdb4.8++-dev

Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install
BerkeleyDB 5.1 or later. This will break binary wallet compatibility with the distributed executables, which
are based on BerkeleyDB 4.8. If you do not care about wallet compatibility,
pass `--with-incompatible-bdb` to configure.

### Installer

If you want to build the windows installer with `make deploy` you need NSIS:

sudo apt install nsis

### Download the source

git clone https://github.com/Krekeler/documentchain.git

### Building for 64-bit Windows

To build executables for Windows 64-bit, install the following dependencies:

sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
sudo apt install g++-mingw-w64-x86-64

Ubuntu 18.04:

sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

Then build using:

cd depends
make HOST=x86_64-w64-mingw32
cd documentchain/depends
make HOST=x86_64-w64-mingw32 PATH=$(getconf PATH)
cd ..
./autogen.sh # not required when building from tarball
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make

## Building for 32-bit Windows
### Building for 32-bit Windows

To build executables for Windows 32-bit, install the following dependencies:

sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev
sudo apt install g++-mingw-w64-i686 mingw-w64-i686-dev

Ubuntu 18.04:

sudo update-alternatives --config i686-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

Then build using:

cd depends
make HOST=i686-w64-mingw32
make HOST=i686-w64-mingw32 PATH=$(getconf PATH)
cd ..
./autogen.sh # not required when building from tarball
CONFIG_SITE=$PWD/depends/i686-w64-mingw32/share/config.site ./configure --prefix=/
@@ -99,6 +127,6 @@ Installation
After building using the Windows subsystem it can be useful to copy the compiled
executables to a directory on the windows drive in the same directory structure
as they appear in the release `.zip` archive. This can be done in the following
way. This will install to `c:\workspace\dms`, for example:
way. This will install to `c:\workspace\documentchain`, for example:

make install DESTDIR=/mnt/c/workspace/dms
make install DESTDIR=/mnt/c/workspace/documentchain
@@ -346,7 +346,7 @@ offline.
Building DMS Core
----------------

To build DMS Core (for Linux, OS X and Windows) just follow the steps under 'perform
To build DMS Core (for Linux, macOS and Windows) just follow the steps under 'perform
Gitian builds' in [doc/release-process.md](release-process.md#perform-gitian-builds) in the DMS Core repository.

This may take some time as it will build all the dependencies needed for each descriptor.
@@ -15,7 +15,7 @@ can be found in the contrib/init folder.

All three Linux startup configurations assume the existence of a "dmscore" user
and group. They must be created before attempting to use these scripts.
The OS X configuration assumes dmsd will be set up for the current user.
The macOS configuration assumes dmsd will be set up for the current user.

2. Configuration
---------------------------------
@@ -65,7 +65,7 @@ reasons to make the configuration file and data directory only readable by the
dmscore user and group. Access to dms-cli and other dmsd rpc clients
can then be controlled by group membership.

3b) Mac OS X
3b) macOS (OS X)

Binary: `/usr/local/bin/dmsd`
Configuration file: `~/Library/Application Support/DMSCore/dms.conf`
@@ -107,7 +107,7 @@ Using this script, you can adjust the path and flags to the dmsd program by
setting the dmsd and FLAGS environment variables in the file
/etc/sysconfig/dmsd. You can also use the DAEMONOPTS environment variable here.

4e) Mac OS X
4e) macOS (OS X)

Copy org.dms.dmsd.plist into ~/Library/LaunchAgents. Load the launch agent by
running `launchctl load ~/Library/LaunchAgents/org.dms.dmsd.plist`.
@@ -16,7 +16,7 @@ The python3-zmq library is required. On Ubuntu or Debian it can be installed via
sudo apt-get install python3-zmq
```

OS X
macOS (OS X)
------
```
pip3 install pyzmq

0 comments on commit 8d195e2

Please sign in to comment.
You can’t perform that action at this time.