mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-21 11:27:26 -04:00
Merge pull request #965
83efc38Android: Disable password strength meter0ece8a9Android dockerfile: add zmq dependencydab4d5aAndroid: use new repo path
This commit is contained in:
@@ -22,7 +22,7 @@ Copyright (c) 2014-2017, The Monero Project
|
|||||||
|
|
||||||
# Get the apk
|
# Get the apk
|
||||||
|
|
||||||
docker cp monero-gui-android:/opt/android/monero-core/build/release/bin/bin/QtApp-debug.apk .
|
docker cp monero-gui-android:/opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk .
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ Copyright (c) 2014-2017, The Monero Project
|
|||||||
First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling)
|
First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling)
|
||||||
The only place where we are allowed to play is `/data/local/tmp`. So :
|
The only place where we are allowed to play is `/data/local/tmp`. So :
|
||||||
|
|
||||||
adb push /opt/android/monero-core/build/release/bin/bin/QtApp-debug.apk /data/local/tmp
|
adb push /opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk /data/local/tmp
|
||||||
adb shell pm install -r /data/local/tmp/QtApp-debug.apk
|
adb shell pm install -r /data/local/tmp/QtApp-debug.apk
|
||||||
|
|
||||||
- Troubleshooting:
|
- Troubleshooting:
|
||||||
|
|||||||
@@ -88,21 +88,20 @@ APP_CFLAGS += -target armv7-none-linux-androideabi -fexceptions -fstack-protect
|
|||||||
&& android update project --path . -t "${ANDROID_API}" \
|
&& android update project --path . -t "${ANDROID_API}" \
|
||||||
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ ant -Dndk.dir=${ANDROID_NDK_ROOT} -Diconv.src=${WORKDIR}/libiconv-${ICONV_VERSION} zbar-clean zbar-ndk-build
|
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ ant -Dndk.dir=${ANDROID_NDK_ROOT} -Diconv.src=${WORKDIR}/libiconv-${ICONV_VERSION} zbar-clean zbar-ndk-build
|
||||||
|
|
||||||
#Can't directly call build.sh because of env variables
|
|
||||||
RUN git clone https://github.com/monero-project/monero-core.git \
|
|
||||||
&& cd monero-core \
|
|
||||||
&& git submodule update \
|
|
||||||
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ BOOST_ROOT=/opt/android/boost_1_62_0 BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ ./get_libwallet_api.sh release-android
|
|
||||||
|
|
||||||
RUN cp openssl/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
RUN cp openssl/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
||||||
RUN cp boost_${BOOST_VERSION}/android32/lib/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
RUN cp boost_${BOOST_VERSION}/android32/lib/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
||||||
RUN cp ZBar/android/obj/local/armeabi-v7a/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
RUN cp ZBar/android/obj/local/armeabi-v7a/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
||||||
|
|
||||||
ENV PATH $ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:${WORKDIR}/Qt-${QT_VERSION}/bin:$CLEAN_PATH
|
RUN git clone https://github.com/monero-project/monero-gui.git \
|
||||||
|
&& cd monero-gui \
|
||||||
# NB : zxcvbn-c needs to build a local binary and Qt don't care about these environnement variable
|
&& git submodule update \
|
||||||
RUN cd monero-core \
|
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ BOOST_ROOT=/opt/android/boost_1_62_0 \
|
||||||
&& CC="gcc" CXX="g++" ./build.sh release-android \
|
BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ \
|
||||||
|
OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \
|
||||||
|
CMAKE_INCLUDE_PATH=${WORKDIR}/cppzmq/ \
|
||||||
|
CMAKE_LIBRARY_PATH=${WORKDIR}/zeromq4-1/.libs \
|
||||||
|
CXXFLAGS="-I ${WORKDIR}/zeromq4-1/include/" \
|
||||||
|
./build.sh release-android \
|
||||||
&& cd build \
|
&& cd build \
|
||||||
&& make deploy
|
&& make deploy
|
||||||
|
|
||||||
|
|||||||
10
build.sh
10
build.sh
@@ -40,14 +40,16 @@ elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|||||||
BIN_PATH=release/bin
|
BIN_PATH=release/bin
|
||||||
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
||||||
echo "Building release for ANDROID"
|
echo "Building release for ANDROID"
|
||||||
CONFIG="CONFIG+=release static WITH_SCANNER";
|
CONFIG="CONFIG+=release static WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
||||||
ANDROID=true
|
ANDROID=true
|
||||||
BIN_PATH=release/bin
|
BIN_PATH=release/bin
|
||||||
|
DISABLE_PASS_STRENGTH_METER=true
|
||||||
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
||||||
echo "Building debug for ANDROID : ultra INSECURE !!"
|
echo "Building debug for ANDROID : ultra INSECURE !!"
|
||||||
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER";
|
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
||||||
ANDROID=true
|
ANDROID=true
|
||||||
BIN_PATH=debug/bin
|
BIN_PATH=debug/bin
|
||||||
|
DISABLE_PASS_STRENGTH_METER=true
|
||||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
elif [ "$BUILD_TYPE" == "debug" ]; then
|
||||||
echo "Building debug"
|
echo "Building debug"
|
||||||
CONFIG="CONFIG+=debug"
|
CONFIG="CONFIG+=debug"
|
||||||
@@ -73,7 +75,9 @@ fi
|
|||||||
./get_libwallet_api.sh $BUILD_TYPE
|
./get_libwallet_api.sh $BUILD_TYPE
|
||||||
|
|
||||||
# build zxcvbn
|
# build zxcvbn
|
||||||
$MAKE -C src/zxcvbn-c || exit
|
if [ "$DISABLE_PASS_STRENGTH_METER" != true ]; then
|
||||||
|
$MAKE -C src/zxcvbn-c || exit
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d build ]; then mkdir build; fi
|
if [ ! -d build ]; then mkdir build; fi
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,12 @@ SOURCES += main.cpp \
|
|||||||
src/libwalletqt/UnsignedTransaction.cpp \
|
src/libwalletqt/UnsignedTransaction.cpp \
|
||||||
MainApp.cpp
|
MainApp.cpp
|
||||||
|
|
||||||
|
CONFIG(DISABLE_PASS_STRENGTH_METER) {
|
||||||
|
HEADERS -= src/zxcvbn-c/zxcvbn.h
|
||||||
|
SOURCES -= src/zxcvbn-c/zxcvbn.c
|
||||||
|
DEFINES += "DISABLE_PASS_STRENGTH_METER"
|
||||||
|
}
|
||||||
|
|
||||||
!ios {
|
!ios {
|
||||||
HEADERS += src/daemon/DaemonManager.h
|
HEADERS += src/daemon/DaemonManager.h
|
||||||
SOURCES += src/daemon/DaemonManager.cpp
|
SOURCES += src/daemon/DaemonManager.cpp
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ QUrl WalletManager::localPathToUrl(const QString &path) const
|
|||||||
return QUrl::fromLocalFile(path);
|
return QUrl::fromLocalFile(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_PASS_STRENGTH_METER
|
||||||
double WalletManager::getPasswordStrength(const QString &password) const
|
double WalletManager::getPasswordStrength(const QString &password) const
|
||||||
{
|
{
|
||||||
static const char *local_dict[] = {
|
static const char *local_dict[] = {
|
||||||
@@ -318,6 +319,7 @@ double WalletManager::getPasswordStrength(const QString &password) const
|
|||||||
ZxcvbnUnInit();
|
ZxcvbnUnInit();
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool WalletManager::saveQrCode(const QString &code, const QString &path) const
|
bool WalletManager::saveQrCode(const QString &code, const QString &path) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -128,7 +128,9 @@ public:
|
|||||||
Q_INVOKABLE qint64 addi(qint64 x, qint64 y) const { return x + y; }
|
Q_INVOKABLE qint64 addi(qint64 x, qint64 y) const { return x + y; }
|
||||||
Q_INVOKABLE qint64 subi(qint64 x, qint64 y) const { return x - y; }
|
Q_INVOKABLE qint64 subi(qint64 x, qint64 y) const { return x - y; }
|
||||||
|
|
||||||
|
#ifndef DISABLE_PASS_STRENGTH_METER
|
||||||
Q_INVOKABLE double getPasswordStrength(const QString &password) const;
|
Q_INVOKABLE double getPasswordStrength(const QString &password) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
Q_INVOKABLE QString resolveOpenAlias(const QString &address) const;
|
Q_INVOKABLE QString resolveOpenAlias(const QString &address) const;
|
||||||
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error);
|
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error);
|
||||||
|
|||||||
Reference in New Issue
Block a user