forked from peercoin/peercoin
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build-osx-brew.txt
86 lines (52 loc) · 2.6 KB
/
build-osx-brew.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
Copyright (c) 2012-2013 PPCoin Developers
Copyright (c) 2009-2012 Bitcoin Developers
Distributed under the MIT/X11 software license, see the accompanying file
license.txt or http://www.opensource.org/licenses/mit-license.php. This
product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic
software written by Eric Young (eay@cryptsoft.com) and UPnP software written by
Thomas Bernard.
Mac OS X Mountain Lion build instructions
How to build peersharesd and Peershares-Qt on 10.8
Prerequisites
Install Xcode from the App Store and launch it
All of the commands should be executed in Terminal.app
1. Install the Command Line Tools from the Xcode Preferences under Downloads
2. Install Homebrew from http://brew.sh
3. Install dependencies from Homebrew
brew doctor
brew install boost berkeley-db4 openssl miniupnpc
brew link berkeley-db4 --force
brew link openssl --force
sudo mkdir -p /opt/local/lib
sudo ln -s /usr/local/lib /opt/local/lib/db48
4. Clone the github tree to get the source code
git clone https://github.com/Peershares/Peershares.git
Building peersharesd
1. Run the makefile
cd Peershares/src/
make -f makefile.osx RELEASE=true 64BIT=true CXX=g++
Building Peershares-Qt.app
You cannot use Qt 4.8.6 if you want to deploy to other systems
http://qt-project.org/forums/viewthread/41925
1. Download and install Qt 4.8.5 from
http://download.qt-project.org/archive/qt/4.8/4.8.5/qt-mac-opensource-4.8.5.dmg
2. Download and install Qt Creator from http://qt-project.org/downloads
3. Use Qt Creator to build the project
Double-click Peershares/peershares-qt.pro to open Qt-Creator
Click the Configure Project button
Click on the monitor icon on the left bar above Debug and change it to Release
On the top menu, click Build and Build Project "peershares-qt"
Deploying Peershares-Qt.app
Deploying your app is needed to run it on non-development systems
1. Sym-link some shit
sudo ln -s /opt/local/lib /opt/local/lib/lib
sudo ln -s /opt/local/lib/db48/libdb_cxx-4.8.dylib /opt/local/lib/libdb_cxx-4.8.dylib
2. Copy Peershares-Qt.app and run macdeployqt to bundle required libraries
mkdir deploy
cp -r build-peershares-qt-Desktop-Release/Peershares-Qt.app/ deploy/Peershares-Qt.app/
sudo macdeployqt deploy/Peershares-Qt.app/
3. Fix a dependency path
install_name_tool -change "/opt/local/lib/db48/libdb_cxx-4.8.dylib" "@executable_path/../Frameworks/libdb_cxx-4.8.dylib" deploy/Peershares-Qt.app/Contents/MacOS/Peershares-Qt
4. Compress Peershares-Qt.app into a zip
Right-click on Peershares-Qt.app and click Compress