Merge pull request 'hush/dev pull' (#7) from hush/SilentDragonLite:dev into dev
Reviewed-on: https://git.hush.is/lucretius/SilentDragonLite/pulls/7
This commit is contained in:
@@ -66,7 +66,10 @@ Compiling can take some time, so be patient and wait for it to finish. It will t
|
||||
git clone https://git.hush.is/hush/SilentDragonLite
|
||||
cd SilentDragonLite
|
||||
./build.sh linguist
|
||||
# This defaults to using 2 cores to compile
|
||||
./build.sh
|
||||
# To use a custom number of cores to compile, such as 8 :
|
||||
# ./build.sh -j8
|
||||
./SilentDragonLite
|
||||
```
|
||||
|
||||
|
||||
23
build.sh
23
build.sh
@@ -1,19 +1,9 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2019-2024 The Hush Developers
|
||||
# Released under the GPLv3
|
||||
|
||||
UNAME=$(uname)
|
||||
|
||||
if [ "$UNAME" == "Linux" ] ; then
|
||||
JOBS=2
|
||||
elif [ "$UNAME" == "FreeBSD" ] ; then
|
||||
JOBS=$(nproc)
|
||||
elif [ "$UNAME" == "Darwin" ] ; then
|
||||
JOBS=$(sysctl -n hw.ncpu)
|
||||
else
|
||||
JOBS=1
|
||||
fi
|
||||
|
||||
# check if rustc and cargo are installed, otherwise exit with error
|
||||
if ! command -v rustc &> /dev/null
|
||||
then
|
||||
@@ -39,8 +29,8 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$(cat src/version.h |cut -d\" -f2)
|
||||
echo "Compiling SilentDragonLite $VERSION with $JOBS threads..."
|
||||
VERSION=$(grep APP_VERSION src/version.h |cut -d\" -f2)
|
||||
echo "Compiling SilentDragonLite $VERSION on $UNAME with args=$@"
|
||||
CONF=silentdragon-lite.pro
|
||||
|
||||
set -e
|
||||
@@ -48,7 +38,8 @@ qbuild () {
|
||||
qmake $CONF CONFIG+=debug
|
||||
#lupdate $CONF
|
||||
#lrelease $CONF
|
||||
make -j$JOBS
|
||||
# default to 2 jobs or use the -j value given as argument to this script
|
||||
make -j2 "$@"
|
||||
}
|
||||
|
||||
if [ "$1" == "clean" ]; then
|
||||
@@ -58,7 +49,7 @@ elif [ "$1" == "linguist" ]; then
|
||||
lrelease $CONF
|
||||
elif [ "$1" == "cleanbuild" ]; then
|
||||
make clean
|
||||
qbuild
|
||||
qbuild "$@"
|
||||
else
|
||||
qbuild
|
||||
qbuild "$@"
|
||||
fi
|
||||
|
||||
@@ -44,13 +44,15 @@ pub extern fn blake3_PW(pw: *const c_char) -> *mut c_char{
|
||||
};
|
||||
|
||||
let data = passwd.as_bytes();
|
||||
// Hash an input all at once.
|
||||
let hash1 = blake3::hash(data).to_hex();
|
||||
println!("\nBlake3 Hash: {}", hash1);
|
||||
// Hash an input all at once.
|
||||
let hash1 = blake3::hash(data).to_hex();
|
||||
// This is sensitive metadata, do not log it to stdout
|
||||
//println!("\nBlake3 Hash: {}", hash1);
|
||||
println!("\nBlake3 Hash calculated");
|
||||
|
||||
//let sttring = CString::new(hash1).unwrap();
|
||||
let e_str = CString::new(format!("{}", hash1)).unwrap();
|
||||
return e_str.into_raw();
|
||||
//let sttring = CString::new(hash1).unwrap();
|
||||
let e_str = CString::new(format!("{}", hash1)).unwrap();
|
||||
return e_str.into_raw();
|
||||
}
|
||||
|
||||
/// Create a new wallet and return the seed for the newly created wallet.
|
||||
|
||||
@@ -47,9 +47,9 @@ make clean
|
||||
|
||||
echo "Compiling libsodium $VERSION"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
make CFLAGS="-mmacosx-version-min=10.11" CPPFLAGS="-mmacosx-version-min=10.11" -j4
|
||||
make CFLAGS="-mmacosx-version-min=10.11" CPPFLAGS="-mmacosx-version-min=10.11" -j8 # "$@"
|
||||
else
|
||||
make -j8
|
||||
make -j8 # "$@"
|
||||
fi
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
|
||||
|
||||
libsodium.target = $$PWD/res/libsodium.a
|
||||
libsodium.commands = res/libsodium/buildlibsodium.sh
|
||||
libsodium.commands = res/libsodium/buildlibsodium.sh "$@"
|
||||
|
||||
unix: librust.target = $$PWD/lib/target/release/libsilentdragonlite.a
|
||||
else:win32: librust.target = $$PWD/lib/target/x86_64-pc-windows-gnu/release/silentdragonlite.lib
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
// Copyright 2019-2024 The Hush developers
|
||||
// Released under the GPLv3
|
||||
#define APP_VERSION "2.0.0"
|
||||
#define APP_VERSION "2.0.1"
|
||||
|
||||
Reference in New Issue
Block a user