7 test -e $QT_DIR || mkdir -p $QT_DIR
9 cat << EOF > $QT_DIR/5.7.0-installer.qs
10 // Bases on script from http://stackoverflow.com/a/34032216
12 function Controller() {
13 installer.autoRejectMessageBoxes();
14 installer.installationFinished.connect(function() {
15 gui.clickButton(buttons.NextButton);
19 Controller.prototype.WelcomePageCallback = function() {
20 gui.clickButton(buttons.NextButton);
23 Controller.prototype.CredentialsPageCallback = function() {
24 gui.clickButton(buttons.NextButton);
27 Controller.prototype.IntroductionPageCallback = function() {
28 gui.clickButton(buttons.NextButton);
31 Controller.prototype.TargetDirectoryPageCallback = function()
33 gui.currentPageWidget().TargetDirectoryLineEdit.setText("$QT_DIR/5.7.0");
34 gui.clickButton(buttons.NextButton);
37 Controller.prototype.ComponentSelectionPageCallback = function() {
38 var widget = gui.currentPageWidget();
40 // You can get these component names by running the installer with the
41 // --verbose flag. It will then print out a resource tree.
44 widget.selectComponent("qt.55.gcc_64");
45 widget.selectComponent("qt.57.qtwebengine.gcc_64");
46 widget.selectComponent("qt.57.android_x86");
47 widget.selectComponent("qt.57.android_armv7");
49 // widget.deselectComponent("...");
51 gui.clickButton(buttons.NextButton);
54 Controller.prototype.LicenseAgreementPageCallback = function() {
55 gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
56 gui.clickButton(buttons.NextButton);
59 Controller.prototype.StartMenuDirectoryPageCallback = function() {
60 gui.clickButton(buttons.NextButton);
63 Controller.prototype.ReadyForInstallationPageCallback = function()
65 gui.clickButton(buttons.NextButton);
68 Controller.prototype.FinishedPageCallback = function() {
69 var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
70 if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
71 checkBoxForm.launchQtCreatorCheckBox.checked = false;
73 gui.clickButton(buttons.FinishButton);
77 if [ ! -e $QT_DIR/5.7.0 ]; then
78 echo "Installing Qt SDK 5.7.0 to $QT_DIR/5.7.0 ..."
79 /vagrant/cache/qt-opensource-linux-x64-android-5.7.0.run --platform minimal --script $QT_DIR/5.7.0-installer.qs --verbose
80 echo "Qt SDK 5.7.0 installation done."
83 rm $QT_DIR/5.7.0-installer.qs