Browse Source

link and initialize i2pd

pull/5/head
orignal 7 years ago
parent
commit
8338af9b32
  1. 3
      src/init.cpp
  2. 3
      src/qt/unioncoin.cpp
  3. 8
      unioncoin-qt.pro

3
src/init.cpp

@ -13,6 +13,7 @@
#include "init.h" #include "init.h"
#include "util.h" #include "util.h"
#include "ui_interface.h" #include "ui_interface.h"
#include "api.h" //i2pd
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
@ -137,6 +138,7 @@ void Shutdown()
UnregisterWallet(pwalletMain); UnregisterWallet(pwalletMain);
if (pwalletMain) if (pwalletMain)
delete pwalletMain; delete pwalletMain;
i2p::api::TerminateI2P ();
printf("Shutdown : done\n"); printf("Shutdown : done\n");
} }
@ -175,6 +177,7 @@ void HandleSIGHUP(int)
#if !defined(QT_GUI) #if !defined(QT_GUI)
bool AppInit(int argc, char* argv[]) bool AppInit(int argc, char* argv[])
{ {
i2p::api::InitI2P (argc, argv, "unioncoin");
boost::thread_group threadGroup; boost::thread_group threadGroup;
boost::thread* detectShutdownThread = NULL; boost::thread* detectShutdownThread = NULL;

3
src/qt/anoncoin.cpp → src/qt/unioncoin.cpp

@ -24,6 +24,7 @@
#include "paymentserver.h" #include "paymentserver.h"
#include "splashscreen.h" #include "splashscreen.h"
#include "setupdarknet.h" #include "setupdarknet.h"
#include "api.h" //i2pd
#include <QMessageBox> #include <QMessageBox>
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
@ -161,6 +162,7 @@ int main(int argc, char *argv[])
{ {
// Command-line options take precedence: // Command-line options take precedence:
ParseParameters(argc, argv); ParseParameters(argc, argv);
i2p::api::InitI2P (argc, argv, "unioncoin");
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
// Internal string conversion is all UTF-8 // Internal string conversion is all UTF-8
@ -381,6 +383,7 @@ int main(int argc, char *argv[])
} catch (...) { } catch (...) {
handleRunawayException(NULL); handleRunawayException(NULL);
} }
i2p::api::TerminateI2P ();
return 0; return 0;
} }
#endif // BITCOIN_QT_TEST #endif // BITCOIN_QT_TEST

8
unioncoin-qt.pro

@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = unioncoin-qt TARGET = unioncoin-qt
macx:TARGET = "Unioncoin-Qt" macx:TARGET = "Unioncoin-Qt"
VERSION = 0.8.5.6 VERSION = 0.8.5.6
INCLUDEPATH += src src/json src/qt i2psam INCLUDEPATH += src src/json src/qt i2psam i2pd
QT += core gui network QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_NO_CXX11_SCOPED_ENUMS DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_NO_CXX11_SCOPED_ENUMS
@ -226,7 +226,7 @@ HEADERS += src/qt/bitcoingui.h \
src/qt/i2poptionswidget.h \ src/qt/i2poptionswidget.h \
src/qt/setupdarknet.h src/qt/setupdarknet.h
SOURCES += src/qt/anoncoin.cpp \ SOURCES += src/qt/unioncoin.cpp \
src/qt/bitcoingui.cpp \ src/qt/bitcoingui.cpp \
src/qt/transactiontablemodel.cpp \ src/qt/transactiontablemodel.cpp \
src/qt/addresstablemodel.cpp \ src/qt/addresstablemodel.cpp \
@ -439,10 +439,10 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.plist
# Set libraries and includes at end, to use platform-defined defaults if not overridden # Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -Li2psam -li2psam LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -Li2psam -li2psam i2pd/libi2pd.a -lz
# -lgdi32 has to happen after -lcrypto (see #681) # -lgdi32 has to happen after -lcrypto (see #681)
win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX -lboost_date_time$$BOOST_THREAD_LIB_SUFFIX
win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX

Loading…
Cancel
Save