From 051f79733119d8a377fb65e258376fac0de4af57 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Wed, 24 Oct 2018 14:26:33 -0700 Subject: [PATCH] rename to zec-qt-wallet --- .gitignore | 6 +-- README.md | 34 ++++++------- src/about.ui | 2 +- src/main.cpp | 6 +-- src/mainwindow.cpp | 4 +- src/mainwindow.ui | 2 +- src/rpc.cpp | 12 ++--- src/scripts/mkrelease.sh | 26 +++++----- src/scripts/mkwinrelease.ps1 | 8 ++-- src/ui_about.h | 2 +- src/ui_mainwindow.h | 2 +- zcash-qt-wallet.pro | 79 ------------------------------- zcash-qt-wallet_plugin_import.cpp | 16 +++++++ 13 files changed, 65 insertions(+), 134 deletions(-) delete mode 100644 zcash-qt-wallet.pro create mode 100644 zcash-qt-wallet_plugin_import.cpp diff --git a/.gitignore b/.gitignore index 5310692..95bb44e 100644 --- a/.gitignore +++ b/.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 diff --git a/README.md b/README.md index 3b7f6e0..20d8501 100644 --- a/README.md +++ b/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._ \ No newline at end of file +_PS: zec-qt-wallet is NOT an official wallet, and is not affiliated with the Zerocoin Electric Coin Company in any way._ \ No newline at end of file diff --git a/src/about.ui b/src/about.ui index 76939af..be77506 100644 --- a/src/about.ui +++ b/src/about.ui @@ -17,7 +17,7 @@ - zcash-qt-wallet + zec-qt-wallet diff --git a/src/main.cpp b/src/main.cpp index 1c8edfe..76b6873 100644 --- a/src/main.cpp +++ b/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(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a73eb7c..2606f6d 100644 --- a/src/mainwindow.cpp +++ b/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); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f429a8f..4baf922 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -11,7 +11,7 @@ - zcash-qt-wallet + zec-qt-wallet diff --git a/src/rpc.cpp b/src/rpc.cpp index 8b46c94..5dce998 100644 --- a/src/rpc.cpp +++ b/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 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(); } else { timestamp = txidInfo["blocktime"].get(); } - - auto amount = i["amount"].get(); + auto amount = i["amount"].get(); auto confirmations = txidInfo["confirmations"].get(); TransactionItem tx{ QString("receive"), timestamp, zaddr, txid, amount, confirmations, "" }; diff --git a/src/scripts/mkrelease.sh b/src/scripts/mkrelease.sh index baa39b5..e222a7c 100755 --- a/src/scripts/mkrelease.sh +++ b/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 diff --git a/src/scripts/mkwinrelease.ps1 b/src/scripts/mkwinrelease.ps1 index 2821459..8614a50 100644 --- a/src/scripts/mkwinrelease.ps1 +++ b/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 diff --git a/src/ui_about.h b/src/ui_about.h index 9e9dbd6..4c9cd93 100644 --- a/src/ui_about.h +++ b/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", "\n" "