diff --git a/get_libwallet_api.sh b/get_libwallet_api.sh index 9b42cfce..96e0ac41 100755 --- a/get_libwallet_api.sh +++ b/get_libwallet_api.sh @@ -122,8 +122,8 @@ rm -fr $MONERO_DIR/include rm -fr $MONERO_DIR/bin -mkdir -p $MONERO_DIR/build/release -pushd $MONERO_DIR/build/release +mkdir -p $MONERO_DIR/build/$BUILD_TYPE +pushd $MONERO_DIR/build/$BUILD_TYPE # reusing function from "utils.sh" platform=$(get_platform) @@ -209,7 +209,7 @@ if test -z "$CPU_CORE_COUNT"; then fi # Build libwallet_merged -pushd $MONERO_DIR/build/release/src/wallet +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 @@ -218,21 +218,21 @@ popd # Build monerod # win32 need to build daemon manually with msys2 toolchain if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then - pushd $MONERO_DIR/build/release/src/daemon + 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/release/contrib/epee all install +eval make -C $MONERO_DIR/build/$BUILD_TYPE/contrib/epee all install # install easylogging -eval make -C $MONERO_DIR/build/release/external/easylogging++ all install +eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/easylogging++ all install -# Install libunwind +# Install libunbound echo "Installing libunbound..." -pushd $MONERO_DIR/build/release/external/unbound +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 diff --git a/main.cpp b/main.cpp index 08bcb9e3..fba82fec 100644 --- a/main.cpp +++ b/main.cpp @@ -255,7 +255,17 @@ int main(int argc, char *argv[]) // Load main window (context properties needs to be defined obove this line) engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); + if (engine.rootObjects().isEmpty()) + { + qCritical() << "Error: no root objects"; + return 1; + } QObject *rootObject = engine.rootObjects().first(); + if (!rootObject) + { + qCritical() << "Error: no root objects"; + return 1; + } #ifdef WITH_SCANNER QObject *qmlCamera = rootObject->findChild("qrCameraQML"); diff --git a/monero-wallet-gui.pro b/monero-wallet-gui.pro index de61101f..f064a849 100644 --- a/monero-wallet-gui.pro +++ b/monero-wallet-gui.pro @@ -116,6 +116,8 @@ android { +QMAKE_CXXFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wformat -Wformat-security -fstack-protector -fstack-protector-strong +QMAKE_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wformat -Wformat-security -fstack-protector -fstack-protector-strong ios { message("Host is IOS") @@ -236,6 +238,7 @@ win32 { message("Target is 64bit") } + QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat } linux { @@ -276,6 +279,8 @@ linux { message(Building with libunwind) LIBS += -Wl,-Bdynamic -lunwind } + + QMAKE_LFLAGS += -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack } macx { @@ -300,6 +305,7 @@ macx { -lcrypto \ -ldl + QMAKE_LFLAGS += -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack }