Browse Source

Merge branch 'master' of github.com:StPrimateCoder/gostcoin

pull/16/head
Warlock-Dalbaeb 7 years ago
parent
commit
84c6732dec
  1. 12
      gostcoin-qt.pro
  2. 2
      share/genbuild.sh
  3. 2
      src/clientversion.h
  4. 2
      src/init.cpp
  5. 2
      src/net.cpp
  6. 4
      src/qt/gostcoin.cpp
  7. 10
      src/qt/locale/bitcoin_en.ts
  8. 10
      src/qt/locale/bitcoin_ru.ts
  9. 63
      src/qt/setupdarknet.cpp
  10. 7
      src/qt/setupdarknet.h
  11. 8
      src/util.cpp
  12. 2
      src/util.h

12
gostcoin-qt.pro

@ -1,7 +1,7 @@ @@ -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 @@ -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) {
@ -211,7 +211,8 @@ HEADERS += src/qt/bitcoingui.h \ @@ -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 \ @@ -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
@ -431,7 +433,6 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.plist @@ -431,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
@ -444,5 +445,8 @@ contains(RELEASE, 1) { @@ -444,5 +445,8 @@ contains(RELEASE, 1) {
LIBS += -Wl,-Bdynamic
}
}
# Add LibDL firstly here
!win32:LIBS += -ldl
system($$QMAKE_LRELEASE -silent $$TRANSLATIONS)

2
share/genbuild.sh

@ -16,7 +16,7 @@ if [ -e "$(which git)" ]; then @@ -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")"

2
src/clientversion.h

@ -9,7 +9,7 @@ @@ -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

2
src/init.cpp

@ -196,7 +196,7 @@ bool AppInit(int argc, char* argv[]) @@ -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);

2
src/net.cpp

@ -1232,7 +1232,7 @@ static const char *strI2PDNSSeed[][2] = { @@ -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}
};

4
src/qt/gostcoin.cpp

@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
#include "ui_interface.h"
#include "paymentserver.h"
#include "splashscreen.h"
#include "setupdarknet.h"
#include <QMessageBox>
#if QT_VERSION < 0x050000
@ -194,7 +195,8 @@ int main(int argc, char *argv[]) @@ -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);

10
src/qt/locale/bitcoin_en.ts

@ -930,6 +930,16 @@ Address: %4 @@ -930,6 +930,16 @@ Address: %4
<source>M&amp;inimize on close</source>
<translation>M&amp;inimize on close</translation>
</message>
<message>
<location line="+7"/>
<source>Suppress notifications and tray animations</source>
<translation>Suppress notifications and tray animations</translation>
</message>
<message>
<location line="+3"/>
<source>Silent mode</source>
<translation>Silent mode</translation>
</message>
<message>
<location line="+21"/>
<source>&amp;Display</source>

10
src/qt/locale/bitcoin_ru.ts

@ -916,6 +916,16 @@ Address: %4 @@ -916,6 +916,16 @@ Address: %4
<source>M&amp;inimize on close</source>
<translation>С&amp;ворачивать при закрытии</translation>
</message>
<message>
<location line="+7"/>
<source>Suppress notifications and tray animations</source>
<translation>Отключить уведомления и анимацию в системном лотке</translation>
</message>
<message>
<location line="+3"/>
<source>Silent mode</source>
<translation>Тихий режим</translation>
</message>
<message>
<location line="+21"/>
<source>&amp;Display</source>

63
src/qt/setupdarknet.cpp

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
// Copyright 2013 The Anoncoin Developers
// Copyright 2017 The Gostcoin Developers
#include <QApplication>
#include <QMessageBox>
#include <QPushButton>
#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;
}

7
src/qt/setupdarknet.h

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
#ifndef SETUPDARKNET_H
#define SETUPDARKNET_H
void runFirstRunWizard();
void FinishWizard();
#endif

8
src/util.cpp

@ -996,13 +996,15 @@ bool writeConfig(boost::filesystem::path configFile, boost::property_tree::ptree @@ -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");

2
src/util.h

@ -133,7 +133,7 @@ inline void MilliSleep(int64 n) @@ -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);

Loading…
Cancel
Save