summaryrefslogtreecommitdiffstats
path: root/scripts/docker
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-31 11:51:36 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-05 17:54:09 -0700
commit373415bb52c50316f07f3f95a8c736d8ab94b425 (patch)
tree623c82af642e2e66cbad7a851e9a0c5ad22849c7 /scripts/docker
parent8401658af2d48aabd09ec57309fcdb956fb0aa54 (diff)
downloadsubsurface-373415bb52c50316f07f3f95a8c736d8ab94b425.tar.gz
build-system: add Dockerfile for Qt 5.12 on Trusty
We'll use this to create a better AppImage on Travis. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/docker')
-rw-r--r--scripts/docker/trusty-qt512/Dockerfile71
-rw-r--r--scripts/docker/trusty-qt512/qtifwsilent.qs51
2 files changed, 122 insertions, 0 deletions
diff --git a/scripts/docker/trusty-qt512/Dockerfile b/scripts/docker/trusty-qt512/Dockerfile
new file mode 100644
index 000000000..f116bbb20
--- /dev/null
+++ b/scripts/docker/trusty-qt512/Dockerfile
@@ -0,0 +1,71 @@
+FROM ubuntu:14.04
+LABEL Description="Trusty with Qt 5.12 and Subsurface build deps"
+
+# that's a lot of packages. Needed for the Qt installer, for QtWebKit
+# and for SmartTrak
+# the awkward start is because we need something newer than the default
+# compiler for QtWebKit and we need software-properties-common in order to
+# call add-apt-repositoty
+
+RUN apt-get -y update && apt-get install -y software-properties-common
+RUN add-apt-repository -y 'ppa:ubuntu-toolchain-r/test'
+RUN apt-get -y update && apt-get install -y \
+ gcc-6 g++-6 make git autoconf automake libtool pkg-config \
+ curl libdbus-1-3 libexpat1 libfontconfig1 libfreetype6 \
+ libexpat1-dev libgl1-mesa-dev libgl1-mesa-glx \
+ ruby gperf bison libx11-6 libx11-xcb1 libjpeg-dev libpng-dev \
+ libicu-dev libXcomposite-dev libXrender-dev libgstreamer-plugins-base1.0 \
+ libxml2-dev libxslt1-dev libzip-dev libsqlite3-dev libusb-1.0-0-dev \
+ libssl-dev libssh2-1-dev libcurl4-openssl-dev mesa-common-dev libqt5gui5 \
+ libxcb-xinerama0 libpulse-mainloop-glib0 libhyphen-dev libicu52 \
+ libglib2.0-dev mdbtools-dev
+
+# oddly this gets us too many gcc/g++ version (even though we explicitly
+# ask for gcc-6/g++6
+RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10 && \
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 10 && \
+ update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 10 && \
+ update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 10 && \
+ update-alternatives --set cc /usr/bin/gcc && \
+ update-alternatives --set c++ /usr/bin/g++
+
+# cmake in trusty is too old
+ADD cmake-3.13.2-Linux-x86_64.sh .
+RUN chmod a+x cmake-3.13.2-Linux-x86_64.sh && ./cmake-3.13.2-Linux-x86_64.sh --prefix=/usr --skip-license && rm -f cmake-3.13.2-Linux-x86_64.sh
+
+# install Qt silently
+ADD qtifwsilent.qs .
+ADD qt-opensource-linux-x64-5.12.4.run .
+
+RUN chmod +x qt-opensource-linux-x64-5.12.4.run && \
+ QT_INSTALL_DIR=/usr/local/Qt ./qt-opensource-linux-x64-5.12.4.run --platform minimal --script qtifwsilent.qs && \
+ rm -rf qt-opensource-linux-x64-5.12.4.run qtifwsilent.qs /usr/local/Qt/Tools /usr/local/Qt/Docs /usr/local/Qt/Examples /usr/local/Qt/Maintenance* \
+ /usr/local/Qt/5.12.4/gcc_64/bin/qgltf /usr/local/Qt/5.12.4/gcc_64/bin/qdoc
+ENV QT_ROOT /usr/local/Qt/5.12.4/gcc_64
+ENV PATH="/usr/local/Qt/5.12.4/gcc_64/bin/:${PATH}"
+
+# now build and install QtWebKit
+RUN git clone -b 5.212 git://github.com/qt/qtwebkit
+RUN cd qtwebkit && PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$QT_ROOT/lib/pkgconfig ./Tools/Scripts/build-webkit --qt --prefix $QT_ROOT --release
+RUN cd qtwebkit/WebKitBuild/Release && make install/fast
+RUN rm -rf qtwebkit
+
+# finally, we need a new libdbus
+# RUN curl -O https://dbus.freedesktop.org/releases/dbus/dbus-1.12.16.tar.gz
+ADD dbus-1.12.16.tar.gz .
+RUN mkdir dbus-1.12.16/build && \
+ cd dbus-1.12.16/build && \
+ cmake ../cmake -DDBUS_INSTALL_SYSTEM_LIBS=1 && \
+ make install && \
+ ldconfig
+
+# try to remove some of the packages we no longer need
+RUN apt-get remove -y libqt5core5a libqt5dbus5 libqt5gui5 ruby openssh-client
+
+# now build Subsurface once to populate the dependencies we don't get from
+# Ubuntu but that aren't really part of Subsurface (libgit, grantlee, googlemaps)
+RUN git clone git://github.com/Subsurface-divelog/subsurface
+RUN bash -e -x ./subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit
+
+# remove the source, but keep the install-root
+RUN rm -rf subsurface libgit2 googlemaps grantlee
diff --git a/scripts/docker/trusty-qt512/qtifwsilent.qs b/scripts/docker/trusty-qt512/qtifwsilent.qs
new file mode 100644
index 000000000..e9d5976ca
--- /dev/null
+++ b/scripts/docker/trusty-qt512/qtifwsilent.qs
@@ -0,0 +1,51 @@
+function Controller() {
+ installer.autoRejectMessageBoxes();
+ installer.installationFinished.connect(function() {
+ gui.clickButton(buttons.NextButton);
+ })
+}
+
+Controller.prototype.WelcomePageCallback = function() {
+ gui.clickButton(buttons.NextButton, 3000);
+}
+
+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() {
+ var widget = gui.currentPageWidget();
+ widget.deselectAll();
+ widget.selectComponent("qt.qt5.5124.gcc_64");
+ widget.selectComponent("qt.qt5.5124.qtscript");
+ 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);
+}