fix builds
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -12,11 +12,11 @@ src/ui_*.h
|
||||
*.autosave
|
||||
src/precompiled.h.cpp
|
||||
.qmake.stash
|
||||
silentdragon
|
||||
silentdragon.app
|
||||
silentdragonlite
|
||||
silentdragonlite.app
|
||||
silentdragon-lite-mingw*
|
||||
silentdragon-lite.vcxproj*
|
||||
silentdragon.vcxproj*
|
||||
silentdragonlite.vcxproj*
|
||||
silentdragon-lite.sln
|
||||
silentdragon-lite.pro.user
|
||||
/Makefile
|
||||
@@ -37,3 +37,6 @@ IDEWorkspaceChecks.plist
|
||||
*.sln
|
||||
node_modules
|
||||
silentdragonlite.pro.user.4.10-pre1
|
||||
silentdragonlite
|
||||
silentdragonlite_plugin_import.cpp
|
||||
silentdragonlite_resource.rc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SilenDragonLite is z-Addr first, Sapling compatible wallet lightwallet for hush still in very experimental status! Use it on your own Risk!
|
||||
SilenDragonLite is z-Addr first, Sapling compatible wallet lightwallet for Hush.
|
||||
|
||||
## Compiling from source
|
||||
* silentdragon is written in C++ 14, and can be compiled with g++/clang++/visual c++.
|
||||
@@ -9,12 +9,11 @@ SilenDragonLite is z-Addr first, Sapling compatible wallet lightwallet for hush
|
||||
|
||||
```
|
||||
git clone https://github.com/DenioD/SilenDragonLite.git
|
||||
cd silentdragon
|
||||
cd silentdragonlite
|
||||
/path/to/qt5/bin/qmake silentdragon-lite.pro CONFIG+=debug
|
||||
make -j$(nproc)
|
||||
|
||||
./silentdragon
|
||||
./silentdragonlite
|
||||
```
|
||||
Right now, you'll also need to run `lightwalletd` on your local machine for silentdragon to connect to.
|
||||
|
||||
_PS: silentdragon is NOT an official wallet, and is not affiliated with the Electric Coin Company in any way._
|
||||
_PS: SilentDragonLite is NOT an official wallet, and is not affiliated with the Electric Coin Company in any way._
|
||||
|
||||
@@ -105,14 +105,6 @@ pub extern fn litelib_initialize_new_from_phrase(dangerous: bool, server: *const
|
||||
}
|
||||
};
|
||||
|
||||
let seed = match lightclient.do_seed_phrase() {
|
||||
Ok(s) => s.dump(),
|
||||
Err(e) => {
|
||||
let e_str = CString::new(format!("Error: {}", e)).unwrap();
|
||||
return e_str.into_raw();
|
||||
}
|
||||
};
|
||||
|
||||
LIGHTCLIENT.lock().unwrap().replace(Some(Arc::new(lightclient)));
|
||||
|
||||
let c_str = CString::new("OK").unwrap();
|
||||
|
||||
@@ -13,7 +13,7 @@ PRECOMPILED_HEADER = src/precompiled.h
|
||||
QT += widgets
|
||||
QT += websockets
|
||||
|
||||
TARGET = silentdragonlite
|
||||
TARGET = Silentdragonlite
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Name=silentdragon
|
||||
Comment=Full node and wallet for hush
|
||||
Name=SilentDragonLite
|
||||
Comment=Lightclient UI wallet for Hush
|
||||
GenericName=Wallet
|
||||
Exec=/usr/local/bin/silentdragon %u
|
||||
Icon=silentdragon.xpm
|
||||
Exec=/usr/local/bin/silentdragonlite %u
|
||||
Icon=silentdragonlite.xpm
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
StartupWMClass=silentdragon
|
||||
StartupWMClass=silentdragonlite
|
||||
Categories=Utility;
|
||||
MimeType=x-scheme-handler/hush;
|
||||
Keywords=silentdragon;
|
||||
Keywords=silentdragonlite;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ if [ -z $QT_STATIC ]; then
|
||||
fi
|
||||
|
||||
rm -f res/*.qm
|
||||
$QT_STATIC/bin/lrelease silentdragonlite.pro
|
||||
$QT_STATIC/bin/lrelease silentdragon-lite.pro
|
||||
|
||||
# Then update the qt base translations. First, get all languages
|
||||
ls res/*.qm | awk -F '[_.]' '{print $4}' | while read -r language ; do
|
||||
|
||||
@@ -35,21 +35,11 @@ if [ -z $QT_PATH ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ -z $hush_DIR ]; then
|
||||
echo "hush_DIR is not set. Please set it to the base directory of a compiled hushd";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ -z $APP_VERSION ]; then
|
||||
echo "APP_VERSION is not set. Please set it to the current release version of the app";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ ! -f $hush_DIR/src/hushd ]; then
|
||||
echo "Could not find compiled hushd in $hush_DIR/src/.";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if ! cat src/version.h | grep -q "$APP_VERSION"; then
|
||||
echo "Version mismatch in src/version.h"
|
||||
exit 1
|
||||
@@ -60,14 +50,14 @@ export PATH=$PATH:/usr/local/bin
|
||||
#Clean
|
||||
echo -n "Cleaning..............."
|
||||
make distclean >/dev/null 2>&1
|
||||
rm -f artifacts/macOS-silentdragon-v$APP_VERSION.dmg
|
||||
rm -f artifacts/macOS-silentdragonlite-v$APP_VERSION.dmg
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Configuring............"
|
||||
# Build
|
||||
QT_STATIC=$QT_PATH src/scripts/dotranslations.sh >/dev/null
|
||||
$QT_PATH/bin/qmake silentdragonlite.pro CONFIG+=release >/dev/null
|
||||
$QT_PATH/bin/qmake silentdragon-lite.pro CONFIG+=release >/dev/null
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
@@ -78,27 +68,17 @@ echo "[OK]"
|
||||
#Qt deploy
|
||||
echo -n "Deploying.............."
|
||||
mkdir artifacts >/dev/null 2>&1
|
||||
rm -f artifcats/silentdragon.dmg >/dev/null 2>&1
|
||||
rm -f artifcats/Silentdragonlite.dmg >/dev/null 2>&1
|
||||
rm -f artifacts/rw* >/dev/null 2>&1
|
||||
cp $hush_DIR/src/hushd silentdragon.app/Contents/MacOS/
|
||||
cp $hush_DIR/src/hush-cli silentdragon.app/Contents/MacOS/
|
||||
$QT_PATH/bin/macdeployqt silentdragon.app
|
||||
$QT_PATH/bin/macdeployqt Silentdragonlite.app
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Building dmg..........."
|
||||
mv silentdragon.app silentdragon.app
|
||||
create-dmg --volname "silentdragon-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "silentdragon.app" 200 190 --app-drop-link 600 185 --hide-extension "silentdragon.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-silentdragon-v$APP_VERSION.dmg silentdragon.app >/dev/null 2>&1
|
||||
mv silentdragonlite.app Silentdragonlite.app
|
||||
create-dmg --volname "SilentDragonLite-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "SilentDragonLite.app" 200 190 --app-drop-link 600 185 --hide-extension "SilentDragonLite.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-SilentDragonLite-v$APP_VERSION.dmg SilentDragonLite.app >/dev/null 2>&1
|
||||
|
||||
#mkdir bin/dmgbuild >/dev/null 2>&1
|
||||
#sed "s/RELEASE_VERSION/${APP_VERSION}/g" res/appdmg.json > bin/dmgbuild/appdmg.json
|
||||
#cp res/logo.icns bin/dmgbuild/
|
||||
#cp res/dmgbg.png bin/dmgbuild/
|
||||
|
||||
#cp -r silentdragon.app bin/dmgbuild/
|
||||
|
||||
#appdmg --quiet bin/dmgbuild/appdmg.json artifacts/macOS-silentdragon-v$APP_VERSION.dmg >/dev/null
|
||||
if [ ! -f artifacts/macOS-silentdragon-v$APP_VERSION.dmg ]; then
|
||||
if [ ! -f artifacts/macOS-SilentDragonLite-v$APP_VERSION.dmg ]; then
|
||||
echo "[ERROR]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -7,43 +7,9 @@ fi
|
||||
if [ -z $APP_VERSION ]; then echo "APP_VERSION is not set"; exit 1; fi
|
||||
if [ -z $PREV_VERSION ]; then echo "PREV_VERSION is not set"; exit 1; fi
|
||||
|
||||
if [ -z $hush_DIR ]; then
|
||||
echo "hush_DIR is not set. Please set it to the base directory of a hush project with built hush binaries."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ ! -f $hush_DIR/artifacts/hushd ]; then
|
||||
echo "Couldn't find hushd in $hush_DIR/artifacts/. Please build hushd."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ ! -f $hush_DIR/artifacts/hush-cli ]; then
|
||||
echo "Couldn't find hush-cli in $hush_DIR/artifacts/. Please build hushd."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Ensure that hushd is the right build
|
||||
echo -n "hushd version........."
|
||||
if grep -q "zqwMagicBean" $hush_DIR/artifacts/hushd && ! readelf -s $hush_DIR/artifacts/hushd | grep -q "GLIBC_2\.25"; then
|
||||
echo "[OK]"
|
||||
else
|
||||
echo "[ERROR]"
|
||||
echo "hushd doesn't seem to be a zqwMagicBean build or hushd is built with libc 2.25"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -n "hushd.exe version....."
|
||||
if grep -q "zqwMagicBean" $hush_DIR/artifacts/hushd.exe; then
|
||||
echo "[OK]"
|
||||
else
|
||||
echo "[ERROR]"
|
||||
echo "hushd doesn't seem to be a zqwMagicBean build"
|
||||
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" silentdragonlite.pro > /dev/null
|
||||
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" silentdragon-lite.pro > /dev/null
|
||||
|
||||
# Also update it in the README.md
|
||||
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" README.md > /dev/null
|
||||
@@ -60,21 +26,21 @@ echo "[Building on" `lsb_release -r`"]"
|
||||
|
||||
echo -n "Configuring............"
|
||||
QT_STATIC=$QT_STATIC bash src/scripts/dotranslations.sh >/dev/null
|
||||
$QT_STATIC/bin/qmake silentdragonlite.pro -spec linux-clang CONFIG+=release > /dev/null
|
||||
$QT_STATIC/bin/qmake silentdragon-lite.pro -spec linux-clang CONFIG+=release > /dev/null
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Building..............."
|
||||
rm -rf bin/silentdragonlite* > /dev/null
|
||||
rm -rf bin/silentdragon* > /dev/null
|
||||
make clean > /dev/null
|
||||
# Build the lib first
|
||||
cd lib && make release && cd ..
|
||||
make -j$(nproc) > /dev/null
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
# Test for Qt
|
||||
echo -n "Static link............"
|
||||
if [[ $(ldd silentdragon | grep -i "Qt") ]]; then
|
||||
if [[ $(ldd silentdragonlite | grep -i "Qt") ]]; then
|
||||
echo "FOUND QT; ABORT";
|
||||
exit 1
|
||||
fi
|
||||
@@ -82,27 +48,25 @@ echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Packaging.............."
|
||||
mkdir bin/silentdragon-v$APP_VERSION > /dev/null
|
||||
strip silentdragon
|
||||
mkdir bin/silentdragonlite-v$APP_VERSION > /dev/null
|
||||
strip silentdragonlite
|
||||
|
||||
cp silentdragon bin/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp $hush_DIR/artifacts/hushd bin/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp $hush_DIR/artifacts/hush-cli bin/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp README.md bin/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp LICENSE bin/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp silentdragonlite bin/silentdragonlite-v$APP_VERSION > /dev/null
|
||||
cp README.md bin/silentdragonlite-v$APP_VERSION > /dev/null
|
||||
cp LICENSE bin/silentdragonlite-v$APP_VERSION > /dev/null
|
||||
|
||||
cd bin && tar czf linux-silentdragon-v$APP_VERSION.tar.gz silentdragon-v$APP_VERSION/ > /dev/null
|
||||
cd bin && tar czf linux-silentdragonlite-v$APP_VERSION.tar.gz silentdragonlite-v$APP_VERSION/ > /dev/null
|
||||
cd ..
|
||||
|
||||
mkdir artifacts >/dev/null 2>&1
|
||||
cp bin/linux-silentdragon-v$APP_VERSION.tar.gz ./artifacts/linux-binaries-silentdragon-v$APP_VERSION.tar.gz
|
||||
cp bin/linux-silentdragonlite-v$APP_VERSION.tar.gz ./artifacts/linux-binaries-silentdragonlite-v$APP_VERSION.tar.gz
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
if [ -f artifacts/linux-binaries-silentdragon-v$APP_VERSION.tar.gz ] ; then
|
||||
if [ -f artifacts/linux-binaries-silentdragonlite-v$APP_VERSION.tar.gz ] ; then
|
||||
echo -n "Package contents......."
|
||||
# Test if the package is built OK
|
||||
if tar tf "artifacts/linux-binaries-silentdragon-v$APP_VERSION.tar.gz" | wc -l | grep -q "6"; then
|
||||
if tar tf "artifacts/linux-binaries-silentdragonlite-v$APP_VERSION.tar.gz" | wc -l | grep -q "4"; then
|
||||
echo "[OK]"
|
||||
else
|
||||
echo "[ERROR]"
|
||||
@@ -114,24 +78,23 @@ else
|
||||
fi
|
||||
|
||||
echo -n "Building deb..........."
|
||||
debdir=bin/deb/silentdragon-v$APP_VERSION
|
||||
debdir=bin/deb/silentdragonlite-v$APP_VERSION
|
||||
mkdir -p $debdir > /dev/null
|
||||
mkdir $debdir/DEBIAN
|
||||
mkdir -p $debdir/usr/local/bin
|
||||
|
||||
cat src/scripts/control | sed "s/RELEASE_VERSION/$APP_VERSION/g" > $debdir/DEBIAN/control
|
||||
|
||||
cp silentdragon $debdir/usr/local/bin/
|
||||
cp $hush_DIR/artifacts/hushd $debdir/usr/local/bin/zqw-hushd
|
||||
cp silentdragonlite $debdir/usr/local/bin/
|
||||
|
||||
mkdir -p $debdir/usr/share/pixmaps/
|
||||
cp res/silentdragon.xpm $debdir/usr/share/pixmaps/
|
||||
cp res/silentdragonlite.xpm $debdir/usr/share/pixmaps/
|
||||
|
||||
mkdir -p $debdir/usr/share/applications
|
||||
cp src/scripts/desktopentry $debdir/usr/share/applications/silentdragonlite.desktop
|
||||
|
||||
dpkg-deb --build $debdir >/dev/null
|
||||
cp $debdir.deb artifacts/linux-deb-silentdragon-v$APP_VERSION.deb
|
||||
cp $debdir.deb artifacts/linux-deb-silentdragonlite-v$APP_VERSION.deb
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
@@ -145,51 +108,40 @@ if [ -z $MXE_PATH ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
if [ ! -f $hush_DIR/artifacts/hushd.exe ]; then
|
||||
echo "Couldn't find hushd.exe in $hush_DIR/artifacts/. Please build hushd.exe"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f $hush_DIR/artifacts/hush-cli.exe ]; then
|
||||
echo "Couldn't find hush-cli.exe in $hush_DIR/artifacts/. Please build hushd.exe"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export PATH=$MXE_PATH:$PATH
|
||||
|
||||
echo -n "Configuring............"
|
||||
make clean > /dev/null
|
||||
rm -f silentdragonlite-mingw.pro
|
||||
#rm -f silentdragonlite-mingw.pro
|
||||
rm -rf release/
|
||||
#Mingw seems to have trouble with precompiled headers, so strip that option from the .pro file
|
||||
cat silentdragonlite.pro | sed "s/precompile_header/release/g" | sed "s/PRECOMPILED_HEADER.*//g" > silentdragonlite-mingw.pro
|
||||
#cat silentdragon-lite.pro | sed "s/precompile_header/release/g" | sed "s/PRECOMPILED_HEADER.*//g" > silentdragonlite-mingw.pro
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Building..............."
|
||||
x86_64-w64-mingw32.static-qmake-qt5 silentdragonlite-mingw.pro CONFIG+=release > /dev/null
|
||||
# Build the lib first
|
||||
cd lib && make winrelease && cd ..
|
||||
x86_64-w64-mingw32.static-qmake-qt5 silentdragonlite.pro CONFIG+=release > /dev/null
|
||||
make -j32 > /dev/null
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Packaging.............."
|
||||
mkdir release/silentdragon-v$APP_VERSION
|
||||
cp release/silentdragon.exe release/silentdragon-v$APP_VERSION
|
||||
cp $hush_DIR/artifacts/hushd.exe release/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp $hush_DIR/artifacts/hush-cli.exe release/silentdragon-v$APP_VERSION > /dev/null
|
||||
cp README.md release/silentdragon-v$APP_VERSION
|
||||
cp LICENSE release/silentdragon-v$APP_VERSION
|
||||
cd release && zip -r Windows-binaries-silentdragon-v$APP_VERSION.zip silentdragon-v$APP_VERSION/ > /dev/null
|
||||
mkdir release/silentdragonlite-v$APP_VERSION
|
||||
cp release/silentdragonlite.exe release/silentdragonlite-v$APP_VERSION
|
||||
cp README.md release/silentdragonlite-v$APP_VERSION
|
||||
cp LICENSE release/silentdragonlite-v$APP_VERSION
|
||||
cd release && zip -r Windows-binaries-silentdragonlite-v$APP_VERSION.zip silentdragonlite-v$APP_VERSION/ > /dev/null
|
||||
cd ..
|
||||
|
||||
mkdir artifacts >/dev/null 2>&1
|
||||
cp release/Windows-binaries-silentdragon-v$APP_VERSION.zip ./artifacts/
|
||||
cp release/Windows-binaries-silentdragonlite-v$APP_VERSION.zip ./artifacts/
|
||||
echo "[OK]"
|
||||
|
||||
if [ -f artifacts/Windows-binaries-silentdragon-v$APP_VERSION.zip ] ; then
|
||||
if [ -f artifacts/Windows-binaries-silentdragonlite-v$APP_VERSION.zip ] ; then
|
||||
echo -n "Package contents......."
|
||||
if unzip -l "artifacts/Windows-binaries-silentdragon-v$APP_VERSION.zip" | wc -l | grep -q "11"; then
|
||||
if unzip -l "artifacts/Windows-binaries-silentdragonlite-v$APP_VERSION.zip" | wc -l | grep -q "9"; then
|
||||
echo "[OK]"
|
||||
else
|
||||
echo "[ERROR]"
|
||||
|
||||
@@ -668,6 +668,9 @@ void MainWindow::sendButton() {
|
||||
d->close();
|
||||
delete connD;
|
||||
delete d;
|
||||
|
||||
// And switch to the balances tab
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
});
|
||||
|
||||
// Force a UI update so we get the unconfirmed Tx
|
||||
|
||||
Reference in New Issue
Block a user