chiark / gitweb /
Add qt sdk support
authorest31 <MTest31@outlook.com>
Sat, 24 Sep 2016 12:10:55 +0000 (14:10 +0200)
committerest31 <MTest31@outlook.com>
Tue, 27 Sep 2016 12:36:12 +0000 (14:36 +0200)
buildserver/Vagrantfile
buildserver/config.buildserver.py
buildserver/provision-qt-sdk [new file with mode: 0644]
docs/fdroid.texi
examples/config.py
fdroidserver/common.py
makebuildserver

index c353b5060d06b8985d5bca9cdde15530e9ff9fca..e69dcfeb63a373779b1f926bacd8671757424218 100644 (file)
@@ -70,6 +70,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision "shell", path: "provision-android-sdk"
   config.vm.provision "shell", path: "provision-android-ndk",
     args: ["/home/vagrant/android-ndk"]
+  config.vm.provision "shell", path: "provision-qt-sdk",
+    args: ["/home/vagrant/qt-sdk"]
   config.vm.provision "shell", path: "provision-pip",
     args: ["compare-locales"]
   config.vm.provision "shell", path: "provision-gradle"
index c5fc8d7ec872c8e4b4a706f4f0da57ec0ec154a0..625aafa58690d80a9fa9ef99ae264b94c4a55782 100644 (file)
@@ -5,6 +5,7 @@ ndk_paths = {
     'r11c': "/home/vagrant/android-ndk/r11c",
     'r12b': "/home/vagrant/android-ndk/r12b",
 }
+qt_sdk_path = "/home/vagrant/qt-sdk/5.7.0/5.7"
 java_paths = {
     '8': "/usr/lib/jvm/java-8-openjdk-i386",
 }
diff --git a/buildserver/provision-qt-sdk b/buildserver/provision-qt-sdk
new file mode 100644 (file)
index 0000000..cc1ec25
--- /dev/null
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+set -e
+
+QT_DIR=$1
+
+test -e $QT_DIR || mkdir -p $QT_DIR
+
+cat << EOF > $QT_DIR/5.7.0-installer.qs
+// Bases on script from http://stackoverflow.com/a/34032216
+
+function Controller() {
+    installer.autoRejectMessageBoxes();
+    installer.installationFinished.connect(function() {
+        gui.clickButton(buttons.NextButton);
+    })
+}
+
+Controller.prototype.WelcomePageCallback = function() {
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.CredentialsPageCallback = function() {
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.IntroductionPageCallback = function() {
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.TargetDirectoryPageCallback = function()
+{
+    gui.currentPageWidget().TargetDirectoryLineEdit.setText("$QT_DIR/5.7.0");
+    gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ComponentSelectionPageCallback = function() {
+    var widget = gui.currentPageWidget();
+
+    // You can get these component names by running the installer with the
+    // --verbose flag. It will then print out a resource tree.
+
+    widget.deselectAll();
+    widget.selectComponent("qt.55.gcc_64");
+    widget.selectComponent("qt.57.qtwebengine.gcc_64");
+    widget.selectComponent("qt.57.android_x86");
+    widget.selectComponent("qt.57.android_armv7");
+
+    // widget.deselectComponent("...");
+
+    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);
+}
+EOF
+
+if [ ! -e $QT_DIR/5.7.0 ]; then
+    echo "Installing Qt SDK 5.7.0 to $QT_DIR/5.7.0 ..."
+    /vagrant/cache/qt-opensource-linux-x64-android-5.7.0.run --platform minimal --script $QT_DIR/5.7.0-installer.qs --verbose
+    echo "Qt SDK 5.7.0 installation done."
+fi
+
+rm $QT_DIR/5.7.0-installer.qs
index 95bd4884d047826b0875fd288078f8429e11687b..f5b363d47fb36b5761f7404c1d88f3e6e71da423 100644 (file)
@@ -921,10 +921,10 @@ each build.
 As for 'prebuild', but runs on the source code BEFORE any other processing
 takes place.
 
-You can use $$SDK$$, $$NDK$$ and $$MVN3$$ to substitute the paths to the
-android SDK and NDK directories, and maven 3 executable respectively. The
-following per-build variables are available likewise: $$VERSION$$,
-$$VERCODE$$ and $$COMMIT$$.
+You can use $$SDK$$, $$NDK$$, $$MVN3$$ and $$QT$$ to substitute the paths
+to the android SDK and NDK directories, maven 3 executable, and Qt SDK
+directory respectively. The following per-build variables are available
+likewise: $$VERSION$$, $$VERCODE$$ and $$COMMIT$$.
 
 @item oldsdkloc=yes
 The sdk location in the repo is in an old format, or the build.xml is
index c5235ec600bc3c2e417a194924a48c327fae21e7..2e6167cc9e694385942c85709d2d2276c11347b9 100644 (file)
@@ -17,6 +17,9 @@
 #     'r12b': "$ANDROID_NDK",
 # }
 
+# Path to the Qt SDK. It is of the form "/path/to/Qt5.7.0/5.7"
+# qt_sdk_path = ""
+
 # java_paths = {
 #     '1.8': "/usr/lib/jvm/java-8-openjdk",
 # }
index ef7a1aebbcf30345f2f0a73d4f765978467f99b1..51863529ab23d198627518e2df799233b5f31369 100644 (file)
@@ -60,6 +60,7 @@ default_config = {
         'r11c': None,
         'r12b': "$ANDROID_NDK",
     },
+    'qt_sdk_path': None,
     'build_tools': "24.0.2",
     'force_build_tools': False,
     'java_paths': None,
@@ -1836,6 +1837,7 @@ def replace_config_vars(cmd, build):
     cmd = cmd.replace('$$SDK$$', config['sdk_path'])
     cmd = cmd.replace('$$NDK$$', build.ndk_path())
     cmd = cmd.replace('$$MVN3$$', config['mvn3'])
+    cmd = cmd.replace('$$QT$$', config['qt_sdk_path'] or '')
     if build is not None:
         cmd = cmd.replace('$$COMMIT$$', build.commit)
         cmd = cmd.replace('$$VERSION$$', build.version)
index 14624b582c97cd972e6bb1f2251632eb4e662310..398cd30596d4b1f2f9ed4bd1d61802ced35c536d 100755 (executable)
@@ -281,6 +281,8 @@ cachefiles = [
      'ba85dbe4d370e4de567222f73a3e034d85fc3011b3cbd90697f3e8dcace3ad94'),
     ('https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip',
      'eafae2d614e5475a3bcfd7c5f201db5b963cc1290ee3e8ae791ff0c66757781e'),
+    ('https://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-android-5.7.0.run',
+     'f7e55b7970e59bdaabb88cb7afc12e9061e933992bda2f076f52600358644586'),
 ]
 
 
@@ -346,6 +348,10 @@ for srcurl, shasum in cachefiles:
         os.remove(local_filename)
         sys.exit(1)
 
+local_qt_filename = os.path.join(cachedir, 'qt-opensource-linux-x64-android-5.7.0.run')
+print("Setting executable bit for " + local_qt_filename)
+os.chmod(local_qt_filename, 0o755)
+
 # use VirtualBox software virtualization if hardware is not available,
 # like if this is being run in kvm or some other VM platform, like
 # http://jenkins.debian.net, the values are 'on' or 'off'