Compare commits
343 Commits
Author | SHA1 | Date |
---|---|---|
wowario | 804c7586d5 | 3 years ago |
wowario | cc0e40e6dc | 3 years ago |
wowario | f504bad5ae | 3 years ago |
wowario | fce1ee2b22 | 3 years ago |
wowario | 7f69814827 | 3 years ago |
wowario | 7918db09ec | 3 years ago |
wowario | f53fd248d6 | 4 years ago |
jw | b3b54abed6 | 4 years ago |
fuwa | d27ff15c63 | 4 years ago |
fuwa | 93e8017435 | 4 years ago |
jw | d62434b2a9 | 4 years ago |
fuwa | 7598775243 | 4 years ago |
fuwa | 77d637aaf1 | 4 years ago |
fuwa | 589e223c4a | 4 years ago |
fuwa | ffc9aceeae | 4 years ago |
fuwa | 87fd4e8bee | 4 years ago |
fuwa | e9bc70a26d | 4 years ago |
fuwa | 95a6ad7ae5 | 4 years ago |
fuwa | 44dad34fa2 | 4 years ago |
fuwa | a0557ba036 | 4 years ago |
fuwa | a598d517cd | 4 years ago |
fuwa | b845c6eee2 | 4 years ago |
fuwa | c60b82e608 | 4 years ago |
fuwa | 034baa21d2 | 4 years ago |
fuwa | a4cf3bb9de | 4 years ago |
fuwa | 00b12b09a9 | 4 years ago |
fuwa | 022ed929dc | 4 years ago |
fuwa | 4386f00f6a | 4 years ago |
fuwa | e2d90dbca9 | 4 years ago |
fuwa | 73a50151bd | 4 years ago |
jw | cc5f0a6882 | 4 years ago |
fuwa | cff517b6b0 | 4 years ago |
fuwa | 62edd0c4f9 | 4 years ago |
fuwa | b02b5f8bb3 | 4 years ago |
fuwa | c6d6f2984f | 4 years ago |
fuwa | 4e16219f61 | 4 years ago |
fuwa | 597b9bdb84 | 4 years ago |
fuwa | 54ff3cf83c | 4 years ago |
fuwa | 03cbfc78f3 | 4 years ago |
fuwa | 48b87fa11f | 4 years ago |
fuwa | 14b1d83672 | 4 years ago |
jw | 647412fb81 | 4 years ago |
fuwa | 52867a79d4 | 4 years ago |
fuwa | 4759e76b32 | 4 years ago |
fuwa | 094417ac68 | 4 years ago |
fuwa | a35249348f | 4 years ago |
fuwa | 5d850823ca | 4 years ago |
fuwa | 5f63666ab7 | 4 years ago |
fuwa | fad6080035 | 4 years ago |
fuwa | 12b41c1d54 | 4 years ago |
fuwa | 1c61f7c8d5 | 4 years ago |
fuwa | deb2d961c4 | 4 years ago |
fuwa | c31df8bf2f | 4 years ago |
fuwa | e316b7b897 | 4 years ago |
fuwa | e5b1283103 | 4 years ago |
fuwa | 54baa98ae3 | 4 years ago |
fuwa | 98ab9869aa | 4 years ago |
fuwa | c7972d63a5 | 4 years ago |
fuwa | f5f457bd65 | 4 years ago |
fuwa | ecd17336ad | 4 years ago |
fuwa | a258f7ee9e | 4 years ago |
fuwa | 7fa0c4d249 | 4 years ago |
fuwa | 329f3d996a | 4 years ago |
fuwa | bf652633f8 | 4 years ago |
fuwa | 9d52582552 | 4 years ago |
fuwa | fa4e1458e2 | 4 years ago |
fuwa | ec07428e6d | 4 years ago |
jw | 2029295743 | 4 years ago |
fuwa | be397fc05c | 4 years ago |
fuwa | 98a64ec56f | 4 years ago |
fuwa | f94eedadb4 | 4 years ago |
fuwa | a4519326c0 | 4 years ago |
fuwa | 3b552e32c4 | 4 years ago |
fuwa | d5c139defc | 4 years ago |
fuwa | e13c58568a | 4 years ago |
fuwa | 887323dde8 | 4 years ago |
fuwa | e9cbeae179 | 4 years ago |
fuwa | 994fa048be | 4 years ago |
fuwa | 2876d88397 | 4 years ago |
fuwa | 465ada7c11 | 4 years ago |
fuwa | fc6878c744 | 4 years ago |
fuwa | e0abf7307d | 4 years ago |
fuwa | 1d0ce51804 | 4 years ago |
fuwa | dd89976e58 | 4 years ago |
fuwa | 3aff8faf49 | 4 years ago |
fuwa | 37da056475 | 4 years ago |
fuwa | 40af0efa59 | 4 years ago |
fuwa | 1ec61636f5 | 4 years ago |
fuwa | 45b83773fd | 4 years ago |
fuwa | 31522e1122 | 4 years ago |
jw | 7a0098bc69 | 4 years ago |
fuwa | a1f2d56781 | 4 years ago |
fuwa | b2d84072c1 | 4 years ago |
fuwa | 39ba7dd5c9 | 4 years ago |
fuwa | a32027ef55 | 4 years ago |
fuwa | 12a09a64db | 4 years ago |
fuwa | c2bf063f81 | 4 years ago |
fuwa | 6b1353a324 | 4 years ago |
fuwa | b159990d39 | 4 years ago |
fuwa | 3062cb2d48 | 4 years ago |
fuwa | d44e87ff81 | 4 years ago |
fuwa | d5814dddde | 4 years ago |
fuwa | 516f0af04f | 4 years ago |
fuwa | e2845e8dd4 | 4 years ago |
fuwa | 49a1215ca6 | 4 years ago |
fuwa | 5d458d11be | 4 years ago |
fuwa | 9fba251031 | 4 years ago |
fuwa | 62abdb31c4 | 4 years ago |
fuwa | 511b247fdc | 4 years ago |
fuwa | 4ac82fdfbd | 4 years ago |
fuwa | 6fb11ba97a | 4 years ago |
fuwa | 3066b6ad38 | 4 years ago |
fuwa | 0d49f91fd1 | 4 years ago |
fuwa | 694bd75d61 | 4 years ago |
fuwa | 1e5ae7a5ec | 4 years ago |
fuwa | e0ab32516e | 4 years ago |
fuwa | 19af966079 | 4 years ago |
fuwa | 91ac74b8a1 | 4 years ago |
fuwa | 623d8deba6 | 4 years ago |
fuwa | e864c55d5a | 4 years ago |
fuwa | 26696672e5 | 4 years ago |
fuwa | 265a3a178b | 4 years ago |
fuwa | 4fc333ff29 | 4 years ago |
fuwa | 96df97dfd1 | 4 years ago |
fuwa | 28c3648abc | 4 years ago |
fuwa | 09a9bc4ee8 | 4 years ago |
fuwa | c5e54eade5 | 4 years ago |
fuwa | 51da881423 | 4 years ago |
fuwa | b161b54147 | 4 years ago |
fuwa | 853b1c232e | 4 years ago |
fuwa | 2f2e4d2bb1 | 4 years ago |
fuwa | 426f8d4793 | 4 years ago |
fuwa | d7129104d1 | 4 years ago |
fuwa | a60d9cefa4 | 4 years ago |
fuwa | 308030e0a8 | 4 years ago |
fuwa | ee90f3765f | 4 years ago |
fuwa | 1c83af1127 | 4 years ago |
fuwa | bb80fc8056 | 4 years ago |
fuwa | c028e7f485 | 4 years ago |
fuwa | 1b10bf21d3 | 4 years ago |
fuwa | 17809f544d | 4 years ago |
fuwa | 7626fa33f4 | 4 years ago |
fuwa | 280d988e94 | 4 years ago |
fuwa | f27c433d96 | 4 years ago |
fuwa | c81f47759c | 4 years ago |
fuwa | 557d60a7c6 | 4 years ago |
fuwa | c6e8a98610 | 4 years ago |
fuwa | 42ad22f5d3 | 4 years ago |
fuwa | fad3586d30 | 4 years ago |
fuwa | ffef77fee8 | 4 years ago |
fuwa | 7f81b822e2 | 4 years ago |
fuwa | ce0c6754cf | 4 years ago |
fuwa | a81545ed5d | 4 years ago |
fuwa | 5cc7d152c1 | 4 years ago |
fuwa | a855c44c8e | 4 years ago |
fuwa | 96e284fb83 | 4 years ago |
fuwa | ff0260a938 | 4 years ago |
fuwa | 499c65f719 | 4 years ago |
fuwa | d7b513acc3 | 4 years ago |
fuwa | ea8978a84b | 4 years ago |
fuwa | cc139a4064 | 4 years ago |
fuwa | 165158b0a4 | 4 years ago |
fuwa | 3a087dc2f7 | 4 years ago |
fuwa | 0f1ce0e00a | 4 years ago |
fuwa | 905ea67b51 | 4 years ago |
fuwa | 9c4fb36e04 | 4 years ago |
fuwa | 5ce00e281d | 4 years ago |
fuwa | 45cb813656 | 5 years ago |
fuwa | ecf0b42ba0 | 5 years ago |
fuwa | a3a21d76b0 | 5 years ago |
fuwa | c323017c7b | 5 years ago |
fuwa | 0031ce7053 | 5 years ago |
fuwa | 6535ec1d7c | 5 years ago |
fuwa | 10f37cf6fd | 5 years ago |
fuwa | 141237f4dc | 5 years ago |
fuwa | ab958d95e1 | 5 years ago |
fuwa | 1b0f7d3f51 | 5 years ago |
fuwa | 4db0006756 | 5 years ago |
fuwa | ffebcaf29c | 5 years ago |
fuwa | 646f45f54b | 5 years ago |
fuwa | 0afe7c508c | 5 years ago |
fuwa | 01eef9778c | 5 years ago |
fuwa | 704e5dbcac | 5 years ago |
fuwa | d27bc8ef68 | 5 years ago |
fuwa | 0b745dcc83 | 5 years ago |
fuwa | ad594c4f47 | 5 years ago |
fuwa | f5c6dcf431 | 5 years ago |
fuwa | e8b3c7dcaf | 5 years ago |
fuwa | 867d19cf2c | 5 years ago |
fuwa | 4c538a6a6b | 5 years ago |
fuwa | df9fd9b775 | 5 years ago |
fuwa | 5946ae5e2c | 5 years ago |
fuwa | 0343c6c04b | 5 years ago |
fuwa | fc2771ccf3 | 5 years ago |
fuwa | cfb232e9c9 | 5 years ago |
fuwa | 3784678462 | 5 years ago |
fuwa | fee66729f4 | 5 years ago |
fuwa | 0ff83713de | 5 years ago |
fuwa | c84acbc45d | 5 years ago |
fuwa | bfd16b7a96 | 5 years ago |
fuwa | 324dbd34af | 5 years ago |
fuwa | 8cd8d44497 | 5 years ago |
fuwa | 33a6db2319 | 5 years ago |
fuwa | 1d7e8d2374 | 5 years ago |
fuwa | 630c6ecc22 | 5 years ago |
fuwa | cbc6ca701c | 5 years ago |
fuwa | 9c4b3e59f4 | 5 years ago |
fuwa | a120963ac8 | 5 years ago |
fuwa | a994493199 | 5 years ago |
fuwa | 311978d863 | 5 years ago |
fuwa | 0799ecca98 | 5 years ago |
fuwa | 4f7fe77837 | 5 years ago |
fuwa | 115c31b717 | 5 years ago |
fuwa | 480cafd99f | 5 years ago |
fuwa | d9c21ec96a | 5 years ago |
fuwa | 7c4db7847b | 5 years ago |
fuwa | ec358ceee2 | 5 years ago |
fuwa | a635f8e72b | 5 years ago |
fuwa | 9dedc81012 | 5 years ago |
fuwa | 465ffc5c90 | 5 years ago |
fuwa | 628cfa07b6 | 5 years ago |
fuwa | 1331c36ac6 | 5 years ago |
fuwa | 6536d135e3 | 5 years ago |
fuwa | 65b4f0ce9b | 5 years ago |
fuwa | 1ba9f89d44 | 5 years ago |
fuwa | 038af999f9 | 5 years ago |
fuwa | 5c89911995 | 5 years ago |
fuwa | 4ab4c2bf24 | 5 years ago |
fuwa | f1c3bd3a40 | 5 years ago |
fuwa | 35710f9757 | 5 years ago |
fuwa | 37f2492518 | 5 years ago |
fuwa | 08fe7edbfb | 5 years ago |
fuwa | 0afba79021 | 5 years ago |
fuwa | ae4f2f83f4 | 5 years ago |
fuwa | cd460f6053 | 5 years ago |
fuwa | 2891890ff5 | 5 years ago |
fuwa | a6e7271117 | 5 years ago |
fuwa | 084052fd4e | 5 years ago |
fuwa | 1363bf59a4 | 5 years ago |
fuwa | 8ab975361d | 5 years ago |
fuwa | a9936fce7c | 5 years ago |
fuwa | 3874195934 | 5 years ago |
fuwa | 64b9cf4d02 | 5 years ago |
fuwa | 0999afae6e | 5 years ago |
fuwa | 7068b90b1c | 5 years ago |
fuwa | 4298f701eb | 5 years ago |
fuwa | 1ce8cd5884 | 5 years ago |
fuwa | 3d44b3a734 | 5 years ago |
fuwa | a68d49d80c | 5 years ago |
fuwa | 6c67ea9e9e | 5 years ago |
fuwa | e7f8ee17f9 | 5 years ago |
fuwa | 0b23a15642 | 5 years ago |
fuwa | 94de787125 | 5 years ago |
fuwa | 0719737967 | 5 years ago |
fuwa | db0d81a1e5 | 5 years ago |
fuwa | e6e04b412e | 5 years ago |
fuwa | feff053f09 | 5 years ago |
fuwa | 867c403029 | 5 years ago |
fuwa | ee3750ce09 | 5 years ago |
fuwa | 1b7d7b614b | 5 years ago |
fuwa | af44fc8774 | 5 years ago |
fuwa | 35a31eec35 | 5 years ago |
fuwa | 76bb010305 | 5 years ago |
fuwa | a910bd9b2b | 5 years ago |
fuwa | c237f02430 | 5 years ago |
fuwa | f0ef2210d8 | 5 years ago |
fuwa | aa0a46c31d | 5 years ago |
fuwa | 3cee0e35a7 | 5 years ago |
fuwa | 3ffa4c25cb | 5 years ago |
fuwa | 7ed76efd02 | 5 years ago |
fuwa | 79c163e88f | 5 years ago |
fuwa | a98912a03c | 5 years ago |
fuwa | b64a2d27fe | 5 years ago |
fuwa | 68d56d1f32 | 5 years ago |
fuwa | 753472bc52 | 5 years ago |
fuwa | f984bc079b | 5 years ago |
fuwa | 03c64eaa44 | 5 years ago |
fuwa | 6aca571406 | 5 years ago |
wowario | eed2ae51a3 | 5 years ago |
fuwa | d6a194ebe2 | 5 years ago |
fuwa | 7e79d33a16 | 5 years ago |
fuwa | bc164de7b6 | 5 years ago |
fuwa | cfa6b4fc24 | 5 years ago |
fuwa | 67ed39c4c3 | 5 years ago |
fuwa | c702c46d93 | 5 years ago |
fuwa | 62c5e324b6 | 5 years ago |
fuwa | cbe1027120 | 5 years ago |
fuwa | c8f9287804 | 5 years ago |
fuwa | 57d95e7594 | 5 years ago |
fuwa | 855e7207e5 | 5 years ago |
fuwa | 33c4b68688 | 5 years ago |
fuwa | 2f4600896d | 5 years ago |
fuwa | adcf25386d | 5 years ago |
fuwa | f27f5914e1 | 5 years ago |
fuwa | 8a3f479bde | 5 years ago |
fuwa | a9ffc1b052 | 5 years ago |
fuwa | ad312faec8 | 5 years ago |
fuwa | bf31ea81ec | 5 years ago |
fuwa | ff7f0c266e | 5 years ago |
fuwa | c91f1e79fc | 5 years ago |
fuwa | 31ce838193 | 5 years ago |
fuwa | 99dc55cb7e | 5 years ago |
fuwa | 33f8ba5cf6 | 5 years ago |
fuwa | 31eb3dac8e | 5 years ago |
fuwa | e95e4ee9bf | 5 years ago |
fuwa | 86dfc86289 | 5 years ago |
fuwa | 11aca7599c | 5 years ago |
fuwa | 25efd122ec | 5 years ago |
fuwa | 806c67b324 | 5 years ago |
fuwa | 82c532dfb7 | 5 years ago |
fuwa | e099dbc72e | 5 years ago |
fuwa | 0dcf63493c | 5 years ago |
fuwa | 4d4b06c14a | 5 years ago |
fuwa | c90ac5cc38 | 5 years ago |
fuwa | ce5fe1893d | 5 years ago |
fuwa | 143e2c3c88 | 5 years ago |
fuwa | 905aecb6f2 | 5 years ago |
fuwa | 351cb1f945 | 5 years ago |
fuwa | 6f79a8b010 | 5 years ago |
fuwa | ac7168dee2 | 5 years ago |
fuwa | 7f153045da | 5 years ago |
fuwa | 5796c86ed0 | 5 years ago |
fuwa | a4deb38455 | 5 years ago |
fuwa | 57cc908e6e | 5 years ago |
fuwa | c89f9fd6d7 | 5 years ago |
fuwa | cf10f6c027 | 5 years ago |
fuwa | 484018beda | 5 years ago |
fuwa | 07d8a55924 | 5 years ago |
fuwa | 991f3dc186 | 5 years ago |
fuwa | 8b3587f44d | 5 years ago |
fuwa | 026262ed32 | 5 years ago |
fuwa | 68a4dc5052 | 5 years ago |
fuwa | f7ab0117fd | 5 years ago |
fuwa | f0533dcd4e | 5 years ago |
fuwa | cd039de7e6 | 5 years ago |
fuwa | 100cc43f4c | 5 years ago |
fuwa | 5a77c137a2 | 5 years ago |
fuwa | b102c118d8 | 5 years ago |
fuwa | 7b9fa6105a | 5 years ago |
fuwa | 28c7e27d2a | 5 years ago |
fuwa | 7f9fbb4d91 | 5 years ago |
fuwa | b6643ac1d3 | 5 years ago |
fuwa | 1d673bdffb | 5 years ago |
@ -1,24 +1,112 @@
|
||||
# Copyright (c) 2019, The Wownero 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.
|
||||
|
||||
|
||||
.PHONY: toolchain clean
|
||||
|
||||
clean:
|
||||
-rm -f ./cyberwow/android/app/src/main/jniLibs/arm64-v8a/*.so
|
||||
cd cyberwow && \
|
||||
flutter clean
|
||||
|
||||
watch:
|
||||
find cyberwow/lib/ -name '*.dart' | \
|
||||
entr kill -USR1 `cat /tmp/flutter.pid`
|
||||
|
||||
watch-build:
|
||||
find cyberwow/lib/ -name '*.dart' | \
|
||||
entr $(MAKE) build-debug
|
||||
|
||||
run:
|
||||
cd cyberwow && \
|
||||
flutter run --pid-file /tmp/flutter.pid
|
||||
flutter run --debug --pid-file /tmp/flutter.pid
|
||||
|
||||
# clang -target aarch64-linux-android21 cyberwow/native/hello.c -o cyberwow/native/output/hello
|
||||
c:
|
||||
clang -target x86_64-linux-android21 cyberwow/native/hello.c -o cyberwow/native/output/hello
|
||||
run-release:
|
||||
cd cyberwow && \
|
||||
flutter run --release --pid-file /tmp/flutter.pid
|
||||
|
||||
push:
|
||||
adb push cyberwow/native/output/hello /data/local/tmp
|
||||
build:
|
||||
cd cyberwow && \
|
||||
flutter build apk --target-platform android-arm64
|
||||
|
||||
test-android:
|
||||
adb shell /data/local/tmp/hello
|
||||
build-bundle:
|
||||
cd cyberwow && \
|
||||
flutter build appbundle --target-platform android-arm64
|
||||
|
||||
test-c: c push test-android
|
||||
build-debug:
|
||||
cd cyberwow && \
|
||||
flutter build appbundle --debug --target-platform android-arm64
|
||||
|
||||
build:
|
||||
install: build
|
||||
cd cyberwow && \
|
||||
flutter build apk --target-platform android-arm64
|
||||
flutter install
|
||||
|
||||
# build wownero android binary
|
||||
|
||||
script := etc/scripts/build-external-libs
|
||||
|
||||
wow: clean-external-libs collect-wownero build
|
||||
|
||||
clean-external-libs:
|
||||
$(script)/clean.sh
|
||||
|
||||
toolchain:
|
||||
$(script)/toolchain/import.sh
|
||||
|
||||
iconv: toolchain
|
||||
$(script)/iconv/fetch.sh
|
||||
$(script)/iconv/build.sh
|
||||
|
||||
boost: iconv
|
||||
$(script)/boost/fetch.sh
|
||||
$(script)/boost/build.sh
|
||||
|
||||
openssl: toolchain
|
||||
$(script)/openssl/fetch.sh
|
||||
$(script)/openssl/build.sh
|
||||
|
||||
sodium: toolchain
|
||||
$(script)/sodium/fetch.sh
|
||||
$(script)/sodium/build.sh
|
||||
|
||||
toolchain-wow:
|
||||
$(script)/toolchain-wow/import.sh
|
||||
$(script)/toolchain-wow/patch.sh
|
||||
|
||||
wownero: openssl boost sodium toolchain-wow
|
||||
$(script)/wownero/fetch.sh
|
||||
$(script)/wownero/build.sh
|
||||
|
||||
collect-wownero: wownero
|
||||
$(script)/collect.sh
|
||||
|
||||
# etc
|
||||
|
||||
remove-exif:
|
||||
exiftool -all= `find fastlane/ -name '*.jp*g' -o -name '*.png'`
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
# CyberWOW
|
||||
# CyberWOW Mobile Node
|
||||
|
||||
A dumb android full node for Wownero.
|
||||
archived
|
||||
|
@ -0,0 +1,7 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
@ -1,13 +0,0 @@
|
||||
package org.wownero.cyberwow;
|
||||
|
||||
import android.os.Bundle;
|
||||
import io.flutter.app.FlutterActivity;
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant;
|
||||
|
||||
public class MainActivity extends FlutterActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
GeneratedPluginRegistrant.registerWith(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package org.wownero.cyberwow
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
import io.flutter.plugin.common.ActivityLifecycleListener
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
private val CHANNEL = "send-intent"
|
||||
private var initialIntentText:String = ""
|
||||
private var initialIntentSet = false
|
||||
private var _channel: MethodChannel? = null;
|
||||
|
||||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
|
||||
val channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL);
|
||||
_channel = channel;
|
||||
|
||||
channel.setMethodCallHandler{
|
||||
call, result ->
|
||||
if (call.method == "getInitialIntent") {
|
||||
result.success(initialIntentText)
|
||||
} else if (call.method == "getBinaryDir") {
|
||||
result.success(getApplicationInfo().nativeLibraryDir)
|
||||
} else {
|
||||
result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val intent = getIntent()
|
||||
checkIntent(intent)
|
||||
initialIntentSet = true
|
||||
}
|
||||
|
||||
internal fun handleSendText(intent:Intent) {
|
||||
val text:String? = intent.getStringExtra(Intent.EXTRA_TEXT)
|
||||
if (initialIntentSet == false) {
|
||||
initialIntentText = text ?: "";
|
||||
}
|
||||
}
|
||||
|
||||
internal fun checkIntent(intent: Intent) {
|
||||
val _action = intent.getAction()
|
||||
// Log.i("Main", "action: " + action)
|
||||
|
||||
if (Intent.ACTION_SEND.equals(_action)) {
|
||||
val _type = intent.getType()
|
||||
// Log.i("Main", "type: " + type)
|
||||
|
||||
if (_type == "text/plain") {
|
||||
handleSendText(intent) // Handle text being sent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.enableR8=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
#Tue Dec 24 05:26:22 UTC 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
|
||||
|
After Width: | Height: | Size: 1.6 MiB |
@ -0,0 +1,93 @@
|
||||
Copyright 2011, The VT323 Project Authors (peter.hull@oikoi.com)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
@ -1,506 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
|
||||
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
|
||||
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B80C3931E831B6300D905FE /* App.framework */,
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
|
||||
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
97C146F11CF9000F007C117D /* Supporting Files */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F11CF9000F007C117D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146F21CF9000F007C117D /* main.m */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0910;
|
||||
ORGANIZATIONNAME = "The Chromium Authors";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
|
||||
97C146F31CF9000F007C117D /* main.m in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = S8QB4VV633;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.cyberwow;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.cyberwow;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.cyberwow;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0910"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,6 +0,0 @@
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : FlutterAppDelegate
|
||||
|
||||
@end
|
@ -1,13 +0,0 @@
|
||||
#include "AppDelegate.h"
|
||||
#include "GeneratedPluginRegistrant.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
[GeneratedPluginRegistrant registerWithRegistry:self];
|
||||
// Override point for customization after application launch.
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
|
||||
@end
|
@ -1,122 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
@ -1,5 +0,0 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>cyberwow</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,9 +0,0 @@
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'prototype.dart';
|
||||
|
||||
const crtGreen = Color.fromRGBO(0, 255, 102, 1);
|
||||
|
||||
final _theme = ThemeData
|
||||
(
|
||||
brightness: Brightness.dark,
|
||||
|
||||
primaryColor: crtGreen,
|
||||
hintColor: Colors.yellow,
|
||||
accentColor: crtGreen,
|
||||
cursorColor: crtGreen,
|
||||
|
||||
backgroundColor: Colors.black,
|
||||
scaffoldBackgroundColor: Colors.black,
|
||||
|
||||
textTheme: TextTheme
|
||||
(
|
||||
display1: TextStyle
|
||||
(
|
||||
fontFamily: 'RobotoMono',
|
||||
fontSize: 35,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
display2: TextStyle
|
||||
(
|
||||
fontFamily: 'RobotoMono',
|
||||
fontSize: 22,
|
||||
),
|
||||
title: TextStyle
|
||||
(
|
||||
fontFamily: 'VT323',
|
||||
fontSize: 22,
|
||||
),
|
||||
subhead: TextStyle
|
||||
(
|
||||
fontFamily: 'RobotoMono',
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
body1: TextStyle
|
||||
(
|
||||
fontFamily: 'VT323',
|
||||
fontSize: 17,
|
||||
height: 1,
|
||||
),
|
||||
body2: TextStyle
|
||||
(
|
||||
fontFamily: 'RobotoMono',
|
||||
fontSize: 12.5,
|
||||
),
|
||||
).apply
|
||||
(
|
||||
bodyColor: crtGreen,
|
||||
displayColor: crtGreen,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
final config = CryptoConfig
|
||||
(
|
||||
'libwownerod.so',
|
||||
'wownerod',
|
||||
'You ever danced with the devil in the pale moonlight?',
|
||||
70,
|
||||
_theme,
|
||||
34568,
|
||||
[
|
||||
'--prune-blockchain',
|
||||
'--max-concurrency=1',
|
||||
'--fast-block-sync=1',
|
||||
'--block-sync-size=5',
|
||||
'--no-igd',
|
||||
'--check-updates=disabled',
|
||||
'--disable-dns-checkpoints',
|
||||
'--log-file=/dev/null',
|
||||
'--max-log-file-size=0',
|
||||
'--p2p-use-ipv6',
|
||||
],
|
||||
'[1337@cyberwow]: ',
|
||||
6,
|
||||
);
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CryptoConfig {
|
||||
final String outputBin;
|
||||
final String appPath;
|
||||
final String splash;
|
||||
final int splashDelay;
|
||||
final ThemeData theme;
|
||||
final int port;
|
||||
final List<String> extraArgs;
|
||||
final String promptString;
|
||||
final int hashViewBlockLength;
|
||||
const CryptoConfig
|
||||
(
|
||||
this.outputBin,
|
||||
this.appPath,
|
||||
this.splash,
|
||||
this.splashDelay,
|
||||
this.theme,
|
||||
this.port,
|
||||
this.extraArgs,
|
||||
this.promptString,
|
||||
this.hashViewBlockLength,
|
||||
);
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'helper.dart';
|
||||
|
||||
Stream<String> runBinary (String name) async* {
|
||||
final newPath = await getBinaryPath(name);
|
||||
|
||||
final appDocDir = await getApplicationDocumentsDirectory();
|
||||
final appDocPath = appDocDir.path;
|
||||
const appPath = 'wownerod';
|
||||
final binDir = new Directory(appDocDir.path + "/" + appPath);
|
||||
|
||||
await binDir.create();
|
||||
|
||||
// print('binDir: ' + binDir.path);
|
||||
const debugArgs =
|
||||
[
|
||||
"--add-exclusive-node",
|
||||
"192.168.10.100",
|
||||
];
|
||||
const releaseArgs =
|
||||
[
|
||||
"--restricted-rpc"
|
||||
];
|
||||
|
||||
const extraArgs = kReleaseMode ? releaseArgs : debugArgs;
|
||||
|
||||
final args =
|
||||
[
|
||||
"--data-dir",
|
||||
binDir.path,
|
||||
"--non-interactive",
|
||||
] + extraArgs;
|
||||
|
||||
print('args: ' + args.toString());
|
||||
|
||||
final outputProcess = await Process.start(newPath, args);
|
||||
await for (var line in outputProcess.stdout.transform(utf8.decoder)) {
|
||||
yield line;
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'config.dart' as config;
|
||||
|
||||
String pretty(dynamic x) {
|
||||
final JsonEncoder encoder = JsonEncoder.withIndent('');
|
||||
return encoder.convert(x)
|
||||
.replaceAll(RegExp(r'^{'), '\n')
|
||||
.replaceAll(RegExp(r'(["\[\],{}]|: )'), '')
|
||||
;
|
||||
}
|
||||
|
||||
String trimHash(String x) {
|
||||
final l = config.c.hashViewBlockLength;
|
||||
return x.substring(0, l) + '-' + x.substring(l, l * 2) + ' ...';
|
||||
}
|
||||
|
||||
Map<String, dynamic> cleanKey(Map<String, dynamic> x) {
|
||||
final _cleaned = x.map
|
||||
(
|
||||
(k, v) => MapEntry
|
||||
(
|
||||
k
|
||||
.replaceAll('cumulative', 'Σ')
|
||||
.replaceAll('current_', '')
|
||||
.replaceAll('_', ' ')
|
||||
,
|
||||
v
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
final int _maxLength = _cleaned.keys.map((x) => x.length).reduce(max);
|
||||
final _padded = _cleaned.map
|
||||
(
|
||||
(k, v) => MapEntry(k.padRight(_maxLength + 2, ' '), v)
|
||||
);
|
||||
|
||||
return _padded;
|
||||
}
|
||||
|
||||
int asInt(dynamic x) => x?.toInt() ?? 0;
|
||||
|
||||
bool asBool(dynamic x) => x ?? false;
|
||||
|
||||
List<dynamic> asList(dynamic x) => x ?? [];
|
||||
List<Map<String, dynamic>> asJsonArray(dynamic x) => x?.cast<Map<String, dynamic>>() ?? [];
|
||||
|
||||
Map<String, dynamic> asMap(dynamic x) => x ?? {};
|
||||
|
||||
Future<void> tick() async => await Future.delayed(const Duration(seconds: 1));
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
final Logger log = Logger('Default');
|
@ -0,0 +1,101 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import '../../../config.dart' as config;
|
||||
import '../../../logging.dart';
|
||||
import '../../sensor/helper.dart' as helper;
|
||||
|
||||
typedef ShouldExit = bool Function();
|
||||
|
||||
Stream<String> runBinary
|
||||
(
|
||||
final String name,
|
||||
{ final Stream<String> input,
|
||||
final ShouldExit shouldExit,
|
||||
final List<String> userArgs = const [],
|
||||
}
|
||||
) async* {
|
||||
final binPath = await helper.getBinaryPath(name);
|
||||
|
||||
final appDocDir = await getApplicationDocumentsDirectory();
|
||||
final appDocPath = appDocDir.path;
|
||||
final binDir = Directory(appDocDir.path + "/" + config.c.appPath);
|
||||
|
||||
await binDir.create();
|
||||
|
||||
// print('binDir: ' + binDir.path);
|
||||
const List<String> debugArgs =
|
||||
[
|
||||
];
|
||||
const List<String> releaseArgs =
|
||||
[
|
||||
];
|
||||
|
||||
const extraArgs = kReleaseMode ? releaseArgs : debugArgs;
|
||||
|
||||
final args =
|
||||
[
|
||||
"--data-dir",
|
||||
binDir.path,
|
||||
] + extraArgs + config.c.extraArgs + userArgs;
|
||||
|
||||
log.info('args: ' + args.toString());
|
||||
|
||||
final outputProcess = await Process.start(binPath, args);
|
||||
|
||||
Future<void> printInput() async {
|
||||
await for (final line in input) {
|
||||
log.finest('process input: ' + line);
|
||||
outputProcess.stdin.writeln(line);
|
||||
outputProcess.stdin.flush();
|
||||
}
|
||||
}
|
||||
|
||||
if (input != null) {
|
||||
printInput();
|
||||
}
|
||||
|
||||
final _stdout = outputProcess.stdout
|
||||
.transform(utf8.decoder).transform(const LineSplitter());
|
||||
|
||||
await for (final line in _stdout) {
|
||||
log.finest('process output: ' + line);
|
||||
yield line;
|
||||
}
|
||||
|
||||
if (config.isEmu) return;
|
||||
|
||||
if (shouldExit != null) {
|
||||
if (!shouldExit()) {
|
||||
log.warning('process is ded');
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
log.info('Daemon exited gracefully.');
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import '../../../config.dart' as config;
|
||||
import '../../../helper.dart';
|
||||
import '../../../logging.dart';
|
||||
|
||||
Future<http.Response> rpcHTTP(final String method) async {
|
||||
final url = 'http://${config.host}:${config.c.port}/json_rpc';
|
||||
|
||||
final body = json.encode
|
||||
(
|
||||
{
|
||||
'jsonrpc': '2.0',
|
||||
'method': method,
|
||||
}
|
||||
);
|
||||
|
||||
try {
|
||||
final response = await http.post
|
||||
( url,
|
||||
body: body
|
||||
);
|
||||
return response;
|
||||
}
|
||||
catch (e) {
|
||||
log.warning(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
dynamic jsonDecode(final String responseBody) => json.decode(responseBody);
|
||||
|
||||
Future<dynamic> rpc(final String method, {final String field}) async {
|
||||
final response = await rpcHTTP(method);
|
||||
|
||||
if (response == null) return null;
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
return null;
|
||||
} else {
|
||||
final _body = await compute(jsonDecode, response.body);
|
||||
final _result = _body['result'];
|
||||
if (_result == null) return null;
|
||||
|
||||
final _field = field == null ? _result : _result[field];
|
||||
|
||||
return _field;
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> rpcString(final String method, {final String field}) async {
|
||||
final _field = await rpc(method, field: field);
|
||||
return pretty(_field);
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../../config.dart' as config;
|
||||
import '../../../helper.dart';
|
||||
import '../../../logging.dart';
|
||||
|
||||
Future<http.Response> rpc2(final String method) async {
|
||||
final url = 'http://${config.host}:${config.c.port}/${method}';
|
||||
|
||||
try {
|
||||
final response = await http.post
|
||||
( url,
|
||||
);
|
||||
return response;
|
||||
}
|
||||
catch (e) {
|
||||
log.warning(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
dynamic jsonDecode(final String responseBody) => json.decode(responseBody);
|
||||
|
||||
Future<String> rpc2String(final String method, {final String field}) async {
|
||||
final response = await rpc2(method);
|
||||
|
||||
if (response == null) return '';
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
return '';
|
||||
} else {
|
||||
final _body = await compute(jsonDecode, response.body);
|
||||
final _field = field == null ? _body: _body[field];
|
||||
|
||||
return pretty(_field);
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'rpc/rpc.dart' as rpc;
|
||||
import '../../config.dart' as config;
|
||||
import '../../logging.dart';
|
||||
|
||||
Future<bool> isConnected() async {
|
||||
final _connections = await rpc.getConnectionsSimple();
|
||||
log.finer('cyberwow: _connections: ${_connections}');
|
||||
return !_connections.isEmpty;
|
||||
}
|
||||
|
||||
Future<bool> isSynced() async {
|
||||
final _targetHeight = await rpc.targetHeight();
|
||||
final _height = await rpc.height();
|
||||
return _targetHeight >= 0 && _targetHeight <= _height && _height > config.minimumHeight;
|
||||
}
|
||||
|
||||
Future<bool> isNotSynced() async {
|
||||
final _targetHeight = await rpc.targetHeight();
|
||||
final _height = await rpc.height();
|
||||
return _targetHeight > _height;
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
|
||||
Copyright 2020 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
Wowllet is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Wowllet is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Wowllet. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../../logging.dart';
|
||||
|
||||
const _methodChannel = const MethodChannel('send-intent');
|
||||
|
||||
Future<String> getBinaryDir() async {
|
||||
final _dir = await _methodChannel.invokeMethod('getBinaryDir');
|
||||
|
||||
final _binDir = Directory(_dir);
|
||||
final _bins = _binDir.listSync(recursive: true);
|
||||
|
||||
return _dir;
|
||||
}
|
||||
|
||||
Future<String> getBinaryPath(final String name) async {
|
||||
final _binaryDir = await getBinaryDir();
|
||||
return _binaryDir + '/' + name;
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../../helper.dart';
|
||||
import '../../../logging.dart';
|
||||
import '../../interface/rpc/rpc.dart';
|
||||
|
||||
Future<http.Response> syncInfo() => rpc('sync_info');
|
||||
Future<String> syncInfoString() => rpcString('sync_info');
|
||||
|
||||
Future<int> targetHeight() => rpc('sync_info', field: 'target_height').then(asInt);
|
||||
Future<int> height() => rpc('sync_info', field: 'height').then(asInt);
|
||||
|
||||
Future<http.Response> getInfo() => rpc('get_info');
|
||||
|
||||
Future<Map<String, dynamic>> getInfoSimple() async {
|
||||
final _getInfo = await rpc('get_info').then(asMap);
|
||||
|
||||
return _getInfo;
|
||||
}
|
||||
|
||||
Future<String> getInfoString() => rpcString('get_info');
|
||||
|
||||
Future<bool> offline() => rpc('get_info', field: 'offline').then(asBool);
|
||||
|
||||
Future<int> outgoingConnectionsCount() =>
|
||||
rpc('get_info', field: 'outgoing_connections_count').then(asInt);
|
||||
Future<int> incomingConnectionsCount() =>
|
||||
rpc('get_info', field: 'incoming_connections_count').then(asInt);
|
||||
|
||||
Future<List<Map<String, dynamic>>> getConnectionsSimple() async {
|
||||
final _connections = await rpc('get_connections', field: 'connections').then(asJsonArray);
|
||||
|
||||
const minActiveTime = 8;
|
||||
final _activeConnections = _connections.where((x) => x['live_time'] > minActiveTime);
|
||||
|
||||
final _sortedConn = _activeConnections.toList()..sort
|
||||
(
|
||||
(x, y) {
|
||||
final int a = x['live_time'];
|
||||
final int b = y['live_time'];
|
||||
return a.compareTo(b);
|
||||
}
|
||||
);
|
||||
|
||||
return _sortedConn.toList();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,94 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import '../../../helper.dart';
|
||||
import '../../../config.dart' as config;
|
||||
import '../../../logging.dart';
|
||||
import '../../interface/rpc/rpc2.dart' as rpc2;
|
||||
|
||||
Future<http.Response> getTransactionPool() async => rpc2.rpc2('get_transaction_pool');
|
||||
|
||||
Map<String, String> txInOutCache = {};
|
||||
|
||||
Future<List<Map<String, dynamic>>> getTransactionPoolSimple() async {
|
||||
final response = await getTransactionPool();
|
||||
|
||||
if (response == null) return [];
|
||||
|
||||
log.finest('getTransactionPoolSimple response: ${response.body}');
|
||||
log.finest('Response status: ${response.statusCode}');
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
return [];
|
||||
} else {
|
||||
final responseBody = json.decode(response.body);
|
||||
final result = asJsonArray(responseBody['transactions']);
|
||||
final _sortedPool = result..sort
|
||||
(
|
||||
(x, y) {
|
||||
final int a = x['receive_time'];
|
||||
final int b = y['receive_time'];
|
||||
return b.compareTo(a);
|
||||
}
|
||||
);
|
||||
|
||||
final _decodedPool = await Stream.fromIterable(_sortedPool).asyncMap
|
||||
(
|
||||
(x) async {
|
||||
if (txInOutCache.length > config.maxPoolTxSize) {
|
||||
txInOutCache = {};
|
||||
}
|
||||
|
||||
final _txid = x['id_hash'];
|
||||
|
||||
if (txInOutCache[_txid] == null) {
|
||||
final String _tx_json = x['tx_json'];
|
||||
final _tx_json_decoded = await compute(jsonDecode, _tx_json);
|
||||
|
||||
final _inOut =
|
||||
{
|
||||
'vin': _tx_json_decoded['vin'].length,
|
||||
'vout': _tx_json_decoded['vout'].length,
|
||||
};
|
||||
|
||||
final _inOutString = _inOut['vin'].toString() + '/' + _inOut['vout'].toString();
|
||||
|
||||
txInOutCache[_txid] = _inOutString;
|
||||
log.fine('cached tx_json in pool for: ${_txid}');
|
||||
}
|
||||
|
||||
return {
|
||||
...x,
|
||||
...{'i/o': txInOutCache[_txid]},
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
return _decodedPool.toList();
|
||||
}
|
||||
}
|
@ -0,0 +1,230 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../../config.dart' as config;
|
||||
import '../../../helper.dart';
|
||||
|
||||
Map<String, dynamic> getConnectionView(Map<String, dynamic> x) {
|
||||
const _remove =
|
||||
[
|
||||
'address_type',
|
||||
'connection_id',
|
||||
'ip',
|
||||
'local_ip',
|
||||
'localhost',
|
||||
'peer_id',
|
||||
'port',
|
||||
'recv_count',
|
||||
'rpc_port',
|
||||
'send_count',
|
||||
'support_flags',
|
||||
|
||||
// 'avg_download',
|
||||
// 'avg_upload',
|
||||
// 'current_download',
|
||||
// 'current_upload',
|
||||
'rpc_credits_per_hash',
|
||||
'state',
|
||||
'recv_idle_time',
|
||||
'send_idle_time',
|
||||
'incoming',
|
||||
];
|
||||
|
||||
final _filteredConn = x..removeWhere
|
||||
(
|
||||
(k,v) => _remove.contains(k)
|
||||
);
|
||||
|
||||
final _formattedConn = _filteredConn.map
|
||||
(
|
||||
(k, v) {
|
||||
switch (k) {
|
||||
case 'connection_id': {
|
||||
return MapEntry(k, trimHash(v));
|
||||
}
|
||||
case 'live_time': {
|
||||
final _duration = Duration(seconds: v);
|
||||
format(Duration d) => d.toString().split('.').first.padLeft(8, "0");
|
||||
return MapEntry(k, format(_duration));
|
||||
}
|
||||
default: {
|
||||
const speedField =
|
||||
[
|
||||
'avg_download',
|
||||
'avg_upload',
|
||||
'current_download',
|
||||
'current_upload',
|
||||
];
|
||||
if (speedField.contains(k)) {
|
||||
return MapEntry(k, '${v} kB/s');
|
||||
}
|
||||
else {
|
||||
return MapEntry(k, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
final List<String> keys =
|
||||
[
|
||||
'host',
|
||||
'height',
|
||||
'live_time',
|
||||
'current_download',
|
||||
'current_upload',
|
||||
'avg_download',
|
||||
'avg_upload',
|
||||
'pruning_seed',
|
||||
]
|
||||
.where((k) => _formattedConn.keys.contains(k))
|
||||
.toList();
|
||||
|
||||
final _sortedConn = {
|
||||
for (final k in keys) k: _formattedConn[k]
|
||||
};
|
||||
|
||||
final _cleanedUpConn = _sortedConn..removeWhere
|
||||
(
|
||||
(k,v) => k == 'pruning_seed' && x[k] == 0
|
||||
);
|
||||
|
||||
return _cleanedUpConn;
|
||||
}
|
||||
|
||||
Map<String, dynamic> simpleHeight(int height, Map<String, dynamic> x) {
|
||||
return x.map
|
||||
(
|
||||
(k, v) {
|
||||
if (k == 'height') {
|
||||
if (v == 0) {
|
||||
return MapEntry(k, '☠');
|
||||
}
|
||||
|
||||
else if (v < height) {
|
||||
return MapEntry(k, '-${height - v}');
|
||||
}
|
||||
|
||||
else if (v == height) {
|
||||
return MapEntry(k, '✓');
|
||||
}
|
||||
|
||||
else {
|
||||
return MapEntry(k, '+${v - height}');
|
||||
}
|
||||
}
|
||||
else {
|
||||
return MapEntry(k, v);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> getInfoView(Map<String, dynamic> x) {
|
||||
const _remove =
|
||||
[
|
||||
'difficulty_top64',
|
||||
'stagenet',
|
||||
'testnet',
|
||||
'top_hash',
|
||||
'update_available',
|
||||
'was_bootstrap_ever_used',
|
||||
'bootstrap_daemon_address',
|
||||
'height_without_bootstrap',
|
||||
'wide_cumulative_difficulty',
|
||||
'wide_difficulty',
|
||||
'cumulative_difficulty_top64',
|
||||
'credits',
|
||||
];
|
||||
|
||||
final _filteredInfo = x..removeWhere
|
||||
(
|
||||
(k,v) => _remove.contains(k)
|
||||
);
|
||||
|
||||
final int _difficulty = _filteredInfo['difficulty'] ?? 0;
|
||||
final Map<String, double> _hashRate = {'hash_rate': _difficulty / 300};
|
||||
final Map<String, dynamic> _ammendedInfo = {
|
||||
..._filteredInfo,
|
||||
..._hashRate,
|
||||
};
|
||||
|
||||
final _formattedInfo = _ammendedInfo.map
|
||||
(
|
||||
(k, v) {
|
||||
switch (k) {
|
||||
case 'top_block_hash': {
|
||||
return MapEntry(k, trimHash(v));
|
||||
}
|
||||
case 'start_time': {
|
||||
final _receive_time = DateTime.fromMillisecondsSinceEpoch(v * 1000);
|
||||
final _diff = DateTime.now().difference(_receive_time);
|
||||
|
||||
format(Duration d) => d.toString().split('.').first.padLeft(8, "0");
|
||||
return MapEntry('uptime', format(_diff));
|
||||
}
|
||||
default: {
|
||||
const sizeField =
|
||||
[
|
||||
'block_size_limit',
|
||||
'block_size_median',
|
||||
'block_weight_limit',
|
||||
'block_weight_median',
|
||||
'difficulty',
|
||||
'tx_count',
|
||||
'cumulative_difficulty',
|
||||
'free_space',
|
||||
'database_size',
|
||||
'hash_rate',
|
||||
];
|
||||
if (sizeField.contains(k)) {
|
||||
final formatter = NumberFormat.compact();
|
||||
return MapEntry(k, formatter.format(v));
|
||||
}
|
||||
else {
|
||||
return MapEntry(k, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
final _cleanedUpInfo = _formattedInfo.map
|
||||
(
|
||||
(k, v) {
|
||||
if (k.contains('_count') && k != 'tx_count') {
|
||||
return MapEntry(k.replaceAll('_count', ''), v);
|
||||
}
|
||||
|
||||
else {
|
||||
return MapEntry(k, v);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
final _sortedInfo = {
|
||||
for (final k in _cleanedUpInfo.keys.toList()..sort()) k: _cleanedUpInfo[k]
|
||||
};
|
||||
|
||||
return _sortedInfo;
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../../config.dart' as config;
|
||||
import '../../../helper.dart';
|
||||
|
||||
Map<String, dynamic> txView(Map<String, dynamic> x) {
|
||||
const _remove =
|
||||
[
|
||||
'tx_blob',
|
||||
// 'tx_json',
|
||||
'last_failed_id_hash',
|
||||
'max_used_block_id_hash',
|
||||
// fields not useful for noobs
|
||||
'last_relayed_time',
|
||||
'kept_by_block',
|
||||
'double_spend_seen',
|
||||
'relayed',
|
||||
'do_not_relay',
|
||||
'last_failed_height',
|
||||
'max_used_block_height',
|
||||
'weight',
|
||||
// 'blob_size',
|
||||
];
|
||||
|
||||
final _filteredTx = x..removeWhere
|
||||
(
|
||||
(k,v) => _remove.contains(k)
|
||||
);
|
||||
|
||||
final _formattedTx = _filteredTx.map
|
||||
(
|
||||
(k, v) {
|
||||
switch (k) {
|
||||
case 'id_hash':
|
||||
return MapEntry('id', trimHash(v));
|
||||
case 'blob_size':
|
||||
return MapEntry('size', (v / 1024).toStringAsFixed(2) + ' kB');
|
||||
case 'fee': {
|
||||
final formatter = NumberFormat.currency
|
||||
(
|
||||
symbol: '',
|
||||
decimalDigits: 2,
|
||||
);
|
||||
return MapEntry(k, formatter.format(v / pow(10, 11)) + ' ⍵');
|
||||
}
|
||||
case 'receive_time': {
|
||||
final _receive_time = DateTime.fromMillisecondsSinceEpoch(v * 1000);
|
||||
final _diff = DateTime.now().difference(_receive_time);
|
||||
|
||||
format(Duration d) => d.toString().split('.').first.padLeft(8, "0");
|
||||
return MapEntry('age', format(_diff));
|
||||
}
|
||||
default:
|
||||
return MapEntry(k, v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
final List<String> keys =
|
||||
[
|
||||
'id',
|
||||
'age',
|
||||
'fee',
|
||||
'i/o',
|
||||
'size',
|
||||
]
|
||||
.where((k) => _formattedTx.keys.contains(k))
|
||||
.toList();
|
||||
|
||||
final _sortedTx = {
|
||||
for (final k in keys) k: _formattedTx[k]
|
||||
};
|
||||
|
||||
return _sortedTx;
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:collection';
|
||||
|
||||
import '../config.dart' as config;
|
||||
import '../logging.dart';
|
||||
|
||||
import 'prototype.dart';
|
||||
|
||||
class ExitingState extends AppState {
|
||||
final Queue<String> stdout;
|
||||
final Stream<String> processOutput;
|
||||
|
||||
ExitingState(appHook, this.stdout, this.processOutput) : super (appHook);
|
||||
|
||||
void append(final String msg) {
|
||||
stdout.addLast(msg);
|
||||
while (stdout.length > config.stdoutLineBufferSize) {
|
||||
stdout.removeFirst();
|
||||
}
|
||||
syncState();
|
||||
}
|
||||
|
||||
Future<void> wait() async {
|
||||
log.finer("Exiting wait");
|
||||
|
||||
Future<void> printStdout() async {
|
||||
await for (final line in processOutput) {
|
||||
log.finer('exiting: print stdout loop');
|
||||
|
||||
append(line);
|
||||
log.info(line);
|
||||
}
|
||||
}
|
||||
|
||||
await printStdout();
|
||||
|
||||
log.finer('exiting state done');
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../config.dart' as config;
|
||||
import '../logging.dart';
|
||||
import '../helper.dart';
|
||||
|
||||
import 'prototype.dart';
|
||||
import 'syncing.dart';
|
||||
|
||||
class LoadingState extends AppState {
|
||||
final String banner;
|
||||
String status = '';
|
||||
|
||||
LoadingState(appHook, this.banner) : super (appHook);
|
||||
|
||||
void append(final String msg) {
|
||||
this.status += msg;
|
||||
syncState();
|
||||
}
|
||||
|
||||
Future<SyncingState> next() async {
|
||||
Future<void> showBanner() async {
|
||||
final Iterable<String> chars = banner.runes.map((x) => String.fromCharCode(x));
|
||||
|
||||
for (final String char in chars) {
|
||||
append(char);
|
||||
await Future.delayed(Duration(milliseconds: config.c.splashDelay));
|
||||
}
|
||||
|
||||
await tick();
|
||||
await tick();
|
||||
}
|
||||
|
||||
SharedPreferences _prefs = await SharedPreferences.getInstance();
|
||||
final _bannerShown = await _prefs.getBool(config.bannerShownKey);
|
||||
|
||||
if (_bannerShown == null) {
|
||||
await showBanner();
|
||||
await _prefs.setBool(config.bannerShownKey, true);
|
||||
}
|
||||
|
||||
SyncingState _next = SyncingState(appHook);
|
||||
return moveState(_next);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
typedef SetStateFunc = void Function(AppState);
|
||||
typedef GetNotificationFunc = AppLifecycleState Function();
|
||||
typedef IsExitingFunc = bool Function();
|
||||
|
||||
class AppHook {
|
||||
final SetStateFunc setState;
|
||||
final GetNotificationFunc getNotification;
|
||||
final IsExitingFunc isExiting;
|
||||
AppHook(this.setState, this.getNotification, this.isExiting);
|
||||
}
|
||||
|
||||
class AppState {
|
||||
final AppHook appHook;
|
||||
AppState(this.appHook);
|
||||
|
||||
syncState() {
|
||||
appHook.setState(this);
|
||||
}
|
||||
|
||||
AppState moveState(AppState _next) {
|
||||
appHook.setState(_next);
|
||||
return _next;
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
|
||||
import '../logic/controller/refresh.dart' as refresh;
|
||||
import '../logic/sensor/rpc/rpc.dart' as rpc;
|
||||
import '../logic/sensor/daemon.dart' as daemon;
|
||||
import '../config.dart' as config;
|
||||
import '../logging.dart';
|
||||
|
||||
import 'prototype.dart';
|
||||
import 'synced.dart';
|
||||
import 'exiting.dart';
|
||||
|
||||
|
||||
class ReSyncingState extends AppState {
|
||||
final Queue<String> stdout;
|
||||
final StreamSink<String> processInput;
|
||||
final Stream<String> processOutput;
|
||||
final int pageIndex;
|
||||
|
||||
bool synced = false;
|
||||
|
||||
ReSyncingState(appHook, this.stdout, this.processInput, this.processOutput, this.pageIndex)
|
||||
: super (appHook);
|
||||
|
||||
void append(final String msg) {
|
||||
stdout.addLast(msg);
|
||||
while (stdout.length > config.stdoutLineBufferSize) {
|
||||
stdout.removeFirst();
|
||||
}
|
||||
syncState();
|
||||
}
|
||||
|
||||
Future<AppState> next() async {
|
||||
log.fine("ReSyncing next");
|
||||
|
||||
Future<void> printStdout() async {
|
||||
await for (final line in processOutput) {
|
||||
if (synced) break;
|
||||
// print('re-syncing: print stdout loop');
|
||||
append(line);
|
||||
log.info(line);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> checkSync() async {
|
||||
await for (final _null in refresh.pull(appHook.getNotification, 'ReSyncingState')) {
|
||||
if (appHook.isExiting()) {
|
||||
log.fine('ReSyncing state detected exiting');
|
||||
break;
|
||||
}
|
||||
|
||||
if (await daemon.isSynced()) {
|
||||
synced = true;
|
||||
break;
|
||||
}
|
||||
// print('re-syncing: checkSync loop');
|
||||
}
|
||||
}
|
||||
|
||||
printStdout();
|
||||
await checkSync();
|
||||
|
||||
if (appHook.isExiting()) {
|
||||
ExitingState _next = ExitingState
|
||||
(
|
||||
appHook, stdout, processOutput
|
||||
);
|
||||
return moveState(_next);
|
||||
}
|
||||
|
||||
log.fine('resync: await exit');
|
||||
SyncedState _next = SyncedState
|
||||
(
|
||||
appHook, stdout, processInput, processOutput, pageIndex
|
||||
);
|
||||
_next.height = await rpc.height();
|
||||
return moveState(_next);
|
||||
}
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../config.dart' as config;
|
||||
import '../logic/sensor/daemon.dart' as daemon;
|
||||
import '../logic/controller/refresh.dart' as refresh;
|
||||
import '../logic/sensor/rpc/rpc.dart' as rpc;
|
||||
import '../logic/sensor/rpc/rpc2.dart' as rpc;
|
||||
import '../logic/view/rpc/rpc2.dart' as rpc2View;
|
||||
import '../logic/view/rpc/rpc.dart' as rpcView;
|
||||
import '../helper.dart';
|
||||
import '../logging.dart';
|
||||
|
||||
import 'prototype.dart';
|
||||
import 'resyncing.dart';
|
||||
import 'exiting.dart';
|
||||
|
||||
class SyncedState extends AppState {
|
||||
final Queue<String> stdout;
|
||||
final StreamSink<String> processInput;
|
||||
final Stream<String> processOutput;
|
||||
final TextEditingController textController = TextEditingController();
|
||||
|
||||
int height;
|
||||
bool synced = true;
|
||||
bool userExit = false;
|
||||
bool connected = true;
|
||||
Map<String, dynamic> getInfo = {};
|
||||
List<Map<String, dynamic>> getConnections = [];
|
||||
List<Map<String, dynamic>> getTransactionPool = [];
|
||||
int pageIndex;
|
||||
String syncInfo = 'syncInfo';
|
||||
PageController pageController;
|
||||
|
||||
String getInfoCache = '';
|
||||
String getConnectionsCache = '';
|
||||
String getTransactionPoolCache = '';
|
||||
|
||||
SyncedState(appHook, this.stdout, this.processInput, this.processOutput, this.pageIndex)
|
||||
: super (appHook) {
|
||||
pageController = PageController( initialPage: pageIndex );
|
||||
}
|
||||
|
||||
void appendInput(final String line) {
|
||||
stdout.addLast(config.c.promptString + line);
|
||||
syncState();
|
||||
processInput.add(line);
|
||||
|
||||
if (line == 'exit') {
|
||||
userExit = true;
|
||||
}
|
||||
}
|
||||
|
||||
void append(final String msg) {
|
||||
stdout.addLast(msg);
|
||||
while (stdout.length > config.stdoutLineBufferSize) {
|
||||
stdout.removeFirst();
|
||||
}
|
||||
syncState();
|
||||
}
|
||||
|
||||
void onPageChanged(int value) {
|
||||
this.pageIndex = value;
|
||||
}
|
||||
|
||||
Future<AppState> next() async {
|
||||
log.fine("Synced next");
|
||||
|
||||
Future<void> logStdout() async {
|
||||
await for (final line in processOutput) {
|
||||
if (!synced) break;
|
||||
|
||||
// print('synced: print stdout loop');
|
||||
append(line);
|
||||
log.info(line);
|
||||
}
|
||||
}
|
||||
|
||||
logStdout();
|
||||
|
||||
Future<void> checkSync() async {
|
||||
await for (final _null in refresh.pull(appHook.getNotification, 'syncedState')) {
|
||||
if (appHook.isExiting() || userExit) {
|
||||
log.fine('Synced state detected exiting');
|
||||
break;
|
||||
}
|
||||
|
||||
if (await daemon.isNotSynced()) {
|
||||
synced = false;
|
||||
break;
|
||||
}
|
||||
// log.finer('SyncedState: checkSync loop');
|
||||
height = await rpc.height();
|
||||
connected = await daemon.isConnected();
|
||||
getInfo = await rpc.getInfoSimple();
|
||||
final _getInfoView = cleanKey(rpcView.getInfoView(getInfo));
|
||||
getInfoCache = pretty(_getInfoView);
|
||||
|
||||
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(_getConnectionsView);
|
||||
|
||||
getTransactionPool = await rpc.getTransactionPoolSimple();
|
||||
final List<Map<String, dynamic>> _getTransactionPoolView =
|
||||
getTransactionPool.map(rpc2View.txView).map(cleanKey).toList();
|
||||
getTransactionPoolCache = pretty(_getTransactionPoolView);
|
||||
|
||||
syncState();
|
||||
}
|
||||
}
|
||||
|
||||
await checkSync();
|
||||
|
||||
if (appHook.isExiting() || userExit) {
|
||||
ExitingState _next = ExitingState
|
||||
(
|
||||
appHook, stdout, processOutput
|
||||
);
|
||||
return moveState(_next);
|
||||
}
|
||||
|
||||
log.fine('synced: loop exit');
|
||||
|
||||
ReSyncingState _next = ReSyncingState
|
||||
(
|
||||
appHook, stdout, processInput, processOutput, pageIndex
|
||||
);
|
||||
return moveState(_next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,111 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
|
||||
import '../logic/sensor/rpc/rpc.dart' as rpc;
|
||||
import '../logic/sensor/daemon.dart' as daemon;
|
||||
import '../logic/controller/refresh.dart' as refresh;
|
||||
import '../config.dart' as config;
|
||||
import '../logging.dart';
|
||||
|
||||
import 'prototype.dart';
|
||||
import 'synced.dart';
|
||||
import 'exiting.dart';
|
||||
|
||||
|
||||
class SyncingState extends AppState {
|
||||
final Queue<String> stdout = Queue();
|
||||
|
||||
bool synced = false;
|
||||
|
||||
SyncingState(appHook) : super (appHook);
|
||||
|
||||
void append(final String msg) {
|
||||
stdout.addLast(msg);
|
||||
while (stdout.length > config.stdoutLineBufferSize) {
|
||||
stdout.removeFirst();
|
||||
}
|
||||
syncState();
|
||||
}
|
||||
|
||||
Future<AppState> next
|
||||
(
|
||||
StreamSink<String> processInput, Stream<String> processOutput
|
||||
) async {
|
||||
log.fine("Syncing next");
|
||||
|
||||
Future<void> printStdout() async {
|
||||
await for (final line in processOutput) {
|
||||
if (synced) break;
|
||||
log.finest('syncing: print stdout loop');
|
||||
|
||||
append(line);
|
||||
log.info(line);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> checkSync() async {
|
||||
await for (final _null in refresh.pull(appHook.getNotification, 'syncingState')) {
|
||||
log.finer('SyncingState: checkSync loop');
|
||||
|
||||
if (appHook.isExiting()) {
|
||||
log.fine('Syncing state detected exiting');
|
||||
break;
|
||||
}
|
||||
|
||||
// here doc is wrong, targetHeight could match height when synced
|
||||
// potential bug, targetHeight could be smaller then height
|
||||
final _isConnected = await daemon.isConnected();
|
||||
final _isSynced = await daemon.isSynced();
|
||||
|
||||
if (_isConnected && _isSynced) {
|
||||
synced = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printStdout();
|
||||
await checkSync();
|
||||
|
||||
if (appHook.isExiting()) {
|
||||
ExitingState _next = ExitingState
|
||||
(
|
||||
appHook, stdout, processOutput
|
||||
);
|
||||
return moveState(_next);
|
||||
}
|
||||
|
||||
log.fine('syncing: loop exit');
|
||||
|
||||
// processInput.add('exit');
|
||||
|
||||
final _height = await rpc.height();
|
||||
SyncedState _next = SyncedState
|
||||
(
|
||||
appHook, stdout, processInput, processOutput, 1,
|
||||
);
|
||||
_next.height = _height;
|
||||
return moveState(_next);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'state.dart';
|
||||
import 'widget/blank.dart' as blank;
|
||||
import 'widget/loading.dart' as loading;
|
||||
import 'widget/syncing.dart' as syncing;
|
||||
import 'widget/synced.dart' as synced;
|
||||
import 'widget/resyncing.dart' as resyncing;
|
||||
import 'widget/exiting.dart' as exiting;
|
||||
|
||||
Widget build(final BuildContext context, final AppState state) {
|
||||
switch (state.runtimeType) {
|
||||
case BlankState: return blank.build(context, state);
|
||||
case LoadingState: return loading.build(context, state);
|
||||
case SyncingState: return syncing.build(context, state);
|
||||
case SyncedState: return synced.build(context, state);
|
||||
case ReSyncingState: return resyncing.build(context, state);
|
||||
case ExitingState: return exiting.build(context, state);
|
||||
default: return Placeholder();
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../state.dart';
|
||||
import '../config.dart' as config;
|
||||
|
||||
Widget build(BuildContext context, ReSyncingState state) {
|
||||
final progressWidget =
|
||||
[
|
||||
Spacer
|
||||
(
|
||||
flex: 3,
|
||||
),
|
||||
LinearProgressIndicator(),
|
||||
Spacer
|
||||
(
|
||||
flex: 2,
|
||||
),
|
||||
Expanded
|
||||
(
|
||||
flex: 5,
|
||||
child: Text
|
||||
(
|
||||
state.stdout.last,
|
||||
style: Theme.of(context).textTheme.body1,
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
return Scaffold
|
||||
(
|
||||
body: Container
|
||||
(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column
|
||||
(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>
|
||||
[
|
||||
Spacer
|
||||
(
|
||||
flex: 10,
|
||||
),
|
||||
] +
|
||||
progressWidget +
|
||||
[
|
||||
Spacer
|
||||
(
|
||||
flex: 10,
|
||||
),
|
||||
]
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
/*
|
||||
|
||||
Copyright 2019 fuwa
|
||||
|
||||
This file is part of CyberWOW.
|
||||
|
||||
CyberWOW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CyberWOW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with CyberWOW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../state.dart';
|
||||
import '../config.dart' as config;
|
||||
|
||||
Widget build(BuildContext context, SyncingState state) {
|
||||
return Scaffold
|
||||
(
|
||||
// appBar: AppBar
|
||||
// (
|
||||
// // title: Text(widget.title),
|
||||
// title: Text('CyberWOW'),
|
||||
// ),
|
||||
body: Container
|
||||
(
|
||||
// padding: const EdgeInsets.all(10.0),
|
||||
child: Align
|
||||
(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Column
|
||||
(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>
|
||||
[
|
||||
Expanded
|
||||
(
|
||||
flex: 1,
|
||||
child: SingleChildScrollView
|
||||
(
|
||||
scrollDirection: Axis.vertical,
|
||||
reverse: true,
|
||||
child: Text
|
||||
(
|
||||
state.stdout.join('\n'),
|
||||
style: Theme.of(context).textTheme.body1,
|
||||
)
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
# fdroid vm might require a manual enabling of "I/O APIC"
|
||||
|
||||
let
|
||||
|
||||
fdroid-python-packages = python-packages: with python-packages; [
|
||||
androguard
|
||||
clint
|
||||
defusedxml
|
||||
GitPython
|
||||
libcloud
|
||||
mwclient
|
||||
paramiko
|
||||
pillow
|
||||
pyasn1
|
||||
pyasn1-modules
|
||||
python-vagrant
|
||||
pyyaml
|
||||
qrcode
|
||||
requests
|
||||
ruamel_yaml
|
||||
libvirt
|
||||
]
|
||||
|
||||
; python-with-fdroid-packages = pkgs.python3.withPackages fdroid-python-packages
|
||||
|
||||
; in
|
||||
|
||||
mkShell
|
||||
{
|
||||
buildInputs =
|
||||
[
|
||||
python-with-fdroid-packages
|
||||
]
|
||||
; }
|
@ -0,0 +1,109 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT
|
||||
src_root=$BUILD_ROOT_SRC
|
||||
|
||||
name=boost
|
||||
version=1_71_0
|
||||
|
||||
cd $src_root/${name}_${version}
|
||||
|
||||
./bootstrap.sh
|
||||
|
||||
archs=(arm64)
|
||||
for arch in ${archs[@]}; do
|
||||
extra_cmake_flags=""
|
||||
case ${arch} in
|
||||
"arm64")
|
||||
target_host=aarch64-linux-android
|
||||
;;
|
||||
"x86_64")
|
||||
target_host=x86_64-linux-android
|
||||
;;
|
||||
*)
|
||||
exit 16
|
||||
;;
|
||||
esac
|
||||
|
||||
# ICONV_PATH=$build_root/build/libiconv/$arch
|
||||
ICONV_PATH=$build_root/build/$arch
|
||||
|
||||
# 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
|
||||
if [ -x "$(command -v ccache)" ]; then
|
||||
echo "////////////////////////////////////////////"
|
||||
echo "// CCACHE 1 //"
|
||||
echo "////////////////////////////////////////////"
|
||||
CC="ccache clang"
|
||||
CXX="ccache clang++"
|
||||
else
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
fi
|
||||
|
||||
./b2 \
|
||||
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 \
|
||||
--with-program_options \
|
||||
--with-regex \
|
||||
--with-serialization \
|
||||
--with-system \
|
||||
--with-thread \
|
||||
--with-locale \
|
||||
install \
|
||||
-j${NPROC} \
|
||||
)
|
||||
|
||||
done
|
||||
|
||||
exit 0
|
@ -0,0 +1,56 @@
|
||||
#!/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
|
||||
|
||||
name=boost
|
||||
version=1_71_0
|
||||
dot_version=1.71.0
|
||||
hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
|
||||
url=https://dl.bintray.com/boostorg/release/${dot_version}/source/${name}_${version}.tar.bz2
|
||||
out=${name}_${version}.tar.bz2
|
||||
|
||||
rm -rf ${name}_${version}
|
||||
|
||||
if [ ! -z $SRC_BOOST ]; then
|
||||
echo "using pre-fetched $name"
|
||||
cp $SRC_BOOST $out
|
||||
else
|
||||
curl -# -L -o $out -O $url
|
||||
fi
|
||||
|
||||
echo "$hash $out" | sha256sum -c
|
||||
|
||||
tar xfv $out
|
@ -0,0 +1,40 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_PATH
|
||||
|
||||
chmod u+w -f -R $build_root || true
|
||||
rm -rf $build_root
|
||||
mkdir -p $build_root
|
@ -0,0 +1,70 @@
|
||||
#!/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
|
||||
|
||||
src_root=$BUILD_ROOT_SRC
|
||||
build_root=$BUILD_ROOT
|
||||
target_root=`pwd`
|
||||
|
||||
name=wownero
|
||||
|
||||
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
|
||||
target_abi=arm64-v8a
|
||||
;;
|
||||
"x86_64")
|
||||
target_host=x86_64-linux-android
|
||||
;;
|
||||
*)
|
||||
exit 16
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "collecting for ${arch}"
|
||||
mkdir -p $target_root/cyberwow/android/app/src/main/jniLibs/$target_abi
|
||||
cp build/release/bin/wownerod \
|
||||
$target_root/cyberwow/android/app/src/main/jniLibs/$target_abi/libwownerod.so
|
||||
|
||||
done
|
||||
|
||||
exit 0
|
@ -0,0 +1,67 @@
|
||||
#!/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.
|
||||
|
||||
DEFAULT_ANDROID_NDK_ROOT=~/SDK/Android/ndk-archive/android-ndk-r20
|
||||
ANDROID_NDK_ROOT="${ANDROID_NDK_ROOT:-${DEFAULT_ANDROID_NDK_ROOT}}"
|
||||
export ANDROID_NDK_ROOT=`realpath $ANDROID_NDK_ROOT`
|
||||
|
||||
DEFAULT_ANDROID_NDK_VERSION=r20
|
||||
ANDROID_NDK_VERSION="${ANDROID_NDK_VERSION:-${DEFAULT_ANDROID_NDK_VERSION}}"
|
||||
|
||||
BUILD_PATH=../cyberwow-build
|
||||
|
||||
DEFAULT_BUILD_ROOT=${BUILD_PATH}/$ANDROID_NDK_VERSION
|
||||
BUILD_ROOT="${BUILD_ROOT:-${DEFAULT_BUILD_ROOT}}"
|
||||
export BUILD_ROOT=`realpath $BUILD_ROOT`
|
||||
|
||||
BUILD_ROOT_SRC=${BUILD_ROOT}/src
|
||||
|
||||
DEFAULT_NPROC=$(nproc)
|
||||
NPROC="${NPROC:-${DEFAULT_NPROC}}"
|
||||
|
||||
export NPROC
|
||||
|
||||
|
||||
# wownero can only be built with ndk-r17c
|
||||
|
||||
DEFAULT_ANDROID_NDK_VERSION_WOW=r17c
|
||||
ANDROID_NDK_VERSION_WOW="${ANDROID_NDK_VERSION_WOW:-${DEFAULT_ANDROID_NDK_VERSION_WOW}}"
|
||||
|
||||
DEFAULT_ANDROID_NDK_ROOT_WOW=$ANDROID_NDK_ROOT/../$ANDROID_NDK_VERSION_WOW
|
||||
ANDROID_NDK_ROOT_WOW="${ANDROID_NDK_ROOT_WOW:-${DEFAULT_ANDROID_NDK_ROOT_WOW}}"
|
||||
export ANDROID_NDK_ROOT_WOW=`realpath $ANDROID_NDK_ROOT_WOW`
|
||||
|
||||
DEFAULT_BUILD_ROOT_WOW=${BUILD_PATH}/$ANDROID_NDK_VERSION_WOW
|
||||
BUILD_ROOT_WOW="${BUILD_ROOT_WOW:-${DEFAULT_BUILD_ROOT_WOW}}"
|
||||
export BUILD_ROOT_WOW=`realpath $BUILD_ROOT_WOW`
|
||||
|
||||
|
||||
|
@ -0,0 +1,86 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT
|
||||
src_root=$BUILD_ROOT_SRC
|
||||
|
||||
version=1.16
|
||||
name=libiconv
|
||||
|
||||
cd $src_root/${name}-${version}
|
||||
|
||||
archs=(arm64)
|
||||
for arch in ${archs[@]}; do
|
||||
extra_cmake_flags=""
|
||||
case ${arch} in
|
||||
"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
|
||||
if [ -x "$(command -v ccache)" ]; then
|
||||
echo "////////////////////////////////////////////"
|
||||
echo "// CCACHE 1 //"
|
||||
echo "////////////////////////////////////////////"
|
||||
CC="ccache clang"
|
||||
CXX="ccache clang++"
|
||||
else
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${PREFIX} \
|
||||
--build=x86_64-linux-gnu \
|
||||
--host=${target_host} \
|
||||
--disable-rpath \
|
||||
&& make -j${NPROC} && make install && make clean \
|
||||
)
|
||||
|
||||
done
|
||||
|
||||
exit 0
|
@ -0,0 +1,55 @@
|
||||
#!/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
|
||||
|
||||
name=libiconv
|
||||
version=1.16
|
||||
hash=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
||||
url=http://ftp.gnu.org/pub/gnu/${name}/${name}-${version}.tar.gz
|
||||
out=${name}-${version}.tar.gz
|
||||
|
||||
rm -rf ${name}-${version}
|
||||
|
||||
if [ ! -z $SRC_ICONV ]; then
|
||||
echo "using pre-fetched $name"
|
||||
cp $SRC_ICONV $out
|
||||
else
|
||||
curl -# -L -o $out -O $url
|
||||
fi
|
||||
|
||||
echo "$hash $out" | sha256sum -c
|
||||
tar -xzf $out
|
||||
|
@ -0,0 +1,95 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT
|
||||
src_root=$BUILD_ROOT_SRC
|
||||
|
||||
name=openssl
|
||||
version=1.1.1k
|
||||
|
||||
cd $src_root/${name}-${version}
|
||||
|
||||
archs=(arm64)
|
||||
for arch in ${archs[@]}; do
|
||||
extra_cmake_flags=""
|
||||
case ${arch} in
|
||||
"arm64")
|
||||
target_host=aarch64-linux-android
|
||||
;;
|
||||
"x86_64")
|
||||
target_host=x86_64-linux-android
|
||||
;;
|
||||
*)
|
||||
exit 16
|
||||
;;
|
||||
esac
|
||||
|
||||
# ZLIB_PATH=$build_root/build/zlib/$arch
|
||||
ZLIB_PATH=$build_root/build/$arch
|
||||
|
||||
# PREFIX=$build_root/build/${name}/$arch
|
||||
PREFIX=$build_root/build/$arch
|
||||
|
||||
echo "building for ${arch}"
|
||||
|
||||
|
||||
(
|
||||
ANDROID_API=29
|
||||
export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT
|
||||
|
||||
PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
|
||||
if [ -x "$(command -v ccache)" ]; then
|
||||
echo "////////////////////////////////////////////"
|
||||
echo "// CCACHE 1 //"
|
||||
echo "////////////////////////////////////////////"
|
||||
CC="ccache clang"
|
||||
CXX="ccache clang++"
|
||||
else
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
fi
|
||||
|
||||
./Configure android-${arch} \
|
||||
--prefix=${PREFIX} \
|
||||
no-comp \
|
||||
-D__ANDROID_API__=$ANDROID_API \
|
||||
&& make -j${NPROC} SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \
|
||||
&& make install_sw SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \
|
||||
&& make clean \
|
||||
)
|
||||
|
||||
done
|
||||
|
||||
exit 0
|
@ -0,0 +1,55 @@
|
||||
#!/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
|
||||
|
||||
name=openssl
|
||||
version=1.1.1k
|
||||
hash=892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
|
||||
url=https://www.openssl.org/source/openssl-${version}.tar.gz
|
||||
out=openssl-${version}.tar.gz
|
||||
|
||||
rm -rf ${name}-${version}
|
||||
|
||||
if [ ! -z $SRC_OPENSSL ]; then
|
||||
echo "using pre-fetched $name"
|
||||
cp $SRC_OPENSSL $out
|
||||
else
|
||||
curl -# -L -o $out -O $url
|
||||
fi
|
||||
|
||||
echo "${hash} $out" | sha256sum -c
|
||||
|
||||
tar xzf $out
|
@ -0,0 +1,88 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT
|
||||
src_root=$BUILD_ROOT_SRC
|
||||
|
||||
name=libsodium
|
||||
version=1.0.18
|
||||
|
||||
cd $src_root/${name}-${version}
|
||||
|
||||
./autogen.sh
|
||||
|
||||
archs=(arm64)
|
||||
for arch in ${archs[@]}; do
|
||||
extra_cmake_flags=""
|
||||
case ${arch} in
|
||||
"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
|
||||
if [ -x "$(command -v ccache)" ]; then
|
||||
echo "////////////////////////////////////////////"
|
||||
echo "// CCACHE 1 //"
|
||||
echo "////////////////////////////////////////////"
|
||||
CC="ccache clang"
|
||||
CXX="ccache clang++"
|
||||
else
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${PREFIX} \
|
||||
--host=${target_host} \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
&& make -j${NPROC} && make install && make clean \
|
||||
)
|
||||
|
||||
done
|
||||
|
||||
exit 0
|
@ -0,0 +1,55 @@
|
||||
#!/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
|
||||
|
||||
name=libsodium
|
||||
version=1.0.18
|
||||
hash=d59323c6b712a1519a5daf710b68f5e7fde57040845ffec53850911f10a5d4f4
|
||||
url=https://github.com/jedisct1/libsodium/archive/${version}.tar.gz
|
||||
out=${name}-${version}.tar.gz
|
||||
|
||||
rm -rf ${name}-${version}
|
||||
|
||||
if [ ! -z $SRC_SODIUM ]; then
|
||||
echo "using pre-fetched $name"
|
||||
cp $SRC_SODIUM $out
|
||||
else
|
||||
curl -# -L -o $out -O $url
|
||||
fi
|
||||
|
||||
echo "${hash} $out" | sha256sum -c
|
||||
|
||||
tar xzf $out
|
@ -0,0 +1,49 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT_WOW
|
||||
PATH=$ANDROID_NDK_ROOT_WOW/build/tools/:$PATH
|
||||
|
||||
args="--api 23 --stl=libc++"
|
||||
archs=(arm64)
|
||||
|
||||
for arch in ${archs[@]}; do
|
||||
|
||||
if [ ! -d "$build_root/tool/$arch" ]; then
|
||||
echo "installing $arch"
|
||||
make_standalone_toolchain.py $args --arch $arch --install-dir $build_root/tool/$arch
|
||||
fi
|
||||
|
||||
done
|
@ -0,0 +1,45 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT_WOW
|
||||
PATH=$ANDROID_NDK_ROOT_WOW/build/tools/:$PATH
|
||||
|
||||
archs=(arm64)
|
||||
|
||||
for arch in ${archs[@]}; do
|
||||
cd $build_root/tool/$arch/sysroot && \
|
||||
mkdir -p var/empty/include/android && \
|
||||
cp usr/include/android/api-level.h var/empty/include/android/
|
||||
done
|
@ -0,0 +1,51 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT
|
||||
PATH=$ANDROID_NDK_ROOT/build/tools/:$PATH
|
||||
|
||||
args="--api 29 --stl=libc++"
|
||||
archs=(arm64)
|
||||
|
||||
for arch in ${archs[@]}; do
|
||||
|
||||
if [ ! -d "$build_root/tool/$arch" ]; then
|
||||
echo "installing $arch"
|
||||
make_standalone_toolchain.py $args --arch $arch --install-dir $build_root/tool/$arch
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
mkdir -p $BUILD_ROOT_SRC
|
@ -0,0 +1,102 @@
|
||||
#!/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
|
||||
|
||||
build_root=$BUILD_ROOT
|
||||
src_root=$BUILD_ROOT_SRC
|
||||
|
||||
build_root_wow=$BUILD_ROOT_WOW
|
||||
|
||||
name=wownero
|
||||
|
||||
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/dlib/
|
||||
rm -f $PREFIX/dlib/libtinfo.so.5
|
||||
ln -s $PATH_NCURSES/lib/libncursesw.so.5 $PREFIX/dlib/libtinfo.so.5
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/dlib
|
||||
export TOOLCHAIN_DIR=`realpath $build_root_wow/tool/${arch}`
|
||||
export PATH=$PATH:$build_root/host/bin
|
||||
|
||||
mkdir -p build/release
|
||||
pushd .
|
||||
cd build/release
|
||||
(
|
||||
CMAKE_INCLUDE_PATH="${PREFIX}/include" \
|
||||
CMAKE_LIBRARY_PATH="${PREFIX}/lib" \
|
||||
CC=aarch64-linux-android-clang \
|
||||
CXX=aarch64-linux-android-clang++ \
|
||||
cmake \
|
||||
-D BUILD_TESTS=OFF \
|
||||
-D ARCH="armv8-a" \
|
||||
-D STATIC=ON \
|
||||
-D BUILD_64=ON \
|
||||
-D CMAKE_BUILD_TYPE=release \
|
||||
-D ANDROID=true \
|
||||
-D INSTALL_VENDORED_LIBUNBOUND=ON \
|
||||
-D BUILD_TAG="android-armv8" \
|
||||
-D CMAKE_SYSTEM_NAME="Android" \
|
||||
-D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${TOOLCHAIN_DIR}" \
|
||||
-D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" \
|
||||
-D MANUAL_SUBMODULES=ON \
|
||||
../.. && make -j${NPROC} daemon
|
||||
)
|
||||
popd
|
||||
|
||||
done
|
||||
|
||||
exit 0
|