mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-13 11:56:32 +02:00
Android build
This commit is contained in:
parent
d8f9e7360f
commit
2ce0024a10
14
build.sh
14
build.sh
@ -14,12 +14,22 @@ elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|||||||
echo "Building release-static"
|
echo "Building release-static"
|
||||||
CONFIG="CONFIG+=release static";
|
CONFIG="CONFIG+=release static";
|
||||||
BIN_PATH=release/bin
|
BIN_PATH=release/bin
|
||||||
|
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
||||||
|
echo "Building release for ANDROID"
|
||||||
|
CONFIG="CONFIG+=release static";
|
||||||
|
ANDROID=true
|
||||||
|
BIN_PATH=release/bin
|
||||||
|
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
||||||
|
echo "Building debug for ANDROID : ultra INSECURE !!"
|
||||||
|
CONFIG="CONFIG+=debug qml_debug";
|
||||||
|
ANDROID=true
|
||||||
|
BIN_PATH=debug/bin
|
||||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
elif [ "$BUILD_TYPE" == "debug" ]; then
|
||||||
echo "Building debug"
|
echo "Building debug"
|
||||||
CONFIG="CONFIG+=debug"
|
CONFIG="CONFIG+=debug"
|
||||||
BIN_PATH=debug/bin
|
BIN_PATH=debug/bin
|
||||||
else
|
else
|
||||||
echo "Valid build types are release, release-static and debug"
|
echo "Valid build types are release, release-static, release-android, debug-android and debug"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -69,7 +79,7 @@ qmake ../monero-wallet-gui.pro "$CONFIG"
|
|||||||
make
|
make
|
||||||
|
|
||||||
# Copy monerod to bin folder
|
# Copy monerod to bin folder
|
||||||
if [ "$platform" != "mingw32" ]; then
|
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
|
||||||
cp ../$MONERO_DIR/bin/$MONEROD_EXEC $BIN_PATH
|
cp ../$MONERO_DIR/bin/$MONEROD_EXEC $BIN_PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ if [ -z $BUILD_TYPE ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
STATIC=false
|
STATIC=false
|
||||||
|
ANDROID=false
|
||||||
if [ "$BUILD_TYPE" == "release" ]; then
|
if [ "$BUILD_TYPE" == "release" ]; then
|
||||||
echo "Building libwallet release"
|
echo "Building libwallet release"
|
||||||
CMAKE_BUILD_TYPE=Release
|
CMAKE_BUILD_TYPE=Release
|
||||||
@ -21,11 +22,21 @@ elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|||||||
echo "Building libwallet release-static"
|
echo "Building libwallet release-static"
|
||||||
CMAKE_BUILD_TYPE=Release
|
CMAKE_BUILD_TYPE=Release
|
||||||
STATIC=true
|
STATIC=true
|
||||||
|
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
||||||
|
echo "Building libwallet release-static for ANDROID"
|
||||||
|
CMAKE_BUILD_TYPE=Release
|
||||||
|
STATIC=true
|
||||||
|
ANDROID=true
|
||||||
|
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
||||||
|
echo "Building libwallet debug-static for ANDROID"
|
||||||
|
CMAKE_BUILD_TYPE=Debug
|
||||||
|
STATIC=true
|
||||||
|
ANDROID=true
|
||||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
elif [ "$BUILD_TYPE" == "debug" ]; then
|
||||||
echo "Building libwallet debug"
|
echo "Building libwallet debug"
|
||||||
CMAKE_BUILD_TYPE=Debug
|
CMAKE_BUILD_TYPE=Debug
|
||||||
else
|
else
|
||||||
echo "Valid build types are release, release-static and debug"
|
echo "Valid build types are release, release-static, release-android, debug-android and debug"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -79,7 +90,10 @@ if [ "$platform" == "darwin" ]; then
|
|||||||
## LINUX 64
|
## LINUX 64
|
||||||
elif [ "$platform" == "linux64" ]; then
|
elif [ "$platform" == "linux64" ]; then
|
||||||
echo "Configuring build for Linux x64"
|
echo "Configuring build for Linux x64"
|
||||||
if [ "$STATIC" == true ]; then
|
if [ "$ANDROID" == true ]; then
|
||||||
|
echo "Configuring build for Android on Linux host"
|
||||||
|
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||||
|
elif [ "$STATIC" == true ]; then
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||||
else
|
else
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||||
@ -134,7 +148,7 @@ popd
|
|||||||
|
|
||||||
# Build monerod
|
# Build monerod
|
||||||
# win32 need to build daemon manually with msys2 toolchain
|
# win32 need to build daemon manually with msys2 toolchain
|
||||||
if [ "$platform" != "mingw32" ]; then
|
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
|
||||||
pushd $MONERO_DIR/build/release/src/daemon
|
pushd $MONERO_DIR/build/release/src/daemon
|
||||||
eval make -j$CPU_CORE_COUNT
|
eval make -j$CPU_CORE_COUNT
|
||||||
eval make install -j$CPU_CORE_COUNT
|
eval make install -j$CPU_CORE_COUNT
|
||||||
@ -146,7 +160,7 @@ fi
|
|||||||
# since filename conflict (random.c.obj)
|
# since filename conflict (random.c.obj)
|
||||||
# for Linux, we use libunbound shipped with the system, so we don't need to build it
|
# for Linux, we use libunbound shipped with the system, so we don't need to build it
|
||||||
|
|
||||||
if [ "$platform" != "linux32" ] && [ "$platform" != "linux64" ]; then
|
if [ "$platform" != "linux32" ] && ([ "$ANDROID" == true ] || [ "$platform" != "linux64" ]); then
|
||||||
echo "Building libunbound..."
|
echo "Building libunbound..."
|
||||||
pushd $MONERO_DIR/build/release/external/unbound
|
pushd $MONERO_DIR/build/release/external/unbound
|
||||||
# no need to make, it was already built as dependency for libwallet
|
# no need to make, it was already built as dependency for libwallet
|
||||||
|
@ -12,7 +12,8 @@ QMAKE_DISTCLEAN += -r $$WALLET_ROOT
|
|||||||
INCLUDEPATH += $$WALLET_ROOT/include \
|
INCLUDEPATH += $$WALLET_ROOT/include \
|
||||||
$$PWD/src/libwalletqt \
|
$$PWD/src/libwalletqt \
|
||||||
$$PWD/src/QR-Code-generator \
|
$$PWD/src/QR-Code-generator \
|
||||||
$$PWD/src
|
$$PWD/src \
|
||||||
|
$$WALLET_ROOT/src
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
filter.h \
|
filter.h \
|
||||||
@ -274,10 +275,13 @@ win32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linux {
|
linux:!android {
|
||||||
deploy.commands += $$escape_expand(\n\t) $$PWD/linuxdeploy_helper.sh $$DESTDIR $$TARGET
|
deploy.commands += $$escape_expand(\n\t) $$PWD/linuxdeploy_helper.sh $$DESTDIR $$TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android{
|
||||||
|
deploy.commands += make install INSTALL_ROOT=$$DESTDIR && androiddeployqt --input android-libmonero-wallet-gui.so-deployment-settings.json --output $$DESTDIR --deployment bundled --android-platform android-21 --jdk /usr/lib/jvm/java-8-openjdk-amd64 -qmldir=$$PWD
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
|
Loading…
Reference in New Issue
Block a user