mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-01 08:11:54 +01:00
repo: cleanup qmake
This commit is contained in:
parent
33afd0bb83
commit
9d2f083a97
121
build.sh
121
build.sh
@ -1,121 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
BUILD_TYPE=$1
|
|
||||||
BUILD_TREZOR=${BUILD_TREZOR-true}
|
|
||||||
source ./utils.sh
|
|
||||||
platform=$(get_platform)
|
|
||||||
# default build type
|
|
||||||
if [ -z $BUILD_TYPE ]; then
|
|
||||||
BUILD_TYPE=release
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Return 0 if the command exists, 1 if it does not.
|
|
||||||
exists() {
|
|
||||||
command -v "$1" &>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Return the first value in $@ that's a runnable command.
|
|
||||||
find_command() {
|
|
||||||
for arg in "$@"; do
|
|
||||||
if exists "$arg"; then
|
|
||||||
echo "$arg"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" == "release" ]; then
|
|
||||||
echo "Building release"
|
|
||||||
CONFIG="CONFIG+=release";
|
|
||||||
BIN_PATH=release/bin
|
|
||||||
elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|
||||||
echo "Building release-static"
|
|
||||||
if [ "$platform" != "darwin" ]; then
|
|
||||||
CONFIG="CONFIG+=release static";
|
|
||||||
else
|
|
||||||
# OS X: build static libwallet but dynamic Qt.
|
|
||||||
echo "OS X: Building Qt project without static flag"
|
|
||||||
CONFIG="CONFIG+=release";
|
|
||||||
fi
|
|
||||||
BIN_PATH=release/bin
|
|
||||||
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
|
||||||
echo "Building release for ANDROID"
|
|
||||||
CONFIG="CONFIG+=release static WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
|
||||||
ANDROID=true
|
|
||||||
BIN_PATH=release/bin
|
|
||||||
DISABLE_PASS_STRENGTH_METER=true
|
|
||||||
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
|
||||||
echo "Building debug for ANDROID : ultra INSECURE !!"
|
|
||||||
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
|
||||||
ANDROID=true
|
|
||||||
BIN_PATH=debug/bin
|
|
||||||
DISABLE_PASS_STRENGTH_METER=true
|
|
||||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
|
||||||
echo "Building debug"
|
|
||||||
CONFIG="CONFIG+=debug"
|
|
||||||
BIN_PATH=debug/bin
|
|
||||||
else
|
|
||||||
echo "Valid build types are release, release-static, release-android, debug-android and debug"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
source ./utils.sh
|
|
||||||
pushd $(pwd)
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
MONERO_DIR=monero
|
|
||||||
MONEROD_EXEC=monerod
|
|
||||||
|
|
||||||
MAKE='make'
|
|
||||||
if [[ $platform == *bsd* ]]; then
|
|
||||||
MAKE='gmake'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build libwallet
|
|
||||||
export BUILD_TREZOR
|
|
||||||
./get_libwallet_api.sh $BUILD_TYPE
|
|
||||||
|
|
||||||
# build zxcvbn
|
|
||||||
if [ "$DISABLE_PASS_STRENGTH_METER" != true ]; then
|
|
||||||
$MAKE -C src/zxcvbn-c || exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d build ]; then mkdir build; fi
|
|
||||||
|
|
||||||
|
|
||||||
# Platform indepenent settings
|
|
||||||
if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then
|
|
||||||
exists lsb_release && distro="$(lsb_release -is)"
|
|
||||||
if [ "$distro" = "Ubuntu" ] || [ "$distro" = "Fedora" ] || test -f /etc/fedora-release; then
|
|
||||||
CONFIG="$CONFIG libunwind_off"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$platform" == "darwin" ]; then
|
|
||||||
BIN_PATH=$BIN_PATH/monero-wallet-gui.app/Contents/MacOS/
|
|
||||||
elif [ "$platform" == "mingw64" ] || [ "$platform" == "mingw32" ]; then
|
|
||||||
MONEROD_EXEC=monerod.exe
|
|
||||||
fi
|
|
||||||
|
|
||||||
# force version update
|
|
||||||
get_tag
|
|
||||||
GUI_VERSION=$(echo "$TAGNAME" | sed 's/^v\([[:digit:]]\)/\1/')
|
|
||||||
echo "var GUI_VERSION = \"$GUI_VERSION\"" > version.js
|
|
||||||
|
|
||||||
cd build
|
|
||||||
if ! QMAKE=$(find_command qmake qmake-qt5); then
|
|
||||||
echo "Failed to find suitable qmake command."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
$QMAKE ../monero-wallet-gui.pro "$CONFIG" || exit
|
|
||||||
$MAKE || exit
|
|
||||||
|
|
||||||
# Copy monerod to bin folder
|
|
||||||
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
|
|
||||||
cp ../$MONERO_DIR/bin/$MONEROD_EXEC $BIN_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make deploy
|
|
||||||
popd
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
android-no-sdk {
|
|
||||||
target.path = /data/user/qt
|
|
||||||
export(target.path)
|
|
||||||
INSTALLS += target
|
|
||||||
} else:android {
|
|
||||||
x86 {
|
|
||||||
target.path = /libs/x86
|
|
||||||
} else: armeabi-v7a {
|
|
||||||
target.path = /libs/armeabi-v7a
|
|
||||||
} else {
|
|
||||||
target.path = /libs/armeabi
|
|
||||||
}
|
|
||||||
export(target.path)
|
|
||||||
INSTALLS += target
|
|
||||||
} else:unix {
|
|
||||||
isEmpty(target.path) {
|
|
||||||
qnx {
|
|
||||||
target.path = /tmp/$${TARGET}/bin
|
|
||||||
} else {
|
|
||||||
target.path = /opt/$${TARGET}/bin
|
|
||||||
}
|
|
||||||
export(target.path)
|
|
||||||
}
|
|
||||||
INSTALLS += target
|
|
||||||
}
|
|
||||||
|
|
||||||
export(INSTALLS)
|
|
@ -1,286 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
MONERO_URL=https://github.com/monero-project/monero.git
|
|
||||||
MONERO_BRANCH=master
|
|
||||||
|
|
||||||
pushd $(pwd)
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
source $ROOT_DIR/utils.sh
|
|
||||||
|
|
||||||
INSTALL_DIR=$ROOT_DIR/wallet
|
|
||||||
MONERO_DIR=$ROOT_DIR/monero
|
|
||||||
BUILD_LIBWALLET=false
|
|
||||||
|
|
||||||
# init and update monero submodule
|
|
||||||
if [ ! -d $MONERO_DIR/src ]; then
|
|
||||||
git submodule init monero
|
|
||||||
fi
|
|
||||||
git submodule update --remote
|
|
||||||
git -C $MONERO_DIR fetch
|
|
||||||
git -C $MONERO_DIR checkout v0.17.1.1
|
|
||||||
|
|
||||||
# get monero core tag
|
|
||||||
pushd $MONERO_DIR
|
|
||||||
get_tag
|
|
||||||
popd
|
|
||||||
# create local monero branch
|
|
||||||
git -C $MONERO_DIR checkout -B $VERSIONTAG
|
|
||||||
|
|
||||||
# Merge monero PR dependencies
|
|
||||||
|
|
||||||
# Workaround for git username requirements
|
|
||||||
# Save current user settings and revert back when we are done with merging PR's
|
|
||||||
OLD_GIT_USER=$(git -C $MONERO_DIR config --local user.name)
|
|
||||||
OLD_GIT_EMAIL=$(git -C $MONERO_DIR config --local user.email)
|
|
||||||
git -C $MONERO_DIR config user.name "Monero GUI"
|
|
||||||
git -C $MONERO_DIR config user.email "gui@monero.local"
|
|
||||||
# check for PR requirements in most recent commit message (i.e requires #xxxx)
|
|
||||||
for PR in $(git log --format=%B -n 1 | grep -io "requires #[0-9]*" | sed 's/[^0-9]*//g'); do
|
|
||||||
echo "Merging monero push request #$PR"
|
|
||||||
# fetch pull request and merge
|
|
||||||
git -C $MONERO_DIR fetch origin pull/$PR/head:PR-$PR
|
|
||||||
git -C $MONERO_DIR merge --quiet PR-$PR -m "Merge monero PR #$PR"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
done
|
|
||||||
|
|
||||||
# revert back to old git config
|
|
||||||
$(git -C $MONERO_DIR config user.name "$OLD_GIT_USER")
|
|
||||||
$(git -C $MONERO_DIR config user.email "$OLD_GIT_EMAIL")
|
|
||||||
|
|
||||||
git -C $MONERO_DIR submodule init
|
|
||||||
git -C $MONERO_DIR submodule update
|
|
||||||
|
|
||||||
# Build libwallet if it doesnt exist
|
|
||||||
if [ ! -f $MONERO_DIR/lib/libwallet_merged.a ]; then
|
|
||||||
echo "libwallet_merged.a not found - Building libwallet"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
# Build libwallet if no previous version file exists
|
|
||||||
elif [ ! -f $MONERO_DIR/version.sh ]; then
|
|
||||||
echo "monero/version.h not found - Building libwallet"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
## Compare previously built version with submodule + merged PR's version.
|
|
||||||
else
|
|
||||||
source $MONERO_DIR/version.sh
|
|
||||||
# compare submodule version with latest build
|
|
||||||
pushd "$MONERO_DIR"
|
|
||||||
get_tag
|
|
||||||
popd
|
|
||||||
echo "latest libwallet version: $GUI_MONERO_VERSION"
|
|
||||||
echo "Installed libwallet version: $VERSIONTAG"
|
|
||||||
# check if recent
|
|
||||||
if [ "$VERSIONTAG" != "$GUI_MONERO_VERSION" ]; then
|
|
||||||
echo "Building new libwallet version $GUI_MONERO_VERSION"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
else
|
|
||||||
echo "latest libwallet ($GUI_MONERO_VERSION) is already built. Remove monero/lib/libwallet_merged.a to force rebuild"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BUILD_LIBWALLET" != true ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "GUI_MONERO_VERSION=\"$VERSIONTAG\"" > $MONERO_DIR/version.sh
|
|
||||||
|
|
||||||
## Continue building libwallet
|
|
||||||
|
|
||||||
# default build type
|
|
||||||
BUILD_TYPE=$1
|
|
||||||
if [ -z $BUILD_TYPE ]; then
|
|
||||||
BUILD_TYPE=release
|
|
||||||
fi
|
|
||||||
|
|
||||||
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR=ON"
|
|
||||||
if [ "$BUILD_TREZOR" == false ]; then
|
|
||||||
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR=OFF"
|
|
||||||
fi
|
|
||||||
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR_UDP_RELEASE=ON ${BUILD_TREZOR_FLAGS}"
|
|
||||||
|
|
||||||
STATIC=false
|
|
||||||
ANDROID=false
|
|
||||||
if [ "$BUILD_TYPE" == "release" ]; then
|
|
||||||
echo "Building libwallet release"
|
|
||||||
CMAKE_BUILD_TYPE=Release
|
|
||||||
elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|
||||||
echo "Building libwallet release-static"
|
|
||||||
CMAKE_BUILD_TYPE=Release
|
|
||||||
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
|
|
||||||
echo "Building libwallet debug"
|
|
||||||
CMAKE_BUILD_TYPE=Debug
|
|
||||||
STATIC=true
|
|
||||||
else
|
|
||||||
echo "Valid build types are release, release-static, release-android, debug-android and debug"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "cleaning up existing monero build dir, libs and includes"
|
|
||||||
rm -fr $MONERO_DIR/build
|
|
||||||
rm -fr $MONERO_DIR/lib
|
|
||||||
rm -fr $MONERO_DIR/include
|
|
||||||
rm -fr $MONERO_DIR/bin
|
|
||||||
|
|
||||||
|
|
||||||
mkdir -p $MONERO_DIR/build/$BUILD_TYPE
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE
|
|
||||||
|
|
||||||
# reusing function from "utils.sh"
|
|
||||||
platform=$(get_platform)
|
|
||||||
# default make executable
|
|
||||||
make_exec="make"
|
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
|
||||||
ARCH="native"
|
|
||||||
if [ "$platform" == "darwin" ]; then
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
ARCH="x86-64"
|
|
||||||
fi
|
|
||||||
elif [ "$platform" == "linux64" ]; then
|
|
||||||
if [ "$ANDROID" == true ]; then
|
|
||||||
ARCH="armv7-a"
|
|
||||||
elif [ "$STATIC" == true ]; then
|
|
||||||
ARCH="x86-64"
|
|
||||||
fi
|
|
||||||
elif [ "$platform" == "linux32" ]; then
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
ARCH="i686"
|
|
||||||
fi
|
|
||||||
elif [ "$platform" == "linuxarmv7" ]; then
|
|
||||||
ARCH="armv7-a"
|
|
||||||
elif [ "$platform" == "mingw32" ]; then
|
|
||||||
ARCH="i686"
|
|
||||||
elif [ "$platform" == "mingw64" ]; then
|
|
||||||
ARCH="x86-64"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building for ARCH=$ARCH"
|
|
||||||
|
|
||||||
## OS X
|
|
||||||
if [ "$platform" == "darwin" ]; then
|
|
||||||
echo "Configuring build for MacOS.."
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=ON -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX 64
|
|
||||||
elif [ "$platform" == "linux64" ]; then
|
|
||||||
echo "Configuring build for Linux x64"
|
|
||||||
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="$ARCH" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
elif [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=ON -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX 32
|
|
||||||
elif [ "$platform" == "linux32" ]; then
|
|
||||||
echo "Configuring build for Linux i686"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX ARMv7
|
|
||||||
elif [ "$platform" == "linuxarmv7" ]; then
|
|
||||||
echo "Configuring build for Linux armv7"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D BUILD_TESTS=OFF -D ARCH="$ARCH" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D BUILD_TESTS=OFF -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX other
|
|
||||||
elif [ "$platform" == "linux" ]; then
|
|
||||||
echo "Configuring build for Linux general"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Windows 64
|
|
||||||
## Windows is always static to work outside msys2
|
|
||||||
elif [ "$platform" == "mingw64" ]; then
|
|
||||||
# Do something under Windows NT platform
|
|
||||||
echo "Configuring build for MINGW64.."
|
|
||||||
BOOST_ROOT=/mingw64/boost
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="$ARCH" -D BUILD_TAG="win-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) ../..
|
|
||||||
|
|
||||||
## Windows 32
|
|
||||||
elif [ "$platform" == "mingw32" ]; then
|
|
||||||
# Do something under Windows NT platform
|
|
||||||
echo "Configuring build for MINGW32.."
|
|
||||||
BOOST_ROOT=/mingw32/boost
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) ../..
|
|
||||||
make_exec="mingw32-make"
|
|
||||||
else
|
|
||||||
echo "Unknown platform, configuring general build"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set CPU core count
|
|
||||||
# thanks to SO: http://stackoverflow.com/a/20283965/4118915
|
|
||||||
if test -z "$CPU_CORE_COUNT"; then
|
|
||||||
CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build libwallet_merged
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE/src/wallet
|
|
||||||
eval $make_exec version -C ../..
|
|
||||||
eval $make_exec -j$CPU_CORE_COUNT
|
|
||||||
eval $make_exec install -j$CPU_CORE_COUNT
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Build monerod
|
|
||||||
# win32 need to build daemon manually with msys2 toolchain
|
|
||||||
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE/src/daemon
|
|
||||||
eval make -j$CPU_CORE_COUNT
|
|
||||||
eval make install -j$CPU_CORE_COUNT
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build install epee
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/contrib/epee all install
|
|
||||||
|
|
||||||
# install easylogging
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/easylogging++ all install
|
|
||||||
|
|
||||||
# install lmdb
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/db_drivers/liblmdb all install
|
|
||||||
|
|
||||||
# Install libunbound
|
|
||||||
if [ -d $MONERO_DIR/build/$BUILD_TYPE/external/unbound ]; then
|
|
||||||
echo "Installing libunbound..."
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE/external/unbound
|
|
||||||
# no need to make, it was already built as dependency for libwallet
|
|
||||||
# make -j$CPU_CORE_COUNT
|
|
||||||
$make_exec install -j$CPU_CORE_COUNT
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# install randomx
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/randomx all install
|
|
||||||
|
|
||||||
popd
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
# 3 header files required by monero are missing from the IOS SDK. I copied them from iphoneSimulator SDK
|
|
||||||
# cd /Applications/XCode.app
|
|
||||||
# sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/vmmeter.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/
|
|
||||||
# sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/udp_var.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/
|
|
||||||
# sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/ip_var.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z $BUILD_TYPE ]; then
|
|
||||||
BUILD_TYPE=release
|
|
||||||
fi
|
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
if [ -z $BOOST_LIBRARYDIR ]; then
|
|
||||||
BOOST_LIBRARYDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/lib
|
|
||||||
fi
|
|
||||||
if [ -z $BOOST_INCLUDEDIR ]; then
|
|
||||||
BOOST_INCLUDEDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/include
|
|
||||||
fi
|
|
||||||
if [ -z $OPENSSL_INCLUDE_DIR ]; then
|
|
||||||
OPENSSL_INCLUDE_DIR=${ROOT_DIR}/../openssl/1.0.2j/include
|
|
||||||
fi
|
|
||||||
if [ -z $OPENSSL_ROOT_DIR ]; then
|
|
||||||
OPENSSL_ROOT_DIR=${ROOT_DIR}/../openssl/1.0.2j
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building IOS armv7"
|
|
||||||
rm -r monero/build > /dev/null
|
|
||||||
mkdir -p monero/build/release
|
|
||||||
pushd monero/build/release
|
|
||||||
cmake -D IOS=ON -D ARCH=armv7 -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../..
|
|
||||||
make -j4 && make install
|
|
||||||
popd
|
|
||||||
echo "Building IOS arm64"
|
|
||||||
rm -r monero/build > /dev/null
|
|
||||||
mkdir -p monero/build/release
|
|
||||||
pushd monero/build/release
|
|
||||||
cmake -D IOS=ON -D ARCH=armv8-a -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../..
|
|
||||||
make -j4 && make install
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo "Creating fat library for armv7 and arm64"
|
|
||||||
pushd monero
|
|
||||||
mkdir -p lib-ios
|
|
||||||
lipo -create lib-armv7/libwallet_merged.a lib-arm64/libwallet_merged.a -output lib-ios/libwallet_merged.a
|
|
||||||
lipo -create lib-armv7/libunbound.a lib-arm64/libunbound.a -output lib-ios/libunbound.a
|
|
||||||
lipo -create lib-armv7/libepee.a lib-arm64/libepee.a -output lib-ios/libepee.a
|
|
||||||
popd
|
|
@ -1,62 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
source $ROOT_DIR/utils.sh
|
|
||||||
|
|
||||||
TARGET=$1
|
|
||||||
|
|
||||||
GUI_EXEC=$2
|
|
||||||
|
|
||||||
platform=$(get_platform)
|
|
||||||
|
|
||||||
if [[ "$platform" == "linux64" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/x86_64-linux-gnu"
|
|
||||||
elif [[ "$platform" == "linux32" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/i386-linux-gnu"
|
|
||||||
elif [[ "$platform" == "linuxarmv7" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/arm-linux-gnueabihf"
|
|
||||||
elif [[ "$platform" == "linuxarmv8" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/aarch64-linux-gnu"
|
|
||||||
else
|
|
||||||
PLAT_DIR="/usr/lib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$QT_DIR" ]; then
|
|
||||||
QT_DIR=$PLAT_DIR/qt5
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$QTXML_DIR" ]; then
|
|
||||||
QTXML_DIR=$PLAT_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy dependencies
|
|
||||||
EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread'
|
|
||||||
INCLUDE='libunbound'
|
|
||||||
cp -rv $QT_DIR/qml $TARGET || exit
|
|
||||||
cp -rv $QT_DIR/plugins $TARGET || exit
|
|
||||||
mkdir -p $TARGET/libs || exit
|
|
||||||
#ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep $INCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
|
|
||||||
#ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
|
|
||||||
#ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
|
|
||||||
#cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit
|
|
||||||
|
|
||||||
# Create start script
|
|
||||||
cat > $TARGET/start-gui.sh <<EOL
|
|
||||||
#!/bin/bash
|
|
||||||
export LD_LIBRARY_PATH=\`pwd\`/libs
|
|
||||||
export QT_PLUGIN_PATH=\`pwd\`/plugins
|
|
||||||
export QML2_IMPORT_PATH=\`pwd\`/qml
|
|
||||||
# make it so that it can be called from anywhere and also through soft links
|
|
||||||
SCRIPT_DIR="\$(dirname "\$(test -L "\${BASH_SOURCE[0]}" && readlink "\${BASH_SOURCE[0]}" || echo "\${BASH_SOURCE[0]}")")"
|
|
||||||
"\$SCRIPT_DIR"/$GUI_EXEC "\$@"
|
|
||||||
EOL
|
|
||||||
|
|
||||||
# Create start script
|
|
||||||
cat > $TARGET/start-tails.AppImage <<EOL
|
|
||||||
#!/bin/bash
|
|
||||||
# Silly hack to provide a launcher that is double clickable
|
|
||||||
bash ./start-gui.sh
|
|
||||||
EOL
|
|
||||||
|
|
||||||
chmod +x $TARGET/start-gui.sh
|
|
||||||
chmod +x $TARGET/start-tails.AppImage
|
|
@ -1,581 +0,0 @@
|
|||||||
# qml components require at least QT 5.9.7
|
|
||||||
lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 9) {
|
|
||||||
error("Can't build with Qt $${QT_VERSION}. Use at least Qt 5.9.7")
|
|
||||||
}
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
QT += svg qml gui-private quick widgets
|
|
||||||
|
|
||||||
WALLET_ROOT=$$PWD/monero
|
|
||||||
|
|
||||||
CONFIG += c++11 link_pkgconfig
|
|
||||||
packagesExist(libusb-1.0) {
|
|
||||||
PKGCONFIG += libusb-1.0
|
|
||||||
}
|
|
||||||
packagesExist(hidapi-libusb) {
|
|
||||||
PKGCONFIG += hidapi-libusb
|
|
||||||
}
|
|
||||||
|
|
||||||
GCC_VERSION = $$system("g++ -dumpversion")
|
|
||||||
GCC_VERSION = $$split(GCC_VERSION, .)
|
|
||||||
GCC_VERSION_MAJOR = $$member(GCC_VERSION, 0)
|
|
||||||
GCC_VERSION_MINOR = $$member(GCC_VERSION, 1)
|
|
||||||
greaterThan(GCC_VERSION_MAJOR, 9) | if(equals(GCC_VERSION_MAJOR, 9) : greaterThan(GCC_VERSION_MINOR, 0)) {
|
|
||||||
GCC_9_1_OR_GREATER = TRUE
|
|
||||||
}
|
|
||||||
|
|
||||||
!win32 | !isEmpty(GCC_9_1_OR_GREATER) {
|
|
||||||
QMAKE_CXXFLAGS += -fPIC -fstack-protector -fstack-protector-strong
|
|
||||||
QMAKE_LFLAGS += -fstack-protector -fstack-protector-strong
|
|
||||||
}
|
|
||||||
|
|
||||||
!win32 {
|
|
||||||
packagesExist(protobuf) {
|
|
||||||
PKGCONFIG += protobuf
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# cleaning "auto-generated" bitmonero directory on "make distclean"
|
|
||||||
QMAKE_DISTCLEAN += -r $$WALLET_ROOT
|
|
||||||
|
|
||||||
INCLUDEPATH += $$WALLET_ROOT/include \
|
|
||||||
$$PWD/src/libwalletqt \
|
|
||||||
$$PWD/src/QR-Code-generator \
|
|
||||||
$$PWD/src \
|
|
||||||
$$WALLET_ROOT/src \
|
|
||||||
$$WALLET_ROOT/external/easylogging++ \
|
|
||||||
$$WALLET_ROOT/contrib/epee/include
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
src/main/filter.h \
|
|
||||||
src/main/clipboardAdapter.h \
|
|
||||||
src/main/oscursor.h \
|
|
||||||
src/libwalletqt/WalletManager.h \
|
|
||||||
src/libwalletqt/Wallet.h \
|
|
||||||
src/libwalletqt/PassphraseHelper.h \
|
|
||||||
src/libwalletqt/PendingTransaction.h \
|
|
||||||
src/libwalletqt/TransactionHistory.h \
|
|
||||||
src/libwalletqt/TransactionInfo.h \
|
|
||||||
src/libwalletqt/QRCodeImageProvider.h \
|
|
||||||
src/libwalletqt/Transfer.h \
|
|
||||||
src/NetworkType.h \
|
|
||||||
src/main/oshelper.h \
|
|
||||||
src/TranslationManager.h \
|
|
||||||
src/model/TransactionHistoryModel.h \
|
|
||||||
src/model/TransactionHistorySortFilterModel.h \
|
|
||||||
src/QR-Code-generator/BitBuffer.hpp \
|
|
||||||
src/QR-Code-generator/QrCode.hpp \
|
|
||||||
src/QR-Code-generator/QrSegment.hpp \
|
|
||||||
src/model/AddressBookModel.h \
|
|
||||||
src/libwalletqt/AddressBook.h \
|
|
||||||
src/model/SubaddressModel.h \
|
|
||||||
src/libwalletqt/Subaddress.h \
|
|
||||||
src/model/SubaddressAccountModel.h \
|
|
||||||
src/libwalletqt/SubaddressAccount.h \
|
|
||||||
src/zxcvbn-c/zxcvbn.h \
|
|
||||||
src/libwalletqt/UnsignedTransaction.h \
|
|
||||||
src/main/Logger.h \
|
|
||||||
src/main/MainApp.h \
|
|
||||||
src/qt/downloader.h \
|
|
||||||
src/qt/FutureScheduler.h \
|
|
||||||
src/qt/ipc.h \
|
|
||||||
src/qt/KeysFiles.h \
|
|
||||||
src/qt/network.h \
|
|
||||||
src/qt/utils.h \
|
|
||||||
src/qt/macoshelper.h \
|
|
||||||
src/qt/MoneroSettings.h \
|
|
||||||
src/qt/TailsOS.h
|
|
||||||
|
|
||||||
SOURCES += src/main/main.cpp \
|
|
||||||
src/main/filter.cpp \
|
|
||||||
src/main/clipboardAdapter.cpp \
|
|
||||||
src/main/oscursor.cpp \
|
|
||||||
src/libwalletqt/WalletManager.cpp \
|
|
||||||
src/libwalletqt/WalletListenerImpl.cpp \
|
|
||||||
src/libwalletqt/Wallet.cpp \
|
|
||||||
src/libwalletqt/PassphraseHelper.cpp \
|
|
||||||
src/libwalletqt/PendingTransaction.cpp \
|
|
||||||
src/libwalletqt/TransactionHistory.cpp \
|
|
||||||
src/libwalletqt/TransactionInfo.cpp \
|
|
||||||
src/libwalletqt/QRCodeImageProvider.cpp \
|
|
||||||
src/main/oshelper.cpp \
|
|
||||||
src/openpgp/openpgp.cpp \
|
|
||||||
src/TranslationManager.cpp \
|
|
||||||
src/model/TransactionHistoryModel.cpp \
|
|
||||||
src/model/TransactionHistorySortFilterModel.cpp \
|
|
||||||
src/QR-Code-generator/BitBuffer.cpp \
|
|
||||||
src/QR-Code-generator/QrCode.cpp \
|
|
||||||
src/QR-Code-generator/QrSegment.cpp \
|
|
||||||
src/model/AddressBookModel.cpp \
|
|
||||||
src/libwalletqt/AddressBook.cpp \
|
|
||||||
src/model/SubaddressModel.cpp \
|
|
||||||
src/libwalletqt/Subaddress.cpp \
|
|
||||||
src/model/SubaddressAccountModel.cpp \
|
|
||||||
src/libwalletqt/SubaddressAccount.cpp \
|
|
||||||
src/zxcvbn-c/zxcvbn.c \
|
|
||||||
src/libwalletqt/UnsignedTransaction.cpp \
|
|
||||||
src/main/Logger.cpp \
|
|
||||||
src/main/MainApp.cpp \
|
|
||||||
src/qt/downloader.cpp \
|
|
||||||
src/qt/FutureScheduler.cpp \
|
|
||||||
src/qt/ipc.cpp \
|
|
||||||
src/qt/KeysFiles.cpp \
|
|
||||||
src/qt/network.cpp \
|
|
||||||
src/qt/updater.cpp \
|
|
||||||
src/qt/utils.cpp \
|
|
||||||
src/qt/MoneroSettings.cpp \
|
|
||||||
src/qt/TailsOS.cpp
|
|
||||||
|
|
||||||
CONFIG(DISABLE_PASS_STRENGTH_METER) {
|
|
||||||
HEADERS -= src/zxcvbn-c/zxcvbn.h
|
|
||||||
SOURCES -= src/zxcvbn-c/zxcvbn.c
|
|
||||||
DEFINES += "DISABLE_PASS_STRENGTH_METER"
|
|
||||||
}
|
|
||||||
|
|
||||||
!ios {
|
|
||||||
HEADERS += src/daemon/DaemonManager.h
|
|
||||||
SOURCES += src/daemon/DaemonManager.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
lupdate_only {
|
|
||||||
SOURCES = *.qml \
|
|
||||||
components/*.qml \
|
|
||||||
components/effects/*.qml \
|
|
||||||
pages/*.qml \
|
|
||||||
pages/settings/*.qml \
|
|
||||||
pages/merchant/*.qml \
|
|
||||||
wizard/*.qml \
|
|
||||||
wizard/*js
|
|
||||||
}
|
|
||||||
|
|
||||||
# Linker flags required by Trezor
|
|
||||||
TREZOR_LINKER = $$cat($$WALLET_ROOT/lib/trezor_link_flags.txt)
|
|
||||||
|
|
||||||
ios:armv7 {
|
|
||||||
message("target is armv7")
|
|
||||||
LIBS += \
|
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/armv7 \
|
|
||||||
}
|
|
||||||
ios:arm64 {
|
|
||||||
message("target is arm64")
|
|
||||||
LIBS += \
|
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBS_COMMON = \
|
|
||||||
-lgcrypt \
|
|
||||||
-lgpg-error \
|
|
||||||
-lwallet_merged \
|
|
||||||
-llmdb \
|
|
||||||
-lepee \
|
|
||||||
-lunbound \
|
|
||||||
-lsodium \
|
|
||||||
-leasylogging \
|
|
||||||
-lrandomx
|
|
||||||
|
|
||||||
!ios:!android {
|
|
||||||
LIBS += -L$$WALLET_ROOT/lib \
|
|
||||||
$$LIBS_COMMON
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
message("Host is Android")
|
|
||||||
LIBS += -L$$WALLET_ROOT/lib \
|
|
||||||
$$LIBS_COMMON
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -Werror -Wformat -Wformat-security
|
|
||||||
QMAKE_CFLAGS += -Werror -Wformat -Wformat-security
|
|
||||||
QMAKE_CXXFLAGS_RELEASE += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2
|
|
||||||
QMAKE_CFLAGS_RELEASE += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2
|
|
||||||
|
|
||||||
ios {
|
|
||||||
message("Host is IOS")
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -v
|
|
||||||
QMAKE_IOS_DEVICE_ARCHS = arm64
|
|
||||||
CONFIG += arm64
|
|
||||||
LIBS += -L$$WALLET_ROOT/lib-ios \
|
|
||||||
$$LIBS_COMMON
|
|
||||||
|
|
||||||
LIBS+= \
|
|
||||||
-L$$PWD/../OpenSSL-for-iPhone/lib \
|
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
|
||||||
-lboost_serialization \
|
|
||||||
-lboost_thread \
|
|
||||||
-lboost_system \
|
|
||||||
-lboost_date_time \
|
|
||||||
-lboost_filesystem \
|
|
||||||
-lboost_regex \
|
|
||||||
-lboost_chrono \
|
|
||||||
-lboost_program_options \
|
|
||||||
-lssl \
|
|
||||||
-lcrypto \
|
|
||||||
-ldl
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG(WITH_SCANNER) {
|
|
||||||
if( greaterThan(QT_MINOR_VERSION, 5) ) {
|
|
||||||
message("using camera scanner")
|
|
||||||
QT += multimedia
|
|
||||||
DEFINES += "WITH_SCANNER"
|
|
||||||
INCLUDEPATH += $$PWD/src/QR-Code-scanner
|
|
||||||
HEADERS += \
|
|
||||||
src/QR-Code-scanner/QrScanThread.h \
|
|
||||||
src/QR-Code-scanner/QrCodeScanner.h
|
|
||||||
SOURCES += \
|
|
||||||
src/QR-Code-scanner/QrScanThread.cpp \
|
|
||||||
src/QR-Code-scanner/QrCodeScanner.cpp
|
|
||||||
android {
|
|
||||||
INCLUDEPATH += $$PWD/../ZBar/include
|
|
||||||
LIBS += -lzbarjni -liconv
|
|
||||||
} else {
|
|
||||||
LIBS += -lzbar
|
|
||||||
macx {
|
|
||||||
ZBAR_DIR = $$system(brew --prefix zbar, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$ZBAR_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message("Skipping camera scanner because of Incompatible Qt Version !")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# currently we only support x86 build as qt.io only provides prebuilt qt for x86 mingw
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
|
|
||||||
# QMAKE_HOST.arch is unreliable, will allways report 32bit if mingw32 shell is run.
|
|
||||||
# Obtaining arch through uname should be reliable. This also fixes building the project in Qt creator without changes.
|
|
||||||
MSYS_HOST_ARCH = $$system(uname -a | grep -o "x86_64")
|
|
||||||
|
|
||||||
# WIN64 Host settings
|
|
||||||
contains(MSYS_HOST_ARCH, x86_64) {
|
|
||||||
message("Host is 64bit")
|
|
||||||
MSYS_ROOT_PATH=c:/msys64
|
|
||||||
|
|
||||||
# WIN32 Host settings
|
|
||||||
} else {
|
|
||||||
message("Host is 32bit")
|
|
||||||
MSYS_ROOT_PATH=c:/msys32
|
|
||||||
}
|
|
||||||
|
|
||||||
# WIN64 Target settings
|
|
||||||
contains(QMAKE_HOST.arch, x86_64) {
|
|
||||||
MSYS_MINGW_PATH=/mingw64
|
|
||||||
|
|
||||||
# WIN32 Target settings
|
|
||||||
} else {
|
|
||||||
MSYS_MINGW_PATH=/mingw32
|
|
||||||
}
|
|
||||||
|
|
||||||
MSYS_PATH=$$MSYS_ROOT_PATH$$MSYS_MINGW_PATH
|
|
||||||
|
|
||||||
# boost root path
|
|
||||||
BOOST_PATH=$$MSYS_PATH/boost
|
|
||||||
BOOST_MINGW_PATH=$$MSYS_MINGW_PATH/boost
|
|
||||||
|
|
||||||
LIBS+=-L$$MSYS_PATH/lib
|
|
||||||
LIBS+=-L$$MSYS_MINGW_PATH/lib
|
|
||||||
LIBS+=-L$$BOOST_PATH/lib
|
|
||||||
LIBS+=-L$$BOOST_MINGW_PATH/lib
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
|
|
||||||
|
|
||||||
LIBS+= \
|
|
||||||
-Wl,-Bdynamic \
|
|
||||||
-lwinscard \
|
|
||||||
-lwsock32 \
|
|
||||||
-lIphlpapi \
|
|
||||||
-lcrypt32 \
|
|
||||||
-lhidapi \
|
|
||||||
-lgdi32 $$TREZOR_LINKER \
|
|
||||||
-Wl,-Bstatic \
|
|
||||||
-lboost_serialization-mt \
|
|
||||||
-lboost_thread-mt \
|
|
||||||
-lboost_system-mt \
|
|
||||||
-lboost_date_time-mt \
|
|
||||||
-lboost_filesystem-mt \
|
|
||||||
-lboost_regex-mt \
|
|
||||||
-lboost_chrono-mt \
|
|
||||||
-lboost_program_options-mt \
|
|
||||||
-lboost_locale-mt \
|
|
||||||
-licuio \
|
|
||||||
-licuin \
|
|
||||||
-licuuc \
|
|
||||||
-licudt \
|
|
||||||
-licutu \
|
|
||||||
-liconv \
|
|
||||||
-lstdc++ \
|
|
||||||
-lpthread \
|
|
||||||
-lsetupapi \
|
|
||||||
-lssl \
|
|
||||||
-lsodium \
|
|
||||||
-lcrypto \
|
|
||||||
-lws2_32 \
|
|
||||||
-lole32
|
|
||||||
|
|
||||||
!contains(QMAKE_TARGET.arch, x86_64) {
|
|
||||||
message("Target is 32bit")
|
|
||||||
## Windows x86 (32bit) specific build here
|
|
||||||
## there's 2Mb stack in libwallet allocated internally, so we set stack=4Mb
|
|
||||||
## this fixes app crash for x86 Windows build
|
|
||||||
QMAKE_LFLAGS += -Wl,--stack,4194304
|
|
||||||
} else {
|
|
||||||
message("Target is 64bit")
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat
|
|
||||||
}
|
|
||||||
|
|
||||||
linux {
|
|
||||||
CONFIG(static) {
|
|
||||||
message("using static libraries")
|
|
||||||
LIBS+= -Wl,-Bstatic
|
|
||||||
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
|
|
||||||
QMAKE_LIBDIR += /usr/local/ssl/lib
|
|
||||||
# contains(QT_ARCH, x86_64) {
|
|
||||||
LIBS+= -lunbound \
|
|
||||||
-lusb-1.0 \
|
|
||||||
-lhidapi-hidraw \
|
|
||||||
-ludev
|
|
||||||
# }
|
|
||||||
} else {
|
|
||||||
# On some distro's we need to add dynload
|
|
||||||
LIBS+= -ldl
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBS+= \
|
|
||||||
-lboost_serialization \
|
|
||||||
-lboost_thread \
|
|
||||||
-lboost_system \
|
|
||||||
-lboost_date_time \
|
|
||||||
-lboost_filesystem \
|
|
||||||
-lboost_regex \
|
|
||||||
-lboost_chrono \
|
|
||||||
-lboost_program_options \
|
|
||||||
-lssl \
|
|
||||||
-llmdb \
|
|
||||||
-lsodium \
|
|
||||||
-lhidapi-libusb \
|
|
||||||
-lcrypto $$TREZOR_LINKER
|
|
||||||
|
|
||||||
if(!android) {
|
|
||||||
LIBS+= \
|
|
||||||
-Wl,-Bdynamic \
|
|
||||||
-lGL \
|
|
||||||
-lX11
|
|
||||||
}
|
|
||||||
# currently monero has an issue with "static" build and linunwind-dev,
|
|
||||||
# so we link libunwind-dev only for non-Ubuntu distros
|
|
||||||
CONFIG(libunwind_off) {
|
|
||||||
message(Building without libunwind)
|
|
||||||
} else {
|
|
||||||
message(Building with libunwind)
|
|
||||||
LIBS += -Wl,-Bdynamic -lunwind
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack
|
|
||||||
}
|
|
||||||
|
|
||||||
macx {
|
|
||||||
# mixing static and shared libs are not supported on mac
|
|
||||||
# CONFIG(static) {
|
|
||||||
# message("using static libraries")
|
|
||||||
# LIBS+= -Wl,-Bstatic
|
|
||||||
# }
|
|
||||||
|
|
||||||
OPENSSL_DIR = $$system(brew --prefix openssl, lines, EXIT_CODE)
|
|
||||||
!equals(EXIT_CODE, 0) {
|
|
||||||
OPENSSL_DIR = /usr/local/ssl
|
|
||||||
}
|
|
||||||
OPENSSL_LIBRARY_DIR = $$OPENSSL_DIR/lib
|
|
||||||
INCLUDEPATH += $$OPENSSL_DIR/include
|
|
||||||
|
|
||||||
BOOST_DIR = $$system(brew --prefix boost, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$BOOST_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
GCRYPT_DIR = $$system(brew --prefix libgcrypt, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$GCRYPT_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
GPGP_ERROR_DIR = $$system(brew --prefix libgpg-error, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$GPGP_ERROR_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
SODIUM_DIR = $$system(brew --prefix libsodium, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$SODIUM_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
QT += macextras
|
|
||||||
OBJECTIVE_SOURCES += src/qt/macoshelper.mm
|
|
||||||
LIBS+= -Wl,-dead_strip
|
|
||||||
LIBS+= -Wl,-dead_strip_dylibs
|
|
||||||
LIBS+= -Wl,-bind_at_load
|
|
||||||
LIBS+= \
|
|
||||||
-L/usr/local/lib \
|
|
||||||
-L$$OPENSSL_LIBRARY_DIR \
|
|
||||||
-L/usr/local/opt/boost/lib \
|
|
||||||
-lboost_serialization \
|
|
||||||
-lboost_thread-mt \
|
|
||||||
-lboost_system \
|
|
||||||
-lboost_date_time \
|
|
||||||
-lboost_filesystem \
|
|
||||||
-lboost_regex \
|
|
||||||
-lboost_chrono \
|
|
||||||
-lboost_program_options \
|
|
||||||
-framework CoreFoundation \
|
|
||||||
-framework AppKit \
|
|
||||||
-lhidapi \
|
|
||||||
-lssl \
|
|
||||||
-lsodium \
|
|
||||||
-lcrypto \
|
|
||||||
-ldl $$TREZOR_LINKER
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -pie
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# translation stuff
|
|
||||||
TRANSLATIONS = $$files($$PWD/translations/monero-core_*.ts)
|
|
||||||
|
|
||||||
CONFIG(release, debug|release) {
|
|
||||||
DESTDIR = release/bin
|
|
||||||
LANGUPD_OPTIONS = -locations none -no-ui-lines -no-obsolete
|
|
||||||
LANGREL_OPTIONS = -compress -nounfinished -removeidentical
|
|
||||||
|
|
||||||
} else {
|
|
||||||
DESTDIR = debug/bin
|
|
||||||
LANGUPD_OPTIONS =
|
|
||||||
# LANGREL_OPTIONS = -markuntranslated "MISS_TR "
|
|
||||||
}
|
|
||||||
|
|
||||||
TRANSLATION_TARGET_DIR = $$OUT_PWD/translations
|
|
||||||
|
|
||||||
!ios {
|
|
||||||
isEmpty(QMAKE_LUPDATE) {
|
|
||||||
win32:LANGUPD = $$[QT_INSTALL_BINS]\lupdate.exe
|
|
||||||
else:LANGUPD = $$[QT_INSTALL_BINS]/lupdate
|
|
||||||
}
|
|
||||||
|
|
||||||
isEmpty(QMAKE_LRELEASE) {
|
|
||||||
win32:LANGREL = $$[QT_INSTALL_BINS]\lrelease.exe
|
|
||||||
else:LANGREL = $$[QT_INSTALL_BINS]/lrelease
|
|
||||||
}
|
|
||||||
|
|
||||||
langupd.command = \
|
|
||||||
$$LANGUPD $$LANGUPD_OPTIONS $$shell_path($$_PRO_FILE) -ts $$_PRO_FILE_PWD/$$TRANSLATIONS
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
langrel.depends = langupd
|
|
||||||
langrel.input = TRANSLATIONS
|
|
||||||
langrel.output = $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
|
|
||||||
langrel.commands = \
|
|
||||||
$$LANGREL $$LANGREL_OPTIONS ${QMAKE_FILE_IN} -qm $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
|
|
||||||
langrel.CONFIG += no_link
|
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += langupd deploy deploy_win
|
|
||||||
QMAKE_EXTRA_COMPILERS += langrel
|
|
||||||
|
|
||||||
# Compile an initial version of translation files when running qmake
|
|
||||||
# the first time and generate the resource file for translations.
|
|
||||||
!exists($$TRANSLATION_TARGET_DIR) {
|
|
||||||
mkpath($$TRANSLATION_TARGET_DIR)
|
|
||||||
}
|
|
||||||
qrc_entry = "<RCC>"
|
|
||||||
qrc_entry += ' <qresource prefix="/">'
|
|
||||||
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry)
|
|
||||||
for(tsfile, TRANSLATIONS) {
|
|
||||||
qmfile = $$TRANSLATION_TARGET_DIR/$$basename(tsfile)
|
|
||||||
qmfile ~= s/.ts$/.qm/
|
|
||||||
system($$LANGREL $$LANGREL_OPTIONS $$tsfile -qm $$qmfile)
|
|
||||||
qrc_entry = " <file>$$basename(qmfile)</file>"
|
|
||||||
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry, append)
|
|
||||||
}
|
|
||||||
qrc_entry = " </qresource>"
|
|
||||||
qrc_entry += "</RCC>"
|
|
||||||
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry, append)
|
|
||||||
RESOURCES += $$TRANSLATION_TARGET_DIR/translations.qrc
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Update: no issues with the "slow link process" anymore,
|
|
||||||
# for development, just build debug version of libwallet_merged lib
|
|
||||||
# by invoking 'get_libwallet_api.sh Debug'
|
|
||||||
# so we update translations everytime even for debug build
|
|
||||||
|
|
||||||
PRE_TARGETDEPS += langupd compiler_langrel_make_all
|
|
||||||
|
|
||||||
RESOURCES += qml.qrc
|
|
||||||
CONFIG += qtquickcompiler
|
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
|
||||||
QML_IMPORT_PATH = fonts
|
|
||||||
|
|
||||||
# Default rules for deployment.
|
|
||||||
include(deployment.pri)
|
|
||||||
macx {
|
|
||||||
deploy.commands += macdeployqt $$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET) -qmldir=$$PWD
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
deploy.commands += windeployqt $$sprintf("%1/%2/%3.exe", $$OUT_PWD, $$DESTDIR, $$TARGET) -no-translations -qmldir=$$PWD
|
|
||||||
# Win64 msys2 deploy settings
|
|
||||||
contains(QMAKE_HOST.arch, x86_64) {
|
|
||||||
deploy.commands += $$escape_expand(\n\t) $$PWD/windeploy_helper.sh $$DESTDIR
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
linux:!android {
|
|
||||||
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 += \
|
|
||||||
.gitignore \
|
|
||||||
$$TRANSLATIONS
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
notes.txt \
|
|
||||||
monero/src/wallet/CMakeLists.txt
|
|
||||||
|
|
||||||
VERSION = $$cat('version.js', lines)
|
|
||||||
VERSION = $$find(VERSION, 'GUI_VERSION')
|
|
||||||
VERSION_LONG = $$replace(VERSION, '.*\"(.*)\"', '\1')
|
|
||||||
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
|
|
||||||
|
|
||||||
# windows application icon
|
|
||||||
RC_ICONS = images/appicon.ico
|
|
||||||
|
|
||||||
# mac Info.plist & application icon
|
|
||||||
QMAKE_INFO_PLIST = $$PWD/share/Info.plist
|
|
||||||
macx {
|
|
||||||
QMAKE_POST_LINK += sed -i "''" -e "s/@VERSION@/$$VERSION/g" -e "s/@VERSION_LONG@/$$VERSION_LONG/g" "$$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET)/Contents/Info.plist";
|
|
||||||
}
|
|
||||||
ICON = $$PWD/images/appicon.icns
|
|
74
utils.sh
74
utils.sh
@ -1,74 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
function get_platform {
|
|
||||||
local platform="unknown"
|
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
|
||||||
platform="darwin"
|
|
||||||
elif [ "$(uname)" == "FreeBSD" ]; then
|
|
||||||
platform="freebsd"
|
|
||||||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
|
||||||
if [ "$(expr substr $(uname -m) 1 6)" == "x86_64" ]; then
|
|
||||||
platform="linux64"
|
|
||||||
elif [ "$(expr substr $(uname -m) 1 4)" == "i686" ]; then
|
|
||||||
platform="linux32"
|
|
||||||
elif [ "$(expr substr $(uname -m) 1 6)" == "armv7l" ]; then
|
|
||||||
platform="linuxarmv7"
|
|
||||||
elif [ "$(expr substr $(uname -m) 1 7)" == "aarch64" ]; then
|
|
||||||
platform="linuxarmv8"
|
|
||||||
else
|
|
||||||
platform="linux"
|
|
||||||
fi
|
|
||||||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
|
|
||||||
platform="mingw64"
|
|
||||||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
|
|
||||||
platform="mingw32"
|
|
||||||
fi
|
|
||||||
echo "$platform"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function get_tag()
|
|
||||||
{
|
|
||||||
COMMIT=$(git rev-parse --short HEAD | sed -e 's/[\t ]*//')
|
|
||||||
if test $? -ne 0
|
|
||||||
then
|
|
||||||
echo "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive."
|
|
||||||
VERSIONTAG="unknown"
|
|
||||||
else
|
|
||||||
echo "You are currently on commit ${COMMIT}"
|
|
||||||
TAGGEDCOMMIT=$(git rev-list --tags --max-count=1 --abbrev-commit | sed -e 's/[\t ]*//')
|
|
||||||
if test -z "$TAGGEDCOMMIT"
|
|
||||||
then
|
|
||||||
echo "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive."
|
|
||||||
VERSIONTAG=$COMMIT
|
|
||||||
else
|
|
||||||
echo "The most recent tag was at ${TAGGEDCOMMIT}"
|
|
||||||
if test "$TAGGEDCOMMIT" = "$COMMIT"
|
|
||||||
then
|
|
||||||
echo "You are building a tagged release"
|
|
||||||
VERSIONTAG="release"
|
|
||||||
else
|
|
||||||
echo "You are ahead of or behind a tagged release"
|
|
||||||
VERSIONTAG="$COMMIT"
|
|
||||||
fi
|
|
||||||
# save tag name + commit if availible
|
|
||||||
TAGNAME=$(git describe --tags | sed -e 's/[\t ]*//')
|
|
||||||
if test -z "$TAGNAME"
|
|
||||||
then
|
|
||||||
TAGNAME="$VERSIONTAG"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
source $ROOT_DIR/utils.sh
|
|
||||||
|
|
||||||
|
|
||||||
TARGET=$1
|
|
||||||
|
|
||||||
BUILD_TYPE=$2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -z $BUILD_TYPE ]]; then
|
|
||||||
BUILD_TYPE=Release
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$BUILD_TYPE" == "Release" ]]; then
|
|
||||||
echo "Release build"
|
|
||||||
ICU_FILES=(libicudt67.dll libicuin67.dll libicuio67.dll libicutu67.dll libicuuc67.dll)
|
|
||||||
else
|
|
||||||
echo "Debug build"
|
|
||||||
ICU_FILES=(libicudtd67.dll libicuind67.dll libicuiod67.dll libicutud67.dll libicuucd67.dll)
|
|
||||||
fi
|
|
||||||
|
|
||||||
FILES=(libprotobuf.dll libbrotlicommon.dll libbrotlidec.dll libusb-1.0.dll zlib1.dll libzstd.dll libwinpthread-1.dll libtiff-5.dll libstdc++-6.dll libpng16-16.dll libpcre16-0.dll libpcre-1.dll libmng-2.dll liblzma-5.dll liblcms2-2.dll libjpeg-8.dll libintl-8.dll libiconv-2.dll libharfbuzz-0.dll libgraphite2.dll libglib-2.0-0.dll libfreetype-6.dll libbz2-1.dll libssp-0.dll libpcre2-16-0.dll libhidapi-0.dll libdouble-conversion.dll libgcrypt-20.dll)
|
|
||||||
|
|
||||||
OPENSSL_FILES=(libssl-1_1 libcrypto-1_1)
|
|
||||||
|
|
||||||
platform=$(get_platform)
|
|
||||||
|
|
||||||
if [[ "$platform" == "mingw64" ]]; then
|
|
||||||
PLATFORM_FILES="libgcc_s_seh-1.dll"
|
|
||||||
OPENSSL_SUFFIX="-x64"
|
|
||||||
elif [[ "$platform" == "mingw32" ]]; then
|
|
||||||
PLATFORM_FILES="libgcc_s_dw2-1.dll"
|
|
||||||
OPENSSL_SUFFIX = ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
for f in "${FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
|
||||||
|
|
||||||
for f in "${ICU_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
|
||||||
|
|
||||||
for f in "${PLATFORM_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
|
||||||
|
|
||||||
for f in "${OPENSSL_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f$OPENSSL_SUFFIX.dll $TARGET || exit 1; done
|
|
||||||
|
|
||||||
cp $ROOT_DIR/start-low-graphics-mode.bat $TARGET
|
|
Loading…
Reference in New Issue
Block a user