From f39b07dec3bfef91a80b753bc1cf5d989ec2e669 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 22 Dec 2018 09:45:33 -0800 Subject: Android: cleanup build wrapper script This way it can be run both to create the docker container or independently for a full build. Signed-off-by: Dirk Hohndel --- packaging/android/android-build-wrapper.sh | 11 ++--- packaging/android/qt-installer-noninteractive.qs | 60 ++++++++++++++++++++++++ qt-installer-noninteractive.qs | 60 ------------------------ 3 files changed, 65 insertions(+), 66 deletions(-) create mode 100644 packaging/android/qt-installer-noninteractive.qs delete mode 100644 qt-installer-noninteractive.qs diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh index 65ea17198..e6b43d1e4 100755 --- a/packaging/android/android-build-wrapper.sh +++ b/packaging/android/android-build-wrapper.sh @@ -35,7 +35,8 @@ while [[ $# -gt 0 ]] ; do done # these are the current versions for Qt, Android SDK & NDK: -source subsurface/packaging/android/variables.sh +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" +source "$SCRIPTDIR"/variables.sh # avoid timeouts on Travis when downloads take a long time SLOW_PROG="" @@ -51,9 +52,7 @@ fi PLATFORM=$(uname) -pushd $(dirname "$0")/../../ -export SUBSURFACE_SOURCE=$PWD -popd +export SUBSURFACE_SOURCE="$SCRIPTDIR"/../.. if [ "$PLATFORM" = Linux ] ; then QT_BINARIES=qt-opensource-linux-x64-${LATEST_QT}.run @@ -122,13 +121,13 @@ if [ ! -d Qt/"${LATEST_QT}"/android_armv7 ] ; then $SLOW_PROG wget -q "${QT_DOWNLOAD_URL}" fi chmod +x ./"${QT_BINARIES}" - ./"${QT_BINARIES}" --platform minimal --script "$SUBSURFACE_SOURCE"/qt-installer-noninteractive.qs --no-force-installations + ./"${QT_BINARIES}" --platform minimal --script "$SCRIPTDIR"/qt-installer-noninteractive.qs --no-force-installations -v fi # patch the cmake / Qt5.7.1 incompatibility mentioned above sed -i 's/set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)/# set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)/' Qt/"${LATEST_QT}"/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake -if [ ! -z $PREP_ONLY ] ; then +if [ ! -z ${PREP_ONLY+x} ] ; then exit 0 fi diff --git a/packaging/android/qt-installer-noninteractive.qs b/packaging/android/qt-installer-noninteractive.qs new file mode 100644 index 000000000..b0ec88022 --- /dev/null +++ b/packaging/android/qt-installer-noninteractive.qs @@ -0,0 +1,60 @@ +// http://stackoverflow.com/a/34032216/78204 + +function Controller() { + installer.autoRejectMessageBoxes(); + installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); + installer.installationFinished.connect(function() { + gui.clickButton(buttons.NextButton); + }) +} + +Controller.prototype.WelcomePageCallback = function() { + gui.clickButton(buttons.NextButton,3000); +} + +Controller.prototype.CredentialsPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.IntroductionPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.TargetDirectoryPageCallback = function() +{ + //gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt"); + gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("InstallerDirPath") + "/Qt"); + //gui.currentPageWidget().TargetDirectoryLineEdit.setText("/scratch/Qt"); + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ComponentSelectionPageCallback = function() { + var widget = gui.currentPageWidget(); + + widget.deselectAll(); + widget.selectComponent('qt.qt5.5111.android_armv7'); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.LicenseAgreementPageCallback = function() { + gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.StartMenuDirectoryPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ReadyForInstallationPageCallback = function() +{ + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.FinishedPageCallback = function() { +var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm +if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { + checkBoxForm.launchQtCreatorCheckBox.checked = false; +} + gui.clickButton(buttons.FinishButton); +} diff --git a/qt-installer-noninteractive.qs b/qt-installer-noninteractive.qs deleted file mode 100644 index b0ec88022..000000000 --- a/qt-installer-noninteractive.qs +++ /dev/null @@ -1,60 +0,0 @@ -// http://stackoverflow.com/a/34032216/78204 - -function Controller() { - installer.autoRejectMessageBoxes(); - installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); - installer.installationFinished.connect(function() { - gui.clickButton(buttons.NextButton); - }) -} - -Controller.prototype.WelcomePageCallback = function() { - gui.clickButton(buttons.NextButton,3000); -} - -Controller.prototype.CredentialsPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.IntroductionPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.TargetDirectoryPageCallback = function() -{ - //gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt"); - gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("InstallerDirPath") + "/Qt"); - //gui.currentPageWidget().TargetDirectoryLineEdit.setText("/scratch/Qt"); - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.ComponentSelectionPageCallback = function() { - var widget = gui.currentPageWidget(); - - widget.deselectAll(); - widget.selectComponent('qt.qt5.5111.android_armv7'); - - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.LicenseAgreementPageCallback = function() { - gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.StartMenuDirectoryPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.ReadyForInstallationPageCallback = function() -{ - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.FinishedPageCallback = function() { -var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm -if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { - checkBoxForm.launchQtCreatorCheckBox.checked = false; -} - gui.clickButton(buttons.FinishButton); -} -- cgit v1.2.3-70-g09d2