Merge pull request #7 from DenioD/denio

Fix path problems, change cli lib to myHush github
This commit is contained in:
Denio
2019-11-01 16:47:26 +01:00
committed by GitHub
9 changed files with 74 additions and 47 deletions

Binary file not shown.

View File

@@ -1,37 +0,0 @@
#include <windows.h>
IDI_ICON1 ICON DISCARDABLE "/home/denio/SilentDragonLite/res/icon.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "\0"
VALUE "FileVersion", "0.0.0.0\0"
VALUE "LegalCopyright", "\0"
VALUE "OriginalFilename", "Silentdragonlite.exe\0"
VALUE "ProductName", "Silentdragonlite\0"
VALUE "ProductVersion", "0.0.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
/* End of Version info */

6
lib/Cargo.lock generated
View File

@@ -1051,7 +1051,7 @@ version = "0.1.0"
dependencies = [
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=a25b4bcc5f6d576d0519a0893331a7dc1b1bf017)",
"silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=099ad194dac6ee51474b3637d357aca0665a8181)",
]
[[package]]
@@ -1467,7 +1467,7 @@ dependencies = [
[[package]]
name = "silentdragonlitelib"
version = "0.1.0"
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=a25b4bcc5f6d576d0519a0893331a7dc1b1bf017#a25b4bcc5f6d576d0519a0893331a7dc1b1bf017"
source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=099ad194dac6ee51474b3637d357aca0665a8181#099ad194dac6ee51474b3637d357aca0665a8181"
dependencies = [
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
@@ -2481,7 +2481,7 @@ dependencies = [
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=a25b4bcc5f6d576d0519a0893331a7dc1b1bf017)" = "<none>"
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=099ad194dac6ee51474b3637d357aca0665a8181)" = "<none>"
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
"checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"

View File

@@ -11,4 +11,4 @@ crate-type = ["staticlib"]
[dependencies]
libc = "0.2.58"
lazy_static = "1.4.0"
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "a25b4bcc5f6d576d0519a0893331a7dc1b1bf017" }
silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "099ad194dac6ee51474b3637d357aca0665a8181" }

62
lib/Dockerfile Normal file
View File

@@ -0,0 +1,62 @@
FROM ubuntu:16.04
LABEL Description="Ubuntu 16.04 for static Qt 5.11.2"
# Dependencies of the Qt offline installer
RUN apt-get -y update && apt-get install -y \
curl libdbus-1-3 libexpat1 \
libgl1-mesa-dev libglu1-mesa-dev libfontconfig1-dev libssl-dev \
libfreetype6 libgl1-mesa-glx libglib2.0-0 \
libx11-6 libx11-xcb1 \
g++ build-essential cmake wget git clang++-6.0 \
software-properties-common \
autoconf automake autopoint bison flex gperf libtool libtool-bin intltool lzip python ruby unzip p7zip-full libgdk-pixbuf2.0-dev libltdl-dev
# Hack to make clang work with Qt
RUN ln -s /usr/bin/clang++-6.0 /usr/bin/clang++ && \
ln -s /usr/bin/clang-6.0 /usr/bin/clang
# Get OpenSSL
RUN cd /opt && wget https://www.openssl.org/source/openssl-1.0.2r.tar.gz && \
tar xvf openssl-1.0.2r.tar.gz && \
cd openssl-1.0.2r && ./Configure linux-x86_64 && make -j$(nproc) && \
cd /opt && rm openssl-1.0.2r.tar.gz
# Get Qt5.11.2
RUN cd /opt && \
wget https://download.qt.io/archive/qt/5.11/5.11.2/single/qt-everywhere-src-5.11.2.tar.xz && \
tar xvf qt-everywhere-src-5.11.2.tar.xz && \
cd qt-everywhere-src-5.11.2 && \
OPENSSL_LIBS='-L/opt/openssl-1.0.2r -lssl -lcrypto' ./configure -static -prefix /opt/Qt/5.11.2/static -skip qtlocation -skip qtmacextras -skip qtpurchasing -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtdatavis3d -skip qtdoc -skip qtcharts -skip qtdeclarative -skip qt3d -skip qtwebengine -skip qtandroidextras -skip qtwebview -skip qtgamepad -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtwebview -skip qtwebchannel -skip qtwebglplugin -nomake examples -nomake tests -qt-zlib -qt-libpng -qt-xcb -qt-xkbcommon -feature-fontconfig -no-feature-getentropy -release -openssl-linked -platform linux-clang -opensource -confirm-license
# Run the make multiple times, because for some reason (multithreading, probably) it fails
# the first time.
RUN cd /opt/qt-everywhere-src-5.11.2 && ( make -j$(nproc) || make -j4 || make )
RUN mkdir -p /opt/Qt/5.11.2 && cd /opt/qt-everywhere-src-5.11.2 && make -j4 install
RUN cd /opt && rm qt-everywhere-src-5.11.2.tar.xz && rm -rf qt-everywhere-src-5.11.2
# Get and build MXE
RUN cd /opt && \
git clone https://github.com/mxe/mxe.git && \
cd /opt/mxe && \
make -j$(nproc) MXE_TARGETS=x86_64-w64-mingw32.static qtbase qtwebsockets
# Add rust
RUN apt install -y gcc-aarch64-linux-gnu
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.38.0 -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
RUN ~/.cargo/bin/rustup target add x86_64-pc-windows-gnu
RUN ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
# Append the linker to the cargo config for Windows cross compile
RUN echo "[target.x86_64-pc-windows-gnu]" >> ~/.cargo/config && \
echo "linker = 'x86_64-w64-mingw32.static-gcc'" >> ~/.cargo/config
RUN echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config && \
echo "linker = '/usr/bin/aarch64-linux-gnu-gcc'" >> ~/.cargo/config
ENV CC_x86_64_pc_windows_gnu="x86_64-w64-mingw32.static-gcc"
ENV CC_aarch64_unknown_linux_gnu="aarch64-linux-gnu-gcc"
ENV PATH="/opt/mxe/usr/bin:${PATH}"

View File

@@ -7,6 +7,7 @@ use std::ffi::{CStr, CString};
use std::sync::{Mutex, Arc};
use std::cell::RefCell;
use silentdragonlitelib::{commands, lightclient::{LightClient, LightClientConfig}};
// We'll use a MUTEX to store a global lightclient instance,

View File

@@ -48,6 +48,8 @@ void ConnectionLoader::doAutoConnect() {
// Initialize the library
main->logger->write(QObject::tr("Attempting to initialize library with ") + config->server);
// Check to see if there's an existing wallet
if (litelib_wallet_exists(Settings::getChainName().toStdString().c_str())) {
main->logger->write(QObject::tr("Using existing wallet."));

View File

@@ -164,8 +164,8 @@ public:
return 0;
}
QCoreApplication::setOrganizationName("myhush.org");
QCoreApplication::setApplicationName("SilentDragonLite");
QCoreApplication::setOrganizationName("Hush");
QCoreApplication::setApplicationName("Silentdragonlite");
QString locale = QLocale::system().name();
locale.truncate(locale.lastIndexOf('_')); // Get the language code

View File

@@ -36,9 +36,8 @@ MainWindow::MainWindow(QWidget *parent) :
this->slot_change_theme(theme_name);
ui->setupUi(this);
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("/home/denio/silentdragonlite/silentdragonlite-wallet.debug.log"));
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("silentdragonlite-wallet.log"));
// Status Bar
setupStatusBar();
@@ -694,7 +693,7 @@ void MainWindow::exportSeed() {
// Wire up save button
QObject::connect(pui.buttonBox->button(QDialogButtonBox::Save), &QPushButton::clicked, [=] () {
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"zcash-seed.txt");
"Hush-seed.txt");
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("Unable to open file"), file.errorString());
@@ -755,7 +754,7 @@ void MainWindow::exportKeys(QString addr) {
// Wire up save button
QObject::connect(pui.buttonBox->button(QDialogButtonBox::Save), &QPushButton::clicked, [=] () {
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
allKeys ? "zcash-all-privatekeys.txt" : "zcash-privatekey.txt");
allKeys ? "Hush-all-privatekeys.txt" : "Hush-privatekey.txt");
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("Unable to open file"), file.errorString());