Browse Source

Stuff

master
Duke Leto 3 years ago
parent
commit
65c2306b49
  1. 4
      lib/src/paper.rs
  2. 4
      lib/src/pdf.rs
  3. 20
      ui/mkdockerwinlinux.sh
  4. 12
      ui/papersapling.pro
  5. 4
      ui/qtlib/Cargo.toml
  6. 12
      ui/qtlib/Makefile

4
lib/src/paper.rs

@ -43,7 +43,7 @@ pub fn double_sha256(payload: &[u8]) -> Vec<u8> {
h2.to_vec() h2.to_vec()
} }
/// Parameters used to generate addresses and private keys. Look in chainparams.cpp (in zcashd/src) /// Parameters used to generate addresses and private keys. Look in chainparams.cpp in hush3.git
/// to get these values. /// to get these values.
/// Usually these will be different for testnet and for mainnet. /// Usually these will be different for testnet and for mainnet.
pub struct CoinParams { pub struct CoinParams {
@ -438,4 +438,4 @@ fn get_zaddress(seed: &[u8], index: u32) -> (String, String, String, json::JsonV
let encoded_vk = Bech32::new(params().zviewkey_prefix.into(), c_v).expect("bech32 failed").to_string(); let encoded_vk = Bech32::new(params().zviewkey_prefix.into(), c_v).expect("bech32 failed").to_string();
return (encoded, encoded_pk, encoded_vk, path); return (encoded, encoded_pk, encoded_vk, path);
} }

4
lib/src/pdf.rs

@ -16,7 +16,7 @@ use printpdf::*;
* Save the list of wallets (address + private keys) to the given PDF file name. * Save the list of wallets (address + private keys) to the given PDF file name.
*/ */
pub fn save_to_pdf(addresses: &str, filename: &str) -> Result<(), String> { pub fn save_to_pdf(addresses: &str, filename: &str) -> Result<(), String> {
let (doc, page1, layer1) = PdfDocument::new("Hush Paper Wallet", Mm(210.0), Mm(297.0), "Layer 1"); let (doc, page1, layer1) = PdfDocument::new("SilentDragonPaper Wallet", Mm(210.0), Mm(297.0), "Layer 1");
let font = doc.add_builtin_font(BuiltinFont::Courier).unwrap(); let font = doc.add_builtin_font(BuiltinFont::Courier).unwrap();
let font_bold = doc.add_builtin_font(BuiltinFont::CourierBold).unwrap(); let font_bold = doc.add_builtin_font(BuiltinFont::CourierBold).unwrap();
@ -258,4 +258,4 @@ fn split_to_max(s: &str, max: usize, blocksize: usize) -> Vec<String> {
// Add spaces // Add spaces
return ans; return ans;
} }

20
ui/mkdockerwinlinux.sh

@ -29,30 +29,30 @@ if [ -z $APP_VERSION ]; then
exit 1; exit 1;
fi fi
cd /opt/hushpaperwallet/ui cd /opt/silentdragonpaper/ui
source ~/.cargo/env source ~/.cargo/env
# We need to run qmake before we run disclean # We need to run qmake before we run disclean
/opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release /opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release
make distclean make distclean
rm -rf artifacts/linux-hushpaperwallet-v$APP_VERSION rm -rf artifacts/linux-silentdragonpaper-v$APP_VERSION
mkdir -p artifacts/linux-hushpaperwallet-v$APP_VERSION mkdir -p artifacts/linux-silentdragonpaper-v$APP_VERSION
/opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release /opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release
make -j4 make -j4
strip hushpaperwalletui strip silentdragonpaperui
cp hushpaperwalletui artifacts/linux-hushpaperwallet-v$APP_VERSION cp silentdragonpaperui artifacts/linux-silentdragonpaper-v$APP_VERSION
# Run qmake before distclean # Run qmake before distclean
/opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release /opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release
make distclean make distclean
rm -rf artifacts/Windows-hushpaperwallet-v$APP_VERSION rm -rf artifacts/Windows-silentdragonpaper-v$APP_VERSION
mkdir -p artifacts/Windows-hushpaperwallet-v$APP_VERSION mkdir -p artifacts/Windows-silentdragonpaper-v$APP_VERSION
/opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release /opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release
make -j4 make -j4
strip release/hushpaperwalletui.exe strip release/silentdragonpaperui.exe
cp release/hushpaperwalletui.exe artifacts/Windows-hushpaperwallet-v$APP_VERSION cp release/silentdragonpaperui.exe artifacts/Windows-silentdragonpaper-v$APP_VERSION
# Cleanup before exiting # Cleanup before exiting
make distclean make distclean

12
ui/papersapling.pro

@ -14,21 +14,9 @@ TEMPLATE = app
MOC_DIR = bin MOC_DIR = bin
OBJECTS_DIR = bin OBJECTS_DIR = bin
UI_DIR = src UI_DIR = src
# 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 DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++14 CONFIG += c++14
CONFIG += precompile_header CONFIG += precompile_header
PRECOMPILED_HEADER = src/precompiled.h PRECOMPILED_HEADER = src/precompiled.h

4
ui/qtlib/Cargo.toml

@ -1,7 +1,7 @@
[package] [package]
name = "qtlib" name = "qtlib"
version = "0.1.0" version = "0.1.0"
authors = ["ZecWallet"] authors = ["The Hush Developers", "ZecWallet"]
edition = "2018" edition = "2018"
[lib] [lib]
@ -10,4 +10,4 @@ crate-type = ["staticlib"]
[dependencies] [dependencies]
libc = "0.2.58" libc = "0.2.58"
silentdragonpaperlib = { path = "../../lib" } silentdragonpaperlib = { path = "../../lib" }

12
ui/qtlib/Makefile

@ -6,18 +6,18 @@ endif
all: release all: release
winrelease: target/x86_64-pc-windows-gnu/release/zecpaperrust.lib winrelease: target/x86_64-pc-windows-gnu/release/silentdragonpaper.lib
target/x86_64-pc-windows-gnu/release/zecpaperrust.lib: src/lib.rs Cargo.toml target/x86_64-pc-windows-gnu/release/silentdragonpaper.lib: src/lib.rs Cargo.toml
cargo build --lib --release --target x86_64-pc-windows-gnu cargo build --lib --release --target x86_64-pc-windows-gnu
release: target/release/zecpaperrust.$(EXT) release: target/release/silentdragonpaper.$(EXT)
debug: target/debug/zecpaperrust.$(EXT) debug: target/debug/silentdragonpaper.$(EXT)
target/release/zecpaperrust.$(EXT): src/lib.rs Cargo.toml target/release/silentdragonpaper.$(EXT): src/lib.rs Cargo.toml
cargo build --lib --release cargo build --lib --release
target/debug/zecpaperrust.$(EXT): src/lib.rs Cargo.toml target/debug/silentdragonpaper.$(EXT): src/lib.rs Cargo.toml
cargo build --lib cargo build --lib
clean: clean:

Loading…
Cancel
Save