├── .gitignore ├── README.md ├── download_install_qt.ps1 ├── azure-pipelines.yml └── windows ├── Dockerfile └── qtifwsilent.qs /.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | qt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Debug Container Build Images/CI for Barrier 2 | 3 | You can't SSH into Azure Pipelines. This might be closer. 4 | 5 | ## Notes 6 | 7 | 1. Make a folder for the qt folder 8 | 2. You can map the qt folder and check if the installation works. -------------------------------------------------------------------------------- /download_install_qt.ps1: -------------------------------------------------------------------------------- 1 | $Wc = New-Object System.Net.WebClient 2 | $Wc.DownloadFile('https://download.qt.io/official_releases/qt/5.12/5.12.3/qt-opensource-windows-x86-5.12.3.exe', 'qt.exe') ; 3 | Write-Output 'Downloaded QT Installer' 4 | $Env:QT_INSTALL_DIR = Join-Path (Get-Location) "Qt"; 5 | Start-Process qt.exe -ArgumentList '--verbose --script windows/qtifwsilent.qs' -NoNewWindow -Wait 6 | Write-Output 'Installed QT Installer' 7 | Remove-Item qt.exe -Force 8 | Remove-Item Qt\MaintenanceTool.exe -Force 9 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - job: Windows 3 | pool: 4 | vmImage: VS2017-Win2016 5 | steps: 6 | - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreAndSaveCacheV1.RestoreAndSaveCache@1 7 | inputs: 8 | keyfile: 'download_install_qt.ps1, azure-pipelines.yml' 9 | targetfolder: 'Qt/5.12.3' 10 | vstsFeed: '$(ArtifactFeed)' 11 | - task: PowerShell@2 12 | condition: ne(variables['CacheRestored'], 'true') 13 | inputs: 14 | filePath: download_install_qt.ps1 -------------------------------------------------------------------------------- /windows/Dockerfile: -------------------------------------------------------------------------------- 1 | # escape=` 2 | 3 | FROM mcr.microsoft.com/windows/servercore:ltsc2019 4 | 5 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 6 | 7 | RUN $url = 'https://download.visualstudio.microsoft.com/download/pr/10930955/e64d79b40219aea618ce2fe10ebd5f0d/vs_BuildTools.exe'; ` 8 | $sha256 = '68A678D64704A4592CA003494B9C128EE5D2B381672DE174BAF9811E2A84EE72'; ` 9 | Invoke-WebRequest -Uri $url -OutFile C:\vs_BuildTools.exe; ` 10 | $actual256 = (Get-FileHash vs_BuildTools.exe -Algorithm sha256).Hash; ` 11 | if ($actual256 -ne $sha256) { ` 12 | Write-Host 'FAILED!'; ` 13 | Write-Host ('expected: {0}' -f $sha256); ` 14 | Write-Host ('got: {0}' -f $actual256); ` 15 | exit 1; ` 16 | }; 17 | 18 | RUN Start-Process -filepath C:\vs_buildtools.exe -passthru -wait -argumentlist ` 19 | '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --nocache --wait'; ` 20 | Remove-Item C:\vs_BuildTools.exe; ` 21 | Remove-Item -Force -Recurse 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer' 22 | 23 | COPY qtifwsilent.qs C:\qtifwsilent.qs 24 | RUN $Wc = New-Object System.Net.WebClient ; ` 25 | $Wc.DownloadFile('https://download.qt.io/official_releases/qt/5.12/5.12.3/qt-opensource-windows-x86-5.12.3.exe', 'C:\qt.exe') ; ` 26 | Echo 'Downloaded QT Installer' ; ` 27 | $Env:QT_INSTALL_DIR = 'C:\\Qt' ; ` 28 | Start-Process C:\qt.exe -ArgumentList '--verbose --script C:/qtifwsilent.qs' -NoNewWindow -Wait ; ` 29 | Remove-Item C:\qt.exe -Force ; ` 30 | Remove-Item C:\qtifwsilent.qs -Force 31 | ENV QTDIR C:\\Qt\\5.12.3\\msvc2017_64 32 | -------------------------------------------------------------------------------- /windows/qtifwsilent.qs: -------------------------------------------------------------------------------- 1 | function Controller() { 2 | installer.autoRejectMessageBoxes(); 3 | installer.installationFinished.connect(function() { 4 | gui.clickButton(buttons.NextButton); 5 | }) 6 | } 7 | 8 | Controller.prototype.WelcomePageCallback = function() { 9 | console.log("Welcome Page"); 10 | var widget = gui.currentPageWidget(); 11 | widget.completeChanged.connect(function() { 12 | // For some reason, this page needs some delay. 13 | gui.clickButton(buttons.NextButton); 14 | }); 15 | } 16 | 17 | Controller.prototype.CredentialsPageCallback = function() { 18 | gui.clickButton(buttons.NextButton); 19 | } 20 | 21 | Controller.prototype.IntroductionPageCallback = function() { 22 | gui.clickButton(buttons.NextButton); 23 | } 24 | 25 | Controller.prototype.TargetDirectoryPageCallback = function() { 26 | gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.environmentVariable("QT_INSTALL_DIR")); 27 | gui.clickButton(buttons.NextButton); 28 | } 29 | 30 | Controller.prototype.ComponentSelectionPageCallback = function() { 31 | console.log("Component Selection Page"); 32 | 33 | var components = installer.components(); 34 | console.log("Available packages: " + components.length); 35 | var packages = ["===LIST OF PACKAGES==="]; 36 | for (var i = 0 ; i < components.length ;i++) { 37 | packages.push(components[i].name + " " + components[i].displayName); 38 | } 39 | packages.push("===END OF PACKAGES==="); 40 | console.log(packages.join("\n")); 41 | 42 | var widget = gui.currentPageWidget(); 43 | widget.deselectAll(); 44 | widget.selectComponent("qt.qt5.5123.win64_msvc2017_64"); 45 | gui.clickButton(buttons.NextButton); 46 | } 47 | 48 | Controller.prototype.LicenseAgreementPageCallback = function() { 49 | gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); 50 | gui.clickButton(buttons.NextButton); 51 | } 52 | 53 | Controller.prototype.StartMenuDirectoryPageCallback = function() { 54 | gui.clickButton(buttons.NextButton); 55 | } 56 | 57 | Controller.prototype.ReadyForInstallationPageCallback = function() { 58 | gui.clickButton(buttons.NextButton); 59 | } 60 | 61 | Controller.prototype.FinishedPageCallback = function() { 62 | var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm; 63 | if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) 64 | checkBoxForm.launchQtCreatorCheckBox.checked = false; 65 | gui.clickButton(buttons.FinishButton); 66 | } 67 | --------------------------------------------------------------------------------