Skip to content

Commit

Permalink
Merge remote-tracking branch 'fc/next' into stdevHsequeda_t290_Generic
Browse files Browse the repository at this point in the history
  • Loading branch information
olemis committed Dec 30, 2019
2 parents 425c32d + 2ca5e85 commit 92b77fb
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 13 deletions.
38 changes: 26 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,32 @@ matrix:
- make run-docker CMD='make test'
- make lint
- make run-docker CMD='make install-coveralls ; make test-cover-travis'
- stage: Windows
os: windows
install:
- choco install make -y
- choco install unzip -y
- travis_wait 50 make install-deps-Windows
- make install-linters
- make install-coveralls
script:
- make build-Windows-travis
- make build-icon
- make lint
# FIXME: Restore Windows builds
# - stage: Windows
# os: windows
# env:
# - QT5_BASE_DIR: C:/Qt/5.13.0/msvc2017
# - QT_DIR: C:/Qt
# - QT_QMAKE_DIR: C:/Qt/5.13.0/mingw73_64/bin
# install:
# - choco install make -y
# - choco install unzip -y
# #- df -h
# #- .travis/install-qt-win.sh
# #- df -h
# #- ls C:/Qt
# #- ls C:/Qt/5.13.0
# #- ls C:/Qt/5.13.0/mingw73_64
# #- ls C:/Qt/5.13.0/mingw73_64/bin
# - travis_wait 50 make install-deps-Windows
# - df -h
# - make install-linters
# - make install-coveralls
# script:
# - make build
# - make test
# - make build-icon
# - make test-cover-travis
- stage: MacOS
os: osx
osx_image: xcode10.2
Expand Down
23 changes: 23 additions & 0 deletions .travis/install-qt-win.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set -eu -o pipefail

if [ -e "$QT5_BASE_DIR/bin/moc.exe" ]; then
echo "Found an existing Qt installation at $QT5_BASE_DIR"
exit
fi

echo "Downloading the installer..."
# https is of no use if it redirects to a http mirror...
curl -vLo ~/qt-unified-windows-x86-online.exe http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe

echo "Installing..."
# Run installer and save the installer output. To avoid hitting the timeout,
# periodically print some progress. On error, show the full log and abort.
~/qt-unified-windows-x86-online.exe --verbose --script .travis/qt-installer-windows.qs
#|
# tee ~/qt-installer-output.txt |
# .travis/report-progress.sh ||
# (cat ~/qt-installer-output.txt; exit 1)
#
#printf 'Installation size: '
#du -sm "$QT5_BASE_DIR" 2>&1 ||
# (cat ~/qt-installer-output.txt; exit 1)
95 changes: 95 additions & 0 deletions .travis/qt-installer-windows.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@


var INSTALL_COMPONENTS = [
"qt.qt5.5130.win64_mingw73",
"qt.qt5.5130.qtscript",
"qt.qt5.5130.qtscript.win64_mingw73",

];

function Controller() {
installer.autoRejectMessageBoxes();
installer.installationFinished.connect(function() {
gui.clickButton(buttons.NextButton);
})
}

Controller.prototype.WelcomePageCallback = function() {
// click delay here because the next button is initially disabled for ~1 second
gui.clickButton(buttons.NextButton, 3000);
}

Controller.prototype.CredentialsPageCallback = function() {
gui.clickButton(buttons.NextButton);
}

Controller.prototype.IntroductionPageCallback = function() {
gui.clickButton(buttons.NextButton);
}

Controller.prototype.DynamicTelemetryPluginFormCallback = function() {
gui.currentPageWidget().TelemetryPluginForm.statisticGroupBox.disableStatisticRadioButton.setChecked(true);
gui.clickButton(buttons.NextButton);

//for(var key in widget.TelemetryPluginForm.statisticGroupBox){
// console.log(key);
//}
}

Controller.prototype.TargetDirectoryPageCallback = function()
{
// Keep default at "C:\Qt".
//gui.currentPageWidget().TargetDirectoryLineEdit.setText("E:\\Qt");
//gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt");
gui.clickButton(buttons.NextButton);
}

Controller.prototype.ComponentSelectionPageCallback = function() {

// https://doc-snapshots.qt.io/qtifw-3.1/noninteractive.html
var page = gui.pageWidgetByObjectName("ComponentSelectionPage");

var archiveCheckBox = gui.findChild(page, "Archive");
var latestCheckBox = gui.findChild(page, "Latest releases");
var fetchButton = gui.findChild(page, "FetchCategoryButton");

archiveCheckBox.click();
latestCheckBox.click();
fetchButton.click();

var widget = gui.currentPageWidget();

widget.deselectAll();

for (var i = 0; i < INSTALL_COMPONENTS.length; i++) {
widget.selectComponent(INSTALL_COMPONENTS[i]);
}

//widget.selectComponent("qt.tools.qtcreator");
//widget.selectComponent("qt.55.qt3d");

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);
}

35 changes: 35 additions & 0 deletions .travis/report-progress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

set -eu

# Default to a 60 seconds interval between printing messages.
PERIOD=${1:-60}

nexttime=$PERIOD
msg=
count=0

# Reset timer (SECONDS is a special Bash variable).
SECONDS=0

while true; do
# Periodically report the last read line.
timeleft=$((nexttime-SECONDS))
while [ $timeleft -le 0 ]; do
((nexttime+=PERIOD))
((timeleft+=PERIOD))
printf "[progress] %3d %s\n" $SECONDS "${msg:-(no output)}"
msg=
done

if read -r -t $timeleft line; then
# Save line for later.
((count+=1))
msg="Line $count: $line"
continue
elif [ $? -le 128 ]; then
# EOF (as opposed to a timeout)
[ -z "$msg" ] || printf "[progress] %3d %s\n" $SECONDS "$msg"
printf "[progress] %3d done (read %d lines).\n" $SECONDS $count
break
fi
done
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ install-deps-Darwin: ## Install osx dependencies
install-deps-Windows: ## Install Windowns dependencies
set GO111MODULE=off
go get -v -tags=no_env github.com/therecipe/qt/cmd/...
(qtsetup -test=false)
@echo "Running qtsetup"
(qtsetup -test=false | true)
go get -t -d -v ./...
wget -O magick.zip https://sourceforge.net/projects/imagemagick/files/im7-exes/ImageMagick-7.0.7-25-portable-Q16-x64.zip
unzip magick.zip convert.exe
Expand Down

0 comments on commit 92b77fb

Please sign in to comment.