aboutsummaryrefslogtreecommitdiffstats
path: root/docker/windowsservercore
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-06-02 16:43:38 -0700
committerJake Petroules <jake.petroules@qt.io>2017-06-14 09:30:22 +0000
commit002542825419d63291e69569f82aa6857ec16117 (patch)
treeb102c39d372138516c80ebe1d74cb4ea0b23367a /docker/windowsservercore
parent1f7db2a736be5f11cf762a745dd2b7ea12d2b657 (diff)
Add a Dockerfile to create a Windows dev environment for Qbs
This patch includes a Dockerfile that can be used to create a Docker machine image suitable for Qbs development and for creating Qbs release packages. The image produced by this Dockerfile has been uploaded to Docker hub as qtproject/qbswindowsservercore. Developers can either build the Docker image manually using `docker build` (which takes longer) or download the prebuilt image from Docker Hub using `docker pull`. These instructions are also present in the README, along with examples for using Docker in conjunction with the releasing script added in the previous patch in order to create Windows release packages. Change-Id: I4faa969f42dbc57cca929b674c8ca8695767fee3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'docker/windowsservercore')
-rw-r--r--docker/windowsservercore/Dockerfile27
-rw-r--r--docker/windowsservercore/qtifwsilent.qs47
2 files changed, 74 insertions, 0 deletions
diff --git a/docker/windowsservercore/Dockerfile b/docker/windowsservercore/Dockerfile
new file mode 100644
index 000000000..db4c8e14c
--- /dev/null
+++ b/docker/windowsservercore/Dockerfile
@@ -0,0 +1,27 @@
+FROM microsoft/windowsservercore:10.0.14393.1198
+LABEL Description="Windows Server Core development environment for Qbs with Qt 5.8, Chocolatey and various dependencies for testing Qbs modules and functionality"
+
+COPY qtifwsilent.qs C:\qtifwsilent.qs
+RUN powershell -NoProfile -ExecutionPolicy Bypass -Command \
+ $ErrorActionPreference = 'Stop'; \
+ wget 'https://download.qt.io/official_releases/qt/5.8/5.8.0/qt-opensource-windows-x86-msvc2015-5.8.0.exe' -OutFile C:\qt32.exe ; \
+ wget 'https://download.qt.io/official_releases/qt/5.8/5.8.0/qt-opensource-windows-x86-msvc2015_64-5.8.0.exe' -OutFile C:\qt64.exe ; \
+ $Env:QT_INSTALL_DIR = 'C:\\Qt_5.8.0_msvc2015' ; Start-Process C:\qt32.exe -ArgumentList '--script C:/qtifwsilent.qs' -Wait ; \
+ $Env:QT_INSTALL_DIR = 'C:\\Qt_5.8.0_msvc2015_64' ; Start-Process C:\qt64.exe -ArgumentList '--script C:/qtifwsilent.qs' -Wait ; \
+ Remove-Item C:\qt32.exe -Force ; \
+ Remove-Item C:\qt64.exe -Force ; \
+ Remove-Item C:\qtifwsilent.qs -Force
+ENV QTDIR C:\\Qt_5.8.0_msvc2015\\5.8\\msvc2015
+ENV QTDIR64 C:\\Qt_5.8.0_msvc2015_64\\5.8\\msvc2015_64
+
+RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command \
+ $Env:chocolateyVersion = '0.10.5' ; \
+ $Env:chocolateyUseWindowsCompression = 'false' ; \
+ "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
+RUN choco install -y qbs --version 1.8.0
+RUN choco install -y unzip --version 6.0
+RUN choco install -y visualcpp-build-tools --version 14.0.25420.1
+RUN choco install -y zip --version 3.0
+
+# Disable crash dialog for release-mode runtimes
+RUN reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f
diff --git a/docker/windowsservercore/qtifwsilent.qs b/docker/windowsservercore/qtifwsilent.qs
new file mode 100644
index 000000000..6b087ccde
--- /dev/null
+++ b/docker/windowsservercore/qtifwsilent.qs
@@ -0,0 +1,47 @@
+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(installer.environmentVariable("QT_INSTALL_DIR"));
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ComponentSelectionPageCallback = function() {
+ 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);
+}