-
Notifications
You must be signed in to change notification settings - Fork 98
/
INSTALL-OSX-Homebrew.txt
147 lines (92 loc) · 3.64 KB
/
INSTALL-OSX-Homebrew.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
##########################################################################
# #
# #
# ## INSTALL - OSX Mavericks ## #
# #
# #
##########################################################################
###############
## XCODE ##
# Go to the APP STORE and install XCODE
# Load XCODE and Open Preferences; under download, install “Command Line Tools”
# Tell xcode-select where the installed xcode is:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
##############
## BREW ##
# install brew:
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# check brew works
$ brew doctor
# add dupes and versions to homebrew:
$ brew tap homebrew/dupes
$ brew tap homebrew/versions
# update:
$ brew update && brew upgrade
# Get the Homebew-Prefix loacation from brew, and sets it in $HOMEBREW_PREFIX
# (We use the "$HOMEBREW_PREFIX" for where to install OpenSSL and OT):
$ echo "export $(brew --config | grep HOMEBREW_PREFIX | sed 's/: /=/')" >> ~/.profile
$ echo "export PKG_CONFIG_PATH=$HOMEBREW_PREFIX/lib/pkgconfig" >> ~/.profile
$ source ~/.profile
##############
## DEPS ##
$ brew install --cc=clang libtool cmake protobuf openssl zeromq
#######################
## OPEN TRANSACTIONS ##
# fetch Open Transactions and prepare your copy for build
$ mkdir -p ~/Scratch/Sources; cd ~/Scratch/Sources
$ git clone https://github.com/Open-Transactions/opentxs.git
$ cd Open-Transactions
# to clean and reset to HEAD:
$ git clean -fxd && git submodule foreach git clean -fxd
$ git reset --hard HEAD && git submodule foreach git reset --hard HEAD
$ mkdir -p build; cd build
$ cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/openssl
$ make -j2
$ make install
############## CMake Options: ##############
Set install dir: -DCMAKE_INSTALL_PREFIX=/home/your/prefix/
(Default is /usr/local)
Build static: -DBUILD_SHARED_LIBS=OFF
Debug Mode: -DCMAKE_BUILD_TYPE=Debug
(Default is Release)
Signal Handling: -DSIGNAL_HANLDER=ON
SWIG Version 3.0.0 or newer required.
##########################################
System Keyring (Optional):
Windows : -DKEYRING_WINDOWS=ON
Mac : -DKEYRING_MAC=ON
Gnome : -DKEYRING_GNOME=ON
KDE KWallet : -DKEYRING_KWALLET=ON
Flatfile : -DKEYRING_FLATFILE=ON
opentxs CL client autocompletion: -DAUTOCOMPLETION=ON
Enable OTAPI support for swig wrapper:
Java : -DJAVA=ON
Perl : -DPERL=ON
PHP : -DPHP=ON
Python : -DPYTHON=ON
Ruby : -DRUBY=ON
TCL : -DTCL=ON
C# : -DCSHARP=ON
D : -DD=ON
Go : -DGO=ON
Build Packages:
RPM: -DRPM=ON
DEB: -DDEB=ON
##########################################
==============================
### Miscellaneous Notes: ###
# Create a wallet data folder (will reset everything):
$ mkdir -p ~/.ot && cp -R sample-data/ot-sample-data/* ~/.ot
# add to ~/.profile
export PKG_CONFIG_PATH=$HOMEBREW_PREFIX/lib/pkgconfig
# set PATH so it includes homebrew prefix
if [ -d "$HOMEBREW_PREFIX/bin" ] ; then
PATH="$HOMEBREW_PREFIX/bin:$PATH"
fi
# to avoid logging out and then logging back in again, just do ...
$ source ~/.profile
# to run otserver
$ otserver
# for python client api support export env variable
$ export PYTHON_PATH=$HOMEBREW_PREFIX/lib:$PYTHON_PATH
==============================