Browse Source

rename to zec-qt-wallet

import_zecw
Aditya Kulkarni 6 years ago
parent
commit
051f797331
  1. 6
      .gitignore
  2. 34
      README.md
  3. 2
      src/about.ui
  4. 6
      src/main.cpp
  5. 4
      src/mainwindow.cpp
  6. 2
      src/mainwindow.ui
  7. 12
      src/rpc.cpp
  8. 26
      src/scripts/mkrelease.sh
  9. 8
      src/scripts/mkwinrelease.ps1
  10. 2
      src/ui_about.h
  11. 2
      src/ui_mainwindow.h
  12. 79
      zcash-qt-wallet.pro
  13. 16
      zcash-qt-wallet_plugin_import.cpp

6
.gitignore

@ -6,10 +6,10 @@ x64/
*.autosave
src/precompiled.h.cpp
.qmake.stash
zcash-qt-wallet
zcash-qt-wallet.*
zec-qt-wallet
zec-qt-wallet.*
Makefile
Makefile.*
qrc_application.cpp
zcash-qt-wallet_plugin_import.cpp
zec-qt-wallet_plugin_import.cpp
workspace.code-workspace

34
README.md

@ -1,30 +1,30 @@
zcash-qt-wallet is a z-Addr first, Sapling compatible wallet for zcashd that runs on Windows and Linux
zec-qt-wallet is a z-Addr first, Sapling compatible wallet for zcashd that runs on Windows and Linux
![Screenshot](docs/screenshot-main.png?raw=true)
# Installation
Head over to the releases page and grab the latest binary. https://github.com/adityapk00/zcash-qt-wallet/releases
Head over to the releases page and grab the latest binary. https://github.com/adityapk00/zec-qt-wallet/releases
### Linux
Extract and run the binary
```
tar -xvf zcash-qt-wallet-v0.2.1.tar.gz
./zcash-qt-wallet-v0.2.1/zcash-qt-wallet
tar -xvf zec-qt-wallet-v0.2.1.tar.gz
./zec-qt-wallet-v0.2.1/zec-qt-wallet
```
### Windows
Unzip the release binary and double click on zcash-qt-wallet to start.
Unzip the release binary and double click on zec-qt-wallet to start.
## Prerequisites: zcashd
zcash-qt-wallet needs a Zcash node running zcashd. Linux users should download the zcash node software
zec-qt-wallet needs a Zcash node running zcashd. Linux users should download the zcash node software
from [https://z.cash/download/](https://z.cash/download/), configure `zcash.conf`, download the parameters and start zcashd according to the [official documentation](https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html).
There is currently no official zcashd build for Windows so Windows users may either [cross-compile from source on Linux](https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html#installation) to generate the necessary zcashd executables or simply download community hosted pre-compiled executables such as those hosted by WinZEC developer [@radix42](https://github.com/radix42) at https://zcash.dl.mercerweiss.com/zcash-win-v2.0.1.zip.
Alternitavely run zcashd inside [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
For all installations zcashd needs to run with RPC enabled (`server=1`, which is the default) and with a RPC username/password set. Add the following entries into `~/.zcash/zcash.conf` for Linux or` C:\Users\your-username\AppData\Roaming\Zcash\zcash.conf` on Windows replacing the default values with a strong password. zcash-qt-wallet should detect these settings but if that fails you may edit the connection settings manually via the `File->Settings` menu.
For all installations zcashd needs to run with RPC enabled (`server=1`, which is the default) and with a RPC username/password set. Add the following entries into `~/.zcash/zcash.conf` for Linux or` C:\Users\your-username\AppData\Roaming\Zcash\zcash.conf` on Windows replacing the default values with a strong password. zec-qt-wallet should detect these settings but if that fails you may edit the connection settings manually via the `File->Settings` menu.
```
rpcuser=username
@ -44,17 +44,17 @@ https://z.cash/downloads/sprout-verifying.key
If you are running zcashd on WSL, then please set the connection parameters in the `File->Settings` menu.
## Compiling from source
zcash-qt-wallet is written in C++ 14, and can be compiled with g++/clang++/visual c++. It also depends on Qt5, which you can get from here: https://www.qt.io/download
zec-qt-wallet is written in C++ 14, and can be compiled with g++/clang++/visual c++. It also depends on Qt5, which you can get from here: https://www.qt.io/download
### Compiling on Linux
```
git clone https://github.com/adityapk00/zcash-qt-wallet.git
cd zcash-qt-wallet
/path/to/qt5/bin/qmake zcash-qt-wallet.pro CONFIG+=debug
git clone https://github.com/adityapk00/zec-qt-wallet.git
cd zec-qt-wallet
/path/to/qt5/bin/qmake zec-qt-wallet.pro CONFIG+=debug
make -j$(nproc)
./zcash-qt-wallet
./zec-qt-wallet
```
### Compiling on Windows
@ -62,21 +62,21 @@ You need Visual Studio 2017 (The free C++ Community Edition works just fine).
From the VS Tools command prompt
```
c:\Qt5\bin\qmake.exe zcash-qt-wallet.pro CONFIG+=debug
c:\Qt5\bin\qmake.exe zec-qt-wallet.pro CONFIG+=debug
nmake
debug\zcash-qt-wallet.exe
debug\zec-qt-wallet.exe
```
To create the Visual Studio project files so you can compile and run from Visual Studio:
```
c:\Qt5\bin\qmake.exe zcash-qt-wallet.pro -tp vc CONFIG+=debug
c:\Qt5\bin\qmake.exe zec-qt-wallet.pro -tp vc CONFIG+=debug
```
## Troubleshooting FAQ
### 1. "Connection Error"
Normally, zcash-qt-wallet can pick up the rpcuser/rpcpassword from zcash.conf. If it doesn't for some reason, you can set the username/password in the File->Settings menu.
Normally, zec-qt-wallet can pick up the rpcuser/rpcpassword from zcash.conf. If it doesn't for some reason, you can set the username/password in the File->Settings menu.
If you are connecting to a remote node, make sure that zcashd on the remote machine is accepting connections from your machine. The target machine's firewall needs to allow connections
from your host and also zcashd is set to be configured to accept connections from this host.
@ -91,4 +91,4 @@ The most likely cause for this is that you are trying to spend unconfirmed funds
### Support or other questions
Tweet at [@zcashqtwallet](https://twitter.com/zcashqtwallet) for help.
_PS: zcash-qt-wallet is NOT an official wallet, and is not affiliated with the Zerocoin Electric Coin Company in any way._
_PS: zec-qt-wallet is NOT an official wallet, and is not affiliated with the Zerocoin Electric Coin Company in any way._

2
src/about.ui

@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>zcash-qt-wallet</string>
<string>zec-qt-wallet</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>

6
src/main.cpp

@ -16,13 +16,13 @@ int main(int argc, char *argv[])
qApp->setFont(QFont("Ubuntu", 11, QFont::Normal, false));
#endif
QCoreApplication::setOrganizationName("zcash-qt-wallet-org");
QCoreApplication::setApplicationName("zcash-qt-wallet");
QCoreApplication::setOrganizationName("zec-qt-wallet-org");
QCoreApplication::setApplicationName("zec-qt-wallet");
Settings::init();
MainWindow w;
w.setWindowTitle("zcash-qt-wallet v" + QString(APP_VERSION));
w.setWindowTitle("zec-qt-wallet v" + QString(APP_VERSION));
w.show();
return QApplication::exec();

4
src/mainwindow.cpp

@ -32,7 +32,7 @@ MainWindow::MainWindow(QWidget *parent) :
// Set up check for updates action
QObject::connect(ui->actionCheck_for_Updates, &QAction::triggered, [=] () {
QDesktopServices::openUrl(QUrl("https://github.com/adityapk00/zcash-qt-wallet/releases"));
QDesktopServices::openUrl(QUrl("https://github.com/adityapk00/zec-qt-wallet/releases"));
});
QObject::connect(ui->actionImport_Private_Keys, &QAction::triggered, this, &MainWindow::importPrivKeys);
@ -194,7 +194,7 @@ void MainWindow::donate() {
ui->Address1->setCursorPosition(0);
ui->Amount1->setText("0.01");
ui->statusBar->showMessage("Donate 0.01 " % Utils::getTokenName() % " to support zcash-qt-wallet");
ui->statusBar->showMessage("Donate 0.01 " % Utils::getTokenName() % " to support zec-qt-wallet");
// And switch to the send tab.
ui->tabWidget->setCurrentIndex(1);

2
src/mainwindow.ui

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>zcash-qt-wallet</string>
<string>zec-qt-wallet</string>
</property>
<property name="windowIcon">
<iconset resource="../application.qrc">

12
src/rpc.cpp

@ -256,11 +256,11 @@ void RPC::handleConnectionError(const QString& error) {
error.contains("loading", Qt::CaseInsensitive)) {
explanation = QString()
% "\n\nIf you just started zcashd, then it's still loading and you might have to wait a while. If zcashd is ready, then you've run into "
% "something unexpected, and might need to file a bug report here: https://github.com/adityapk00/zcash-qt-wallet/issues";
% "something unexpected, and might need to file a bug report here: https://github.com/adityapk00/zec-qt-wallet/issues";
} else {
explanation = QString()
% "\n\nThis is most likely an internal error. Something unexpected happened. "
% "You might need to file a bug report here: https://github.com/adityapk00/zcash-qt-wallet/issues";
% "You might need to file a bug report here: https://github.com/adityapk00/zec-qt-wallet/issues";
}
msg.setText("There was a network connection error. The error was: \n\n"
@ -400,20 +400,14 @@ void RPC::refreshReceivedZTrans(QList<QString> zaddrs) {
// Lookup txid in the map
auto txidInfo = txidDetails->value(txid);
// And then find the values
if (txidInfo == nullptr) {
std::cout << zaddr.toStdString() << std::endl;
std::cout << txid.toStdString() << std::endl;
}
unsigned long timestamp;
if (txidInfo.find("time") != txidInfo.end()) {
timestamp = txidInfo["time"].get<json::number_unsigned_t>();
} else {
timestamp = txidInfo["blocktime"].get<json::number_unsigned_t>();
}
auto amount = i["amount"].get<json::number_float_t>();
auto amount = i["amount"].get<json::number_float_t>();
auto confirmations = txidInfo["confirmations"].get<json::number_unsigned_t>();
TransactionItem tx{ QString("receive"), timestamp, zaddr, txid, amount, confirmations, "" };

26
src/scripts/mkrelease.sh

@ -6,7 +6,7 @@ if [ -z $PREV_VERSION ]; then echo "PREV_VERSION is not set"; exit 1; fi
echo -n "Version files."
# Replace the version number in the .pro file so it gets picked up everywhere
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" zcash-qt-wallet.pro > /dev/null
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" zec-qt-wallet.pro > /dev/null
# Also update it in the README.md
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" README.md > /dev/null
@ -14,21 +14,21 @@ echo "[OK]"
echo -n "Configuring..."
rm -f bin/linux-zcash-qt-wallet*
rm -f bin/linux-zec-qt-wallet*
make distclean > /dev/null
$QT_STATIC/bin/qmake zcash-qt-wallet.pro -spec linux-clang CONFIG+=release > /dev/null
$QT_STATIC/bin/qmake zec-qt-wallet.pro -spec linux-clang CONFIG+=release > /dev/null
echo "[OK]"
echo -n "Building......"
rm -rf bin/zcash-qt-wallet* > /dev/null
rm -rf bin/zec-qt-wallet* > /dev/null
make -j$(nproc) > /dev/null
echo "[OK]"
# Test for Qt
echo -n "Static link..."
if [[ $(ldd zcash-qt-wallet | grep -i "Qt") ]]; then
if [[ $(ldd zec-qt-wallet | grep -i "Qt") ]]; then
echo "FOUND QT; ABORT";
exit 1
fi
@ -36,19 +36,19 @@ echo "[OK]"
echo -n "Packaging....."
mkdir bin/zcash-qt-wallet-v$APP_VERSION > /dev/null
cp zcash-qt-wallet bin/zcash-qt-wallet-v$APP_VERSION > /dev/null
cp README.md bin/zcash-qt-wallet-v$APP_VERSION > /dev/null
cp LICENSE bin/zcash-qt-wallet-v$APP_VERSION > /dev/null
cd bin && tar cvf linux-zcash-qt-wallet-v$APP_VERSION.tar.gz zcash-qt-wallet-v$APP_VERSION/ > /dev/null
mkdir bin/zec-qt-wallet-v$APP_VERSION > /dev/null
cp zec-qt-wallet bin/zec-qt-wallet-v$APP_VERSION > /dev/null
cp README.md bin/zec-qt-wallet-v$APP_VERSION > /dev/null
cp LICENSE bin/zec-qt-wallet-v$APP_VERSION > /dev/null
cd bin && tar cvf linux-zec-qt-wallet-v$APP_VERSION.tar.gz zec-qt-wallet-v$APP_VERSION/ > /dev/null
cd ..
if [ -f bin/linux-zcash-qt-wallet-v$APP_VERSION.tar.gz ] ; then
if [ -f bin/linux-zec-qt-wallet-v$APP_VERSION.tar.gz ] ; then
echo "[OK]"
echo "Done. Build is bin/linux-zcash-qt-wallet-v$APP_VERSION.tar.gz"
echo "Done. Build is bin/linux-zec-qt-wallet-v$APP_VERSION.tar.gz"
echo "Package contents:"
tar tf "bin/linux-zcash-qt-wallet-v$APP_VERSION.tar.gz"
tar tf "bin/linux-zec-qt-wallet-v$APP_VERSION.tar.gz"
else
echo "[ERROR]"
exit 1

8
src/scripts/mkwinrelease.ps1

@ -1,7 +1,7 @@
if (-not (Test-Path env:QT_DIR)) { echo "QT_DIR is not set. Please set it to the Qt directory from where you'd like to build. Usually, this is the installation directory of Qt."; exit; }
if (-not (Test-Path env:APP_VERSION)) { echo "APP_VERSION is not set. Please set it to the version you want to build, like 0.1.6"; exit; }
$target="zcash-qt-wallet-v$Env:APP_VERSION"
$target="zec-qt-wallet-v$Env:APP_VERSION"
echo "Cleaning"
nmake clean *>$null
@ -10,17 +10,17 @@ Remove-Item -Path release -Recurse | Out-Null
# Run qmake
echo "Configuring"
& "$Env:QT_DIR\bin\qmake.exe" zcash-qt-wallet.pro -spec win32-msvc "CONFIG+=release"
& "$Env:QT_DIR\bin\qmake.exe" zec-qt-wallet.pro -spec win32-msvc "CONFIG+=release"
echo "Building"
nmake *>$null
# Make a dist directory in release
New-Item release/$target -itemtype directory | Out-Null
Move-Item release/zcash-qt-wallet.exe release/$target | Out-Null
Move-Item release/zec-qt-wallet.exe release/$target | Out-Null
echo "Copying"
# No need for deploy, since we're using a static Qt5 library
& "$Env:QT_DIR\bin\windeployqt.exe" release/$target/zcash-qt-wallet.exe *>$null
& "$Env:QT_DIR\bin\windeployqt.exe" release/$target/zec-qt-wallet.exe *>$null
Copy-Item LICENSE release/$target | Out-Null
Copy-Item README.md release/$target | Out-Null

2
src/ui_about.h

@ -73,7 +73,7 @@ public:
void retranslateUi(QDialog *about)
{
about->setWindowTitle(QApplication::translate("about", "Dialog", nullptr));
groupBox->setTitle(QApplication::translate("about", "zcash-qt-wallet", nullptr));
groupBox->setTitle(QApplication::translate("about", "zec-qt-wallet", nullptr));
versionLabel->setText(QApplication::translate("about", "Version", nullptr));
textEdit->setHtml(QApplication::translate("about", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"

2
src/ui_mainwindow.h

@ -683,7 +683,7 @@ public:
void retranslateUi(QMainWindow *MainWindow)
{
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "zcash-qt-wallet", nullptr));
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "zec-qt-wallet", nullptr));
actionExit->setText(QApplication::translate("MainWindow", "Exit", nullptr));
actionAbout->setText(QApplication::translate("MainWindow", "About", nullptr));
actionSettings->setText(QApplication::translate("MainWindow", "Settings", nullptr));

79
zcash-qt-wallet.pro

@ -1,79 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2018-10-05T09:54:45
#
#-------------------------------------------------
QT += core gui network
CONFIG += precompile_header
PRECOMPILED_HEADER = src/precompiled.h
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = zcash-qt-wallet
APP_VERSION=\\\"0.2.1\\\"
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += \
QT_DEPRECATED_WARNINGS \
APP_VERSION=$$APP_VERSION
INCLUDEPATH += src/3rdparty/
RESOURCES = application.qrc
MOC_DIR = bin
OBJECTS_DIR = bin
UI_DIR = src
CONFIG += c++14
SOURCES += \
src/main.cpp \
src/mainwindow.cpp \
src/rpc.cpp \
src/balancestablemodel.cpp \
src/unspentoutput.cpp \
src/3rdparty/qrcode/BitBuffer.cpp \
src/3rdparty/qrcode/QrCode.cpp \
src/3rdparty/qrcode/QrSegment.cpp \
src/settings.cpp \
src/sendtab.cpp \
src/senttxstore.cpp \
src/txtablemodel.cpp \
src/utils.cpp
HEADERS += \
src/mainwindow.h \
src/precompiled.h \
src/rpc.h \
src/balancestablemodel.h \
src/unspentoutput.h \
src/3rdparty/qrcode/BitBuffer.hpp \
src/3rdparty/qrcode/QrCode.hpp \
src/3rdparty/qrcode/QrSegment.hpp \
src/3rdparty/json/json.hpp \
src/settings.h \
src/txtablemodel.h \
src/senttxstore.h \
src/utils.h
FORMS += \
src/mainwindow.ui \
src/settings.ui \
src/about.ui \
src/confirm.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

16
zcash-qt-wallet_plugin_import.cpp

@ -0,0 +1,16 @@
// This file is autogenerated by qmake. It imports static plugin classes for
// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
Q_IMPORT_PLUGIN(QXcbGlxIntegrationPlugin)
Q_IMPORT_PLUGIN(QGifPlugin)
Q_IMPORT_PLUGIN(QICNSPlugin)
Q_IMPORT_PLUGIN(QICOPlugin)
Q_IMPORT_PLUGIN(QJpegPlugin)
Q_IMPORT_PLUGIN(QTgaPlugin)
Q_IMPORT_PLUGIN(QTiffPlugin)
Q_IMPORT_PLUGIN(QWbmpPlugin)
Q_IMPORT_PLUGIN(QWebpPlugin)
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
Loading…
Cancel
Save