mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-30 08:24:20 +00:00
osx build
This commit is contained in:
parent
1b11c5653c
commit
f8e6bb0ad5
25
docs/build_osx.txt
Normal file
25
docs/build_osx.txt
Normal file
@ -0,0 +1,25 @@
|
||||
Requirements:
|
||||
|
||||
- Brew
|
||||
- OpenSSL
|
||||
- Boost
|
||||
- BerkeleyDB 4
|
||||
- Qt
|
||||
- QREncode (optional)
|
||||
- DBUS (optional)
|
||||
|
||||
Installing:
|
||||
|
||||
$ xcode-select --install
|
||||
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
$ brew install make boost openssl berkeley-db@4 qt
|
||||
(optional)$ brew install qrencode dbus
|
||||
|
||||
Building:
|
||||
$ export PATH="/usr/local/opt/qt/bin:$PATH"
|
||||
$ git clone https://github.com/GOSTSec/gostcoin.git
|
||||
$ cd gostcoin
|
||||
$ qmake RELEASE=1 USE_BUILD_INFO=1 [USE_QRCODE=1] [USE_DBUS=1]
|
||||
$ make
|
||||
|
||||
Find GOSTCoin-Qt app in current directory.
|
@ -1,6 +1,6 @@
|
||||
TEMPLATE = app
|
||||
TARGET = gostcoin-qt
|
||||
macx:TARGET = "GOSTcoin-Qt"
|
||||
macx:TARGET = "GOSTCoin-Qt"
|
||||
VERSION = 0.8.5.11
|
||||
INCLUDEPATH += src src/json src/qt src/i2psam
|
||||
QT += core gui network
|
||||
@ -25,10 +25,10 @@ UI_DIR = build
|
||||
|
||||
# use: qmake "RELEASE=1"
|
||||
contains(RELEASE, 1) {
|
||||
# Mac: compile for maximum compatibility (10.5, 32-bit)
|
||||
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
|
||||
macx:QMAKE_CFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
|
||||
macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
|
||||
# Mac: compile for maximum compatibility (10.11, 64-bit)
|
||||
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
||||
macx:QMAKE_CFLAGS += -mmacosx-version-min=10.11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
||||
macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
||||
|
||||
!win32:!macx {
|
||||
# Linux: static link and extra security (see: https://wiki.debian.org/Hardening)
|
||||
@ -95,6 +95,7 @@ LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
|
||||
!win32 {
|
||||
# we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
|
||||
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
|
||||
cleanleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) clean
|
||||
} else {
|
||||
# make an educated guess about what the ranlib command is called
|
||||
isEmpty(QMAKE_RANLIB) {
|
||||
@ -102,13 +103,16 @@ LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
|
||||
}
|
||||
LIBS += -lshlwapi
|
||||
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
|
||||
cleanleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) clean
|
||||
}
|
||||
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
|
||||
genleveldb.depends = FORCE
|
||||
cleanleveldb.depends = clean
|
||||
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
|
||||
QMAKE_EXTRA_TARGETS += genleveldb
|
||||
QMAKE_EXTRA_TARGETS += cleanleveldb genleveldb
|
||||
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
|
||||
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
|
||||
CLEAN_DEPS += cleanleveldb
|
||||
#QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
|
||||
|
||||
# regenerate src/build.h
|
||||
!win32|contains(USE_BUILD_INFO, 1) {
|
||||
@ -369,7 +373,7 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
||||
}
|
||||
|
||||
isEmpty(BDB_LIB_PATH) {
|
||||
macx:BDB_LIB_PATH = /opt/local/lib/db48
|
||||
macx:BDB_LIB_PATH = /usr/local/opt/berkeley-db@4/lib
|
||||
win32:BDB_LIB_PATH = /usr/local/lib
|
||||
}
|
||||
|
||||
@ -378,20 +382,41 @@ isEmpty(BDB_LIB_SUFFIX) {
|
||||
}
|
||||
|
||||
isEmpty(BDB_INCLUDE_PATH) {
|
||||
macx:BDB_INCLUDE_PATH = /opt/local/include/db48
|
||||
macx:BDB_INCLUDE_PATH = /usr/local/opt/berkeley-db@4/include
|
||||
win32:BDB_INCLUDE_PATH = /usr/local/include
|
||||
}
|
||||
|
||||
isEmpty(BOOST_LIB_PATH) {
|
||||
macx:BOOST_LIB_PATH = /opt/local/lib
|
||||
macx:BOOST_LIB_PATH = /usr/local/opt/boost/lib
|
||||
win32:BOOST_LIB_PATH = /mingw32/lib
|
||||
}
|
||||
|
||||
isEmpty(BOOST_INCLUDE_PATH) {
|
||||
macx:BOOST_INCLUDE_PATH = /opt/local/include
|
||||
macx:BOOST_INCLUDE_PATH = /usr/local/opt/boost/include
|
||||
win32:BOOST_INCLUDE_PATH = /mingw32/include
|
||||
}
|
||||
|
||||
isEmpty(OPENSSL_LIB_PATH) {
|
||||
macx:OPENSSL_LIB_PATH = /usr/local/opt/openssl/lib
|
||||
win32:OPENSSL_LIB_PATH = /mingw32/lib
|
||||
}
|
||||
|
||||
isEmpty(OPENSSL_INCLUDE_PATH) {
|
||||
macx:OPENSSL_INCLUDE_PATH = /usr/local/opt/openssl/include
|
||||
win32:OPENSSL_INCLUDE_PATH = /mingw32/include
|
||||
}
|
||||
|
||||
isEmpty(QRENCODE_LIB_PATH) {
|
||||
macx:QRENCODE_LIB_PATH = /usr/local/opt/qrencode/lib
|
||||
win32:QRENCODE_LIB_PATH = /mingw32/lib
|
||||
}
|
||||
|
||||
isEmpty(QRENCODE_INCLUDE_PATH) {
|
||||
macx:QRENCODE_INCLUDE_PATH = /usr/local/opt/qrencode/include
|
||||
win32:QRENCODE_INCLUDE_PATH = /mingw32/include
|
||||
}
|
||||
|
||||
|
||||
win32:DEFINES += WIN32
|
||||
win32:RC_FILE = src/qt/res/gostcoin-qt.rc
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user