From 1b35a1ae4b01c05224fdc3b1acf70b7afdd6328c Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Mon, 25 Jul 2016 16:24:07 +0300 Subject: [PATCH] build automation script. tested on macos --- build.sh | 28 ++++++++++++++++++++++++++++ monero-core.pro | 8 ++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..5cfea74d --- /dev/null +++ b/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +pushd $(pwd) +ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +#$SHELL get_libwallet_api.sh + +if [ ! -d build ]; then mkdir build; fi +cd build +echo $(pwd) +qmake ../monero-core.pro "CONFIG += release" +make release +make deploy +popd + + + + + + + + + + + + + + diff --git a/monero-core.pro b/monero-core.pro index db5a618f..0997d2bd 100644 --- a/monero-core.pro +++ b/monero-core.pro @@ -5,6 +5,7 @@ QT += qml quick widgets WALLET_ROOT=$$PWD/bitmonero CONFIG += c++11 +CONFIG += debug_and_release # cleaning "auto-generated" bitmonero directory on "make distclean" QMAKE_DISTCLEAN += -r $$WALLET_ROOT @@ -102,9 +103,12 @@ macx { -lssl \ -lcrypto \ -ldl + + deploy.commands += macdeployqt $$sprintf("%1/release/%2.app", $$OUT_PWD,$$TARGET) } +deploy.commands += # translations files; TRANSLATIONS = $$PWD/translations/monero-core_en.ts \ # English (could be untranslated) @@ -127,9 +131,9 @@ trans_release.depends = trans_update $$TRANSLATIONS #translate.commands = $(MKDIR) ${DESTDIR}/i18n && $(COPY) $$PWD/translations/*.qm ${DESTDIR}/i18n translate.depends = trans_release -deploy.commands = pushd $QMAKE_ -QMAKE_EXTRA_TARGETS += trans_update trans_release translate + +QMAKE_EXTRA_TARGETS += trans_update trans_release translate deploy # updating transations only in release mode as this is requires to re-link project # even if no changes were made.