Skip to content

Commit

Permalink
Merge pull request #196 from carsenk/v3.4
Browse files Browse the repository at this point in the history
v3.3.7
  • Loading branch information
metaspartan authored Feb 16, 2019
2 parents 2d50cf7 + ed215ef commit e8751fa
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 66 deletions.
24 changes: 0 additions & 24 deletions .qmake.stash

This file was deleted.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ ASCII CAST TUTORIALS
[![asciicast](https://asciinema.org/a/179362.png)](https://asciinema.org/a/179362)
[![asciicast](https://asciinema.org/a/179355.png)](https://asciinema.org/a/179355)

denariusqtubuntu.sh by Buzzkillb
===========================
Compile the latest Denarius QT (Graphical Wallet) Ubuntu 16.04 or Ubuntu 18.04.1

Credits to Buzzkillb for the creation of this bash script, original repository: https://github.com/buzzkillb/denarius-qt/

Compiles Denarius QT Ubuntu 16.04 or 18.04, Grabs latest chaindata, and populates denarius.conf with addnodes or can update a previous compile to the latest master branch.
```bash -c "$(wget -O - https://raw.githubusercontent.com/carsenk/denarius/master/denariusqtubuntu.sh)"```

To turn on nativetor in denarius.conf
```nativetor=1```

![Denarius Installer Menu](https://raw.githubusercontent.com/buzzkillb/denarius-qt/master/compile-menu.PNG)

Development process
===========================

Expand Down
11 changes: 8 additions & 3 deletions denarius-qt.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = Denarius
VERSION = 3.3.6.0
VERSION = 3.3.7.0
INCLUDEPATH += src src/json src/qt src/tor src/qt/plugins/mrichtexteditor
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
Expand All @@ -18,6 +18,10 @@ greaterThan(QT_MAJOR_VERSION, 4) {
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}

linux {
QMAKE_CFLAGS += -std=gnu99
}

win32 {
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57
BOOST_INCLUDE_PATH=C:/deps/boost_1_57_0
Expand Down Expand Up @@ -730,10 +734,11 @@ macx:ICON = src/qt/res/icons/denarius.icns
macx:TARGET = "Denarius"
macx:QMAKE_CFLAGS_THREAD += -pthread
macx:QMAKE_LFLAGS_THREAD += -pthread
macx:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
macx:QMAKE_MAC_SDK = macosx10.11
macx:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx:QMAKE_MAC_SDK = macosx10.14
macx:QMAKE_CXXFLAGS_THREAD += -pthread
macx:QMAKE_RPATHDIR = @executable_path/../Frameworks
macx:QMAKE_CXXFLAGS += -stdlib=libc++


# Set libraries and includes at end, to use platform-defined defaults if not overridden
Expand Down
117 changes: 117 additions & 0 deletions denariusqtubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/bin/bash
TEMP=/tmp/answer$$
whiptail --title "Denarius [D]" --menu "Ubuntu 16.04/18.04 QT Wallet :" 20 0 0 1 "Compile Denarius QT Ubuntu 16.04" 2 "Update Denarius QT 16.04 to v3.4 latest" 3 "Compile Denarius QT Ubuntu 18.04" 4 "Update Denarius QT 18.04 to v3.4 latest" 2>$TEMP
choice=`cat $TEMP`
case $choice in
1) echo 1 "Compiling Denarius QT Ubuntu 16.04"

echo "Updating linux packages"
sudo apt-get update -y && apt-get upgrade -y

sudo apt-get --assume-yes install git unzip build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libevent-dev autogen automake libtool libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools

sudo apt-get --assume-yes install qt5-default

echo "Installing Denarius Wallet"
git clone https://github.com/carsenk/denarius
cd denarius || exit
git checkout master
git pull

#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro

qmake "USE_QRCODE=1" "USE_UPNP=1" denarius-qt.pro
make

echo "Populate denarius.conf"
mkdir ~/.denarius
echo -e "nativetor=0\naddnode=denarius.host\naddnode=denarius.win\naddnode=denarius.pro\naddnode=triforce.black" > ~/.denarius/denarius.conf

echo "Get Chaindata"
cd ~/.denarius || exit
rm -rf database txleveldb smsgDB
#wget http://d.hashbag.cc/chaindata.zip
#unzip chaindata.zip
wget https://github.com/carsenk/denarius/releases/download/v3.3.6/chaindata1612994.zip
unzip chaindata1612994.zip
rm chaindata1612994.zip
Echo "Back to Compiled QT Binary Folder"
cd ~/denarius/src
;;
2) echo 2 "Update Denarius QT"
echo "Updating Denarius Wallet"
cd ~/denarius || exit
git checkout master
git pull

#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro

qmake "USE_QRCODE=1" "USE_UPNP=1" denarius-qt.pro
make
Echo "Back to Compiled QT Binary Folder"
cd ~/denarius/src
;;
3) echo 3 "Compile Denarius QT Ubuntu 18.04"
echo "Updating linux packages"
sudo apt-get update -y && apt-get upgrade -y

sudo apt-get --assume-yes install git unzip build-essential libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libevent-dev autogen automake libtool libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools

sudo apt-get --assume-yes install qt5-default

echo "Downgrade libssl-dev"
sudo apt-get install make
wget https://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -xzvf openssl-1.0.1j.tar.gz
cd openssl-1.0.1j
sudo ./config
sudo make install
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl`
cd ~
openssl version -v

echo "Installing Denarius Wallet"
git clone https://github.com/carsenk/denarius
cd denarius
git checkout master
git pull

#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro

qmake "USE_UPNP=1" "USE_QRCODE=1" OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib denarius-qt.pro
make

echo "Populate denarius.conf"
mkdir ~/.denarius
echo -e "nativetor=0\naddnode=denarius.host\naddnode=denarius.win\naddnode=denarius.pro\naddnode=triforce.black" > ~/.denarius/denarius.conf

echo "Get Chaindata"
cd ~/.denarius
rm -rf database txleveldb smsgDB
#wget http://d.hashbag.cc/chaindata.zip
#unzip chaindata.zip
wget https://github.com/carsenk/denarius/releases/download/v3.3.6/chaindata1612994.zip
unzip chaindata1612994.zip
chaindata1612994.zip
Echo "Back to Compiled QT Binary Folder"
cd ~/denarius/src
;;
4) echo 4 "Update Denarius QT 18.04"
echo "Updating Denarius Wallet"
cd ~/denarius || exit
git checkout master
git pull

#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro

qmake "USE_UPNP=1" "USE_QRCODE=1" OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib denarius-qt.pro
make
Echo "Back to Compiled QT Binary Folder"
cd ~/denarius/src
;;
esac
echo Selected $choice
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 3
#define CLIENT_VERSION_REVISION 6
#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD 0

// Converts the parameter X to a string after macro replacement on X has been performed.
Expand Down
4 changes: 2 additions & 2 deletions src/fortunastake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ struct MatchPubkey

void CFortunaPayments::update(const CBlockIndex *pindex, bool force)
{
if (!pindex || IsInitialBlockDownload()) return 0;
if (!pindex || IsInitialBlockDownload()) return; //return 0 should not return value
const CBlockIndex *BlockReading = pindex;
int rewardCount = 0;
int64_t rewardValue = 0;
Expand Down Expand Up @@ -1436,7 +1436,7 @@ void CFortunaPayments::update(const CBlockIndex *pindex, bool force)

bool CFortunaPayments::initialize(const CBlockIndex *pindex)
{
if (vCollaterals.size() > 0) return;
if (vCollaterals.size() > 0) return 0; //return should return value here
printf("Setting up FS payment validation...\n");
CTxDB txdb("r");
const CBlockIndex *BlockReading = pindex;
Expand Down
4 changes: 2 additions & 2 deletions src/qt/forms/overviewpage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Refresh Totals</string>
<string> Refresh </string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
Expand Down Expand Up @@ -545,7 +545,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>&lt;div style=&quot;color: #fff;&quot;&gt;(&lt;a href=&quot;https://www.cryptopia.co.nz/Exchange/?market=D_BTC&quot; style=&quot;color: #fff;&quot;&gt;Trade D&lt;/a&gt;)&lt;/div&gt;</string>
<string>&lt;div style=&quot;color: #fff;&quot;&gt;(&lt;a href=&quot;https://www.coinexchange.io/market/D/BTC&quot; style=&quot;color: #fff;&quot;&gt;Trade D&lt;/a&gt;)&lt;/div&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
Expand Down
4 changes: 2 additions & 2 deletions src/qt/fortunastakemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void FortunastakeManager::updateAdrenalineNode(QString alias, QString addr, QStr
QTableWidgetItem *statusItem = new QTableWidgetItem(status);
QTableWidgetItem *collateralItem = new QTableWidgetItem(collateral);
SortedWidgetItem *rankItem = new SortedWidgetItem();
SortedWidgetItem *payrateItem = new QTableWidgetItem(payrate);
SortedWidgetItem *payrateItem = new SortedWidgetItem();

rankItem->setData(Qt::UserRole, rank ? rank : 2000);
rankItem->setData(Qt::DisplayRole, rank > 0 && rank < 500000 ? QString::number(rank) : "");
Expand Down Expand Up @@ -396,7 +396,7 @@ void FortunastakeManager::updateNodeList()
QTableWidgetItem *statusItem = new QTableWidgetItem(nstatus);
QTableWidgetItem *collateralItem = new QTableWidgetItem(ncollateral);
SortedWidgetItem *nrankItem = new SortedWidgetItem();
SortedWidgetItem *payrateItem = new QTableWidgetItem(npayrate);
SortedWidgetItem *payrateItem = new SortedWidgetItem();

nrankItem->setData(Qt::UserRole, mnRank ? mnRank : 2000);
nrankItem->setData(Qt::DisplayRole, mnRank > 0 && mnRank < 500000 ? QString::number(mnRank) : "");
Expand Down
4 changes: 2 additions & 2 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
{
ui->setupUi(this);

PriceRequest();
PriceRequest();
QObject::connect(&m_nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(parseNetworkResponse(QNetworkReply*)));
connect(ui->refreshButton, SIGNAL(pressed()), this, SLOT( PriceRequest()));

Expand All @@ -138,7 +138,7 @@ void OverviewPage::PriceRequest()
getRequest(BaseURL);
getRequest(BaseURL2);
getRequest(BaseURL3);
updateDisplayUnit(); //Maybe not?
//updateDisplayUnit(); //Segfault Fix
}

void OverviewPage::getRequest( const QString &urlString )
Expand Down
Loading

0 comments on commit e8751fa

Please sign in to comment.