Merge pull request #3 from fuwa0529/dev

mostly to add fdroid badge
master
fuwa 4 years ago committed by GitHub
commit 4ac82fdfbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ watch:
run:
cd cyberwow && \
flutter run --pid-file /tmp/flutter.pid
flutter run --release --pid-file /tmp/flutter.pid
# clang -target aarch64-linux-android21 cyberwow/native/hello.c -o cyberwow/native/output/hello
c:

@ -2,6 +2,9 @@
A dumb android pruned full node for Wownero.
[<img src="https://f-droid.org/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/en/packages/org.wownero.cyberwow/)
<a href='https://play.google.com/store/apps/details?id=org.wownero.cyberwow'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height='80'/></a>
## How to build

@ -33,6 +33,6 @@ const emuHost = '192.168.10.100';
const host = isEmu ? emuHost : '127.0.0.1';
const int hashLength = 12;
const int hashViewBlock = 6;
const stdoutLineBufferSize = 100;

@ -69,7 +69,9 @@ Future<dynamic> rpc(final String method, {final String field}) async {
return null;
} else {
final _body = await compute(jsonDecode, response.body);
final _result = _body['result'] ?? const {};
final _result = _body['result'];
if (_result == null) return null;
final _field = field == null ? _result : _result[field];
return _field;

@ -32,7 +32,12 @@ String pretty(dynamic x) {
;
}
String trimHash(String x) => x.substring(0, config.hashLength) + ' ...';
String trimHash(String x) =>
x.substring(0, config.hashViewBlock)
+ '-'
+ x.substring(config.hashViewBlock, config.hashViewBlock * 2)
+ ' ...';
Map<String, dynamic> cleanKey(Map<String, dynamic> x) {
final _cleaned = x.map
(

@ -305,21 +305,23 @@ class SyncedState extends HookedState {
// log.finer('SyncedState: checkSync loop');
height = await rpc.height();
connected = await daemon.isConnected();
final _getInfo = await rpc.getInfoSimple();
getInfo = cleanKey(rpcView.getInfoView(_getInfo));
getInfoCache = pretty(getInfo);
getInfo = await rpc.getInfoSimple();
final _getInfoView = cleanKey(rpcView.getInfoView(getInfo));
getInfoCache = pretty(_getInfoView);
final List<Map<String, dynamic>> _getConnections = await rpc.getConnectionsSimple();
getConnections = _getConnections
getConnections = await rpc.getConnectionsSimple();
final List<Map<String, dynamic>> _getConnectionsView =
getConnections
.map(rpcView.getConnectionView)
.map((x) => rpcView.simpleHeight(height, x))
.map(cleanKey)
.toList();
getConnectionsCache = pretty(getConnections);
getConnectionsCache = pretty(_getConnectionsView);
final List<Map<String, dynamic>> _getTransactionPool = await rpc.getTransactionPoolSimple();
getTransactionPool = _getTransactionPool.map(rpc2View.txView).map(cleanKey).toList();
getTransactionPoolCache = pretty(getTransactionPool);
getTransactionPool = await rpc.getTransactionPoolSimple();
final List<Map<String, dynamic>> _getTransactionPoolView =
getTransactionPool.map(rpc2View.txView).map(cleanKey).toList();
getTransactionPoolCache = pretty(_getTransactionPoolView);
syncState();
}

@ -36,7 +36,7 @@ Widget summary(BuildContext context, SyncedState state) {
final poolLength = state.getTransactionPool.length;
final poolLengthNotice = poolLength > 1 ? '[${poolLength}] ' : '';
final txNotice = state.getTransactionPool.isEmpty ?
'' : poolLengthNotice + state.getTransactionPool.first['id '].substring(0, 6) + ' ...';
'' : poolLengthNotice + state.getTransactionPool.first['id_hash'].substring(0, 6) + ' ...';
return Container
(

@ -37,7 +37,7 @@ build_root=$BUILD_ROOT
src_root=$BUILD_ROOT_SRC
name=boost
version=1_68_0
version=1_71_0
cd $src_root/${name}_${version}
@ -47,9 +47,6 @@ archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;
@ -73,10 +70,18 @@ for arch in ${archs[@]}; do
CC=clang \
CXX=clang++; \
./b2 \
--prefix=${PREFIX} \
--build-type=minimal \
cxxstd=14 \
toolset=clang \
threading=multi \
threadapi=pthread \
link=static \
runtime-link=static \
target-os=android \
--ignore-site-config \
--prefix=${PREFIX} \
--build-dir=android \
-sICONV_PATH=${ICONV_PATH} \
--build-type=minimal \
--with-chrono \
--with-date_time \
--with-filesystem \
@ -86,13 +91,6 @@ for arch in ${archs[@]}; do
--with-system \
--with-thread \
--with-locale \
--build-dir=android \
--stagedir=android \
toolset=clang \
threading=multi \
threadapi=pthread \
target-os=android \
-sICONV_PATH=${ICONV_PATH} \
install \
-j${NPROC} \
)

@ -36,9 +36,9 @@ source etc/scripts/build-external-libs/env.sh
cd $BUILD_ROOT_SRC
name=boost
version=1_68_0
dot_version=1.68.0
hash=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7
version=1_71_0
dot_version=1.71.0
hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
rm -rf ${name}_${version}

@ -1,69 +0,0 @@
#!/bin/bash
# Copyright (c) 2019, The Wownero Project
# Copyright (c) 2014-2019, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e
source etc/scripts/build-external-libs/env.sh
build_root=$BUILD_ROOT
src_root=$BUILD_ROOT_SRC
name=cppzmq
cd $src_root/${name}
archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;
"x86_64")
target_host=x86_64-linux-android
;;
*)
exit 16
;;
esac
# PREFIX=$build_root/build/${name}/$arch
PREFIX=$build_root/build/$arch
echo "building for ${arch}"
mkdir -p $PREFIX/include
cp *.hpp $PREFIX/include/
done
exit 0

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2019, The Wownero Project
# Copyright (c) 2014-2019, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e
source etc/scripts/build-external-libs/env.sh
cd $BUILD_ROOT_SRC
version=v4.2.3
name=cppzmq
githash=6aa3ab686e916cb0e62df7fa7d12e0b13ae9fae6
rm -rf $name
git clone https://github.com/zeromq/cppzmq.git -b $version
cd $name
test `git rev-parse HEAD` = $githash || exit 1

@ -36,7 +36,7 @@ source etc/scripts/build-external-libs/env.sh
build_root=$BUILD_ROOT
src_root=$BUILD_ROOT_SRC
version=1.15
version=1.16
name=libiconv
cd $src_root/${name}-${version}
@ -45,9 +45,6 @@ archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;

@ -35,8 +35,8 @@ source etc/scripts/build-external-libs/env.sh
cd $BUILD_ROOT_SRC
version=1.15
hash=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
version=1.16
hash=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
name=libiconv
rm -rf ${name}-${version}

@ -37,8 +37,7 @@ build_root=$BUILD_ROOT
src_root=$BUILD_ROOT_SRC
name=openssl
# version=1.0.2p
version=1.1.1c
version=1.1.1d
cd $src_root/${name}-${version}
@ -46,9 +45,6 @@ archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;

@ -36,15 +36,14 @@ source etc/scripts/build-external-libs/env.sh
cd $BUILD_ROOT_SRC
name=openssl
# version=1.0.2p
version=1.1.1c
hash=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00
version=1.1.1d
hash=1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
rm -rf ${name}-${version}
curl -# -L -O \
https://www.openssl.org/source/openssl-${version}.tar.gz
# echo "${hash} ${name}-${version}.tar.gz" | sha256sum -c
echo "${hash} ${name}-${version}.tar.gz" | sha256sum -c
tar xzf ${name}-${version}.tar.gz

@ -37,8 +37,9 @@ build_root=$BUILD_ROOT
src_root=$BUILD_ROOT_SRC
name=libsodium
version=1.0.18
cd $src_root/${name}
cd $src_root/${name}-${version}
./autogen.sh
@ -46,9 +47,6 @@ archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;

@ -36,12 +36,14 @@ source etc/scripts/build-external-libs/env.sh
cd $BUILD_ROOT_SRC
name=libsodium
version=1.0.16
githash=675149b9b8b66ff44152553fb3ebf9858128363d
version=1.0.18
hash=d59323c6b712a1519a5daf710b68f5e7fde57040845ffec53850911f10a5d4f4
rm -rf $name
rm -rf ${name}-${version}
git clone https://github.com/jedisct1/libsodium.git -b $version
curl -# -L -o ${name}-${version}.tar.gz \
https://github.com/jedisct1/libsodium/archive/${version}.tar.gz
cd $name
test `git rev-parse HEAD` = $githash || exit 1
echo "${hash} ${name}-${version}.tar.gz" | sha256sum -c
tar xzf ${name}-${version}.tar.gz

@ -1,81 +0,0 @@
#!/bin/bash
# Copyright (c) 2019, The Wownero Project
# Copyright (c) 2014-2019, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e
source etc/scripts/build-external-libs/env.sh
build_root=$BUILD_ROOT
src_root=$BUILD_ROOT_SRC
name=libzmq
cd $src_root/${name}
./autogen.sh
archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;
"x86_64")
target_host=x86_64-linux-android
;;
*)
exit 16
;;
esac
# PREFIX=$build_root/build/${name}/$arch
PREFIX=$build_root/build/$arch
echo "building for ${arch}"
(
PATH=$build_root/tool/$arch/$target_host/bin:$build_root/tool/$arch/bin:$PATH \
CC=clang \
CXX=clang++; \
./configure \
--prefix=${PREFIX} \
--host=${target_host} \
--enable-static \
--disable-shared \
&& make -j${NPROC} && make install && make clean \
)
done
exit 0

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2019, The Wownero Project
# Copyright (c) 2014-2019, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e
source etc/scripts/build-external-libs/env.sh
cd $BUILD_ROOT_SRC
version=master
name=libzmq
githash=501d0815bf2b0abb93be8214fc66519918ef6c40
rm -rf $name
git clone https://github.com/zeromq/libzmq.git -b $version
cd libzmq
git checkout $githash

@ -45,9 +45,6 @@ archs=(arm64)
for arch in ${archs[@]}; do
extra_cmake_flags=""
case ${arch} in
"arm")
target_host=arm-linux-androideabi
;;
"arm64")
target_host=aarch64-linux-android
;;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB