From 1dfd71765539f45d79348137ee7052e7e490c45c Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 7 Jun 2017 06:06:20 +0300 Subject: [PATCH 1/8] add translation strings for "Silent mode" function --- src/qt/locale/bitcoin_en.ts | 10 ++++++++++ src/qt/locale/bitcoin_ru.ts | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 4fa202a..47f4dda 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -930,6 +930,16 @@ Address: %4 M&inimize on close M&inimize on close + + + Suppress notifications and tray animations + Suppress notifications and tray animations + + + + Silent mode + Silent mode + &Display diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index c4fd1b4..2e61506 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -916,6 +916,16 @@ Address: %4 M&inimize on close С&ворачивать при закрытии + + + Suppress notifications and tray animations + Отключить уведомления и анимацию в системном лотке + + + + Silent mode + Тихий режим + &Display From 42f48d9e5212f9a8982efba39e4690fd32d6917b Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 29 Jun 2017 11:45:20 -0400 Subject: [PATCH 2/8] added gostco.in to seeds --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 0f17c91..79e3eca 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1232,7 +1232,7 @@ static const char *strI2PDNSSeed[][2] = { // The first name is used as information source for addrman. // The second name should resolve to a list of seed addresses. static const char *strMainNetDNSSeed[][2] = { - {"coinpool.in", "gostcoin.dnsseed.coinpool.in"}, + {"gostco.in", "dnsseed.gostco.in"}, // {"anoncoin.net", "dnsseed01.anoncoin.net"}, {NULL, NULL} }; From 3294ae9341e163f3fc2ef1f3abe0dffc604f3605 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 30 Jun 2017 11:40:54 -0400 Subject: [PATCH 3/8] run setup wizard --- gostcoin-qt.pro | 4 ++- src/qt/gostcoin.cpp | 4 ++- src/qt/setupdarknet.cpp | 63 +++++++++++++++++++++++++++++++++++++++++ src/qt/setupdarknet.h | 7 +++++ src/util.cpp | 8 ++++-- src/util.h | 2 +- 6 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 src/qt/setupdarknet.cpp create mode 100644 src/qt/setupdarknet.h diff --git a/gostcoin-qt.pro b/gostcoin-qt.pro index 6a9fe5b..0b19cfb 100644 --- a/gostcoin-qt.pro +++ b/gostcoin-qt.pro @@ -211,7 +211,8 @@ HEADERS += src/qt/bitcoingui.h \ src/qt/macnotificationhandler.h \ src/qt/splashscreen.h \ src/qt/showi2paddresses.h \ - src/qt/i2poptionswidget.h + src/qt/i2poptionswidget.h \ + src/qt/setupdarknet.h SOURCES += src/qt/gostcoin.cpp \ src/qt/bitcoingui.cpp \ @@ -286,6 +287,7 @@ SOURCES += src/qt/gostcoin.cpp \ src/qt/splashscreen.cpp \ src/qt/showi2paddresses.cpp \ src/qt/i2poptionswidget.cpp \ + src/qt/setupdarknet.cpp \ i2psam/i2psam.cpp RESOURCES += src/qt/bitcoin.qrc diff --git a/src/qt/gostcoin.cpp b/src/qt/gostcoin.cpp index b85d1fa..041bd8e 100644 --- a/src/qt/gostcoin.cpp +++ b/src/qt/gostcoin.cpp @@ -23,6 +23,7 @@ #include "ui_interface.h" #include "paymentserver.h" #include "splashscreen.h" +#include "setupdarknet.h" #include #if QT_VERSION < 0x050000 @@ -194,7 +195,8 @@ int main(int argc, char *argv[]) // Gostcoin if (!boost::filesystem::exists(GetConfigFile().string())) { - writeFirstConfig(); // create default config + // Run wizard + runFirstRunWizard(); } // Read config after it's potentional written by the wizard. ReadConfigFile(mapArgs, mapMultiArgs); diff --git a/src/qt/setupdarknet.cpp b/src/qt/setupdarknet.cpp new file mode 100644 index 0000000..2546c5c --- /dev/null +++ b/src/qt/setupdarknet.cpp @@ -0,0 +1,63 @@ +// Copyright 2013 The Anoncoin Developers +// Copyright 2017 The Gostcoin Developers + +#include +#include +#include + +#include "setupdarknet.h" +#include "bitcoingui.h" +#include "util.h" + + +void runFirstRunWizard() +{ + QString strMessage = BitcoinGUI::tr("Do you run I2P on your computer?\n" + "If so, press yes to let Gostcoin configure it's " + "connection to the I2P"); + QMessageBox::StandardButton isRunningDarknet = QMessageBox::question(NULL, + BitcoinGUI::tr("Gostcoin Wizard - Step #1"), strMessage, + QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes); + if (isRunningDarknet == QMessageBox::No) + { + // Tell user to download + strMessage = BitcoinGUI::tr("Do you want to install I2P, and " + "continue I2P setup?\nIf you select yes Gostcoin will quit, " + "so you can continue the wizard after installing I2P.\n" + "If you select no, Gostcoin will write a default clearnet " + "(regular internet) config file for you. (unsafe mode)\n"); + QMessageBox::StandardButton wantDownloadDarknet = QMessageBox::question(NULL, + BitcoinGUI::tr("Gostcoin Wizard - Step #2"), strMessage, + QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes); + if (wantDownloadDarknet == QMessageBox::No) + { + writeFirstConfig(false, false); + return; + } + QApplication::quit(); + exit(7); // Exit code 7 = awaiting darknet + } + // Step #2 passed. Use I2P + FinishWizard(); +} + +void FinishWizard() +{ + QMessageBox msgBox; + QPushButton *sharedButton = msgBox.addButton(BitcoinGUI::tr("Shared"), QMessageBox::ActionRole); + QPushButton * i2pOnlyButton = msgBox.addButton(BitcoinGUI::tr("I2P only"), QMessageBox::ActionRole); + msgBox.setText(BitcoinGUI::tr("Ok, last question!\nDo you want to run shared " + "(which means you work as a bridge between the " + "I2P and internet) or only I2P?")); + msgBox.exec(); + if (msgBox.clickedButton() == i2pOnlyButton) + writeFirstConfig (true, true); + else if (msgBox.clickedButton() == sharedButton) + writeFirstConfig (false, true); + QMessageBox msgBoxThanks; + msgBoxThanks.setText(BitcoinGUI::tr("Thanks! That was all. Enjoy your wallet :)")); + msgBoxThanks.exec(); + return; +} + + diff --git a/src/qt/setupdarknet.h b/src/qt/setupdarknet.h new file mode 100644 index 0000000..e5fbad1 --- /dev/null +++ b/src/qt/setupdarknet.h @@ -0,0 +1,7 @@ +#ifndef SETUPDARKNET_H +#define SETUPDARKNET_H + +void runFirstRunWizard(); +void FinishWizard(); + +#endif diff --git a/src/util.cpp b/src/util.cpp index 6c16493..13c1199 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -996,13 +996,15 @@ bool writeConfig(boost::filesystem::path configFile, boost::property_tree::ptree } // call upon first run -bool writeFirstConfig() +bool writeFirstConfig(bool i2pOnlyEnabled, bool i2pEnabled) { using boost::property_tree::ptree; ptree pt; - pt.put("onlynet", "i2p"); - pt.put("i2p", 1); + if (i2pOnlyEnabled) + pt.put("onlynet", "i2p"); + if (i2pEnabled) + pt.put("i2p", 1); unsigned char rand_pwd[32]; RAND_bytes(rand_pwd, 32); pt.put("rpcuser", "gostcoinrpc"); diff --git a/src/util.h b/src/util.h index a880d0d..c534095 100644 --- a/src/util.h +++ b/src/util.h @@ -133,7 +133,7 @@ inline void MilliSleep(int64 n) // Gostcoin bool WriteConfig(boost::filesystem::path configFile, boost::property_tree::ptree data); -bool writeFirstConfig(); // always I2P +bool writeFirstConfig(bool i2pOnlyEnabled, bool i2pEnabled); From 4f04844f4284f1d84891f7bdfe5bd245eb3d0e0a Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 30 Jun 2017 12:07:29 -0400 Subject: [PATCH 4/8] write defualt config for I2P --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index d75c6f4..0a97c25 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -196,7 +196,7 @@ bool AppInit(int argc, char* argv[]) } if (!boost::filesystem::exists(GetConfigFile().string())) { - writeFirstConfig(); // create default config + writeFirstConfig(true, true); // create default config } ReadConfigFile(mapArgs, mapMultiArgs); From 219c550d9cf6934a1264c023d2d6b435582b8a03 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 30 Jun 2017 12:28:34 -0400 Subject: [PATCH 5/8] 0.8.5.9 --- src/clientversion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clientversion.h b/src/clientversion.h index c13798d..be90aeb 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -9,7 +9,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 5 -#define CLIENT_VERSION_BUILD 8 +#define CLIENT_VERSION_BUILD 9 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true From 59170372ea9bfabc36fbfd3a97103efb93bb588f Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sun, 2 Jul 2017 11:20:49 +0300 Subject: [PATCH 6/8] update qt project files --- gostcoin-qt.pro | 8 ++++---- share/genbuild.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gostcoin-qt.pro b/gostcoin-qt.pro index 0b19cfb..667582e 100644 --- a/gostcoin-qt.pro +++ b/gostcoin-qt.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = gostcoin-qt macx:TARGET = "GOSTcoin-Qt" -VERSION = 0.8.5.8 +VERSION = 0.8.5.9 INCLUDEPATH += src src/json src/qt i2psam QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets @@ -107,7 +107,7 @@ genleveldb.depends = FORCE PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a QMAKE_EXTRA_TARGETS += 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; cd $$PWD/src/leveldb ; $(MAKE) clean +QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb; $(MAKE) clean # regenerate src/build.h !win32|contains(USE_BUILD_INFO, 1) { @@ -212,7 +212,7 @@ HEADERS += src/qt/bitcoingui.h \ src/qt/splashscreen.h \ src/qt/showi2paddresses.h \ src/qt/i2poptionswidget.h \ - src/qt/setupdarknet.h + src/qt/setupdarknet.h SOURCES += src/qt/gostcoin.cpp \ src/qt/bitcoingui.cpp \ @@ -287,7 +287,7 @@ SOURCES += src/qt/gostcoin.cpp \ src/qt/splashscreen.cpp \ src/qt/showi2paddresses.cpp \ src/qt/i2poptionswidget.cpp \ - src/qt/setupdarknet.cpp \ + src/qt/setupdarknet.cpp \ i2psam/i2psam.cpp RESOURCES += src/qt/bitcoin.qrc diff --git a/share/genbuild.sh b/share/genbuild.sh index d959877..52b20fe 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -16,7 +16,7 @@ if [ -e "$(which git)" ]; then git diff >/dev/null 2>/dev/null # get a string like "v0.6.0-66-g59887e8-dirty" - DESC="$(git describe --dirty 2>/dev/null)" + DESC="$(git describe --tags --dirty 2>/dev/null)" # get a string like "2012-04-10 16:27:19 +0200" TIME="$(git log -n 1 --format="%ci")" From 948d50845ec84e7ab37ffcd40c625a68afd92cc0 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sun, 2 Jul 2017 19:11:09 +0300 Subject: [PATCH 7/8] fix clean target --- gostcoin-qt.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gostcoin-qt.pro b/gostcoin-qt.pro index 667582e..0e84f16 100644 --- a/gostcoin-qt.pro +++ b/gostcoin-qt.pro @@ -107,7 +107,7 @@ genleveldb.depends = FORCE PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a QMAKE_EXTRA_TARGETS += 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; cd $$PWD/src/leveldb; $(MAKE) clean +QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a # regenerate src/build.h !win32|contains(USE_BUILD_INFO, 1) { From fe8df45ec8c8c79b0c396f7eff922242b11e7319 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Thu, 13 Jul 2017 14:06:32 +0300 Subject: [PATCH 8/8] move libdl to dynamic linking (otherwise linking error) --- gostcoin-qt.pro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gostcoin-qt.pro b/gostcoin-qt.pro index 0e84f16..3f61eda 100644 --- a/gostcoin-qt.pro +++ b/gostcoin-qt.pro @@ -433,7 +433,6 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.plist 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 += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -lz -!win32:LIBS += -ldl # -lgdi32 has to happen after -lcrypto (see #681) 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 @@ -446,5 +445,8 @@ contains(RELEASE, 1) { LIBS += -Wl,-Bdynamic } } +# Add LibDL firstly here +!win32:LIBS += -ldl + system($$QMAKE_LRELEASE -silent $$TRANSLATIONS)