Commit 1cd0dd82 authored by Jonah Brüchert's avatar Jonah Brüchert

Rebase xenial image on trusty to make it suitable for building the appimage

parent b1b13c2d
FROM rabits/qt:5.11-desktop
RUN sudo apt update \
&& sudo apt-get install software-properties-common dirmngr -y \
&& sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& sudo add-apt-repository -y universe \
&& sudo apt-get update \
&& sudo apt-get install -y -t xenial-backports \
FROM ubuntu:xenial
# Add PPAs
RUN apt update && \
apt-get install software-properties-common dirmngr -y && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test
# Install Qt
ARG QT_VERSION=5.12.5
ENV DEBIAN_FRONTEND=noninteractive \
QT_PATH=/opt/Qt
ENV QT_DESKTOP $QT_PATH/${QT_VERSION}/gcc_64
ENV PATH $QT_DESKTOP/bin:$PATH
# Install updates & requirements:
# * git, openssh-client, ca-certificates - clone & build
# * locales, - useful to set utf-8 locale & usage
# * curl - to download Qt bundle
# * build-essential, pkg-config, libgl1-mesa-dev - basic Qt build requirements
# * libsm6, libice6, libxext6, libxrender1, libfontconfig1, libdbus-1-3 - dependencies of the Qt bundle run-file
RUN apt update && apt full-upgrade -y && apt install -y --no-install-recommends \
git \
openssh-client \
ca-certificates \
locales \
curl \
build-essential \
pkg-config \
libgl1-mesa-dev \
libsm6 \
libice6 \
libxext6 \
libxrender1 \
libfontconfig1 \
libdbus-1-3 \
gcc-8 g++-8 \
libgstreamer-plugins-base1.0-0 \
&& apt-get -qq clean \
&& rm -rf /var/lib/apt/lists/*
COPY extract-qt-installer.sh /tmp/qt/
# Download & unpack Qt toolchains & clean
RUN curl -Lo /tmp/qt/installer.run "https://download.qt.io/official_releases/qt/$(echo "${QT_VERSION}" | cut -d. -f 1-2)/${QT_VERSION}/qt-opensource-linux-x64-${QT_VERSION}.run" \
&& QT_CI_PACKAGES=qt.qt5.$(echo "${QT_VERSION}" | tr -d .).gcc_64 /tmp/qt/extract-qt-installer.sh /tmp/qt/installer.run "$QT_PATH" \
&& find "$QT_PATH" -mindepth 1 -maxdepth 1 ! -name "${QT_VERSION}" -exec echo 'Cleaning Qt SDK: {}' \; -exec rm -r '{}' \; \
&& rm -rf /tmp/qt
# Reconfigure locale
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
RUN apt-get update && \
apt-get install -y \
wget \
git \
pkg-config \
......@@ -17,37 +63,37 @@ RUN sudo apt update \
mesa-common-dev \
libgl1-mesa-dev \
libssl-dev \
libopus-dev \
libvpx-dev \
libspeex-dev \
libtheora-dev \
libssl-dev \
libxi6 \
libegl1-mesa \
libpq5 \
&& sudo apt-get clean
RUN wget http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.62-0ubuntu0.14.04.1_all.deb \
&& wget http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.62-0ubuntu0.14.04.1_amd64.deb \
&& sudo dpkg -i *.deb \
&& rm -rf *.deb
libdbus-1-3 \
mysql-common \
libmysqlclient20 \
libxkbcommon-x11-0 \
libpulse-mainloop-glib0 \
libodbc1 \
&& apt-get clean
ENV KF5_DIR=/opt/kf5
ENV LD_LIBRARY_PATH=$KF5_DIR/lib/x86_64-linux-gnu:$KF5_DIR/lib:$LD_LIBRARY_PATH
ENV PKG_CONFIG_PATH=$KF5_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
ENV PATH=$KF5_DIR/bin:$PATH
ENV PATH=$KF5_DIR/bin:/var/opt/kdesrcbuild:$PATH
ENV QT_LINUX=$QT_DESKTOP
# Update CMAKE
RUN wget https://cmake.org/files/v3.13/cmake-3.13.3-Linux-x86_64.tar.gz -O- | tar xz -C /usr --strip-components=1
# Install kdesrc-build dependencies
RUN sudo apt install libio-socket-ssl-perl libyaml-libyaml-perl gperf -y
RUN apt install -y libio-socket-ssl-perl libyaml-libyaml-perl gperf bzr libxrender-dev libxcb-keysyms1-dev libxcb-icccm4-dev doxygen git libopus-dev libspeex-dev libtheora-dev libvpx-dev libasound2 libxcb-res0-dev
# Install KF5
RUN sudo git clone git://anongit.kde.org/kdesrc-build /var/opt/kdesrcbuild
COPY kdesrc-buildrc /var/opt/kdesrcbuild/kdesrc-buildrc
RUN sudo mkdir -p /opt/kf5 && \
sudo chown $(whoami):$(whoami) /opt/kf5 && \
cd /var/opt/kdesrcbuild/ && \
./kdesrc-build --include-dependencies kirigami --verbose && sudo rm -rf ~/kde-src/ /var/opt/kdesrcbuild/
RUN git clone https://github.com/qxmpp-project/qxmpp \
&& cd qxmpp \
&& cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0 \
&& sudo ninja install \
&& cd ../ \
&& rm -rf qxmpp
COPY kdesrc-buildrc /root/.kdesrc-buildrc
RUN git clone git://anongit.kde.org/kdesrc-build /var/opt/kdesrcbuild && \
kdesrc-build --include-dependencies kirigami knotifications zxing-cpp qxmpp --verbose && \
rm -rf ~/kde-src/
#!/bin/sh -e
# QT-CI Project
# License: Apache-2.0
# https://github.com/benlau/qtci
if [ $# -lt 2 ];
then
echo extract-qt-installer qt-installer output_path
exit -1
fi
INSTALLER=$1
OUTPUT=$2
SCRIPT="$(mktemp /tmp/tmp.XXXXXXXXX)"
PACKAGES=$QT_CI_PACKAGES
cat <<EOF > $SCRIPT
function Controller() {
installer.installationFinished.connect(function() {
gui.clickButton(buttons.NextButton);
});
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
installer.setMessageBoxAutomaticAnswer("installationErrorWithRetry", QMessageBox.Ignore);
}
Controller.prototype.WelcomePageCallback = function() {
console.log("Welcome Page");
gui.clickButton(buttons.NextButton, 3000);
}
Controller.prototype.CredentialsPageCallback = function() {
gui.clickButton(buttons.CommitButton);
}
Controller.prototype.ComponentSelectionPageCallback = function() {
console.log("Select components");
function trim(str) {
return str.replace(/^ +/,"").replace(/ *$/,"");
}
var widget = gui.currentPageWidget();
var packages = trim("$PACKAGES").split(",");
if (packages.length > 0 && packages[0] !== "") {
widget.deselectAll();
for (var i in packages) {
var pkg = trim(packages[i]);
console.log("Select " + pkg);
widget.selectComponent(pkg);
}
} else {
console.log("Use default component list");
}
gui.clickButton(buttons.NextButton);
}
Controller.prototype.IntroductionPageCallback = function() {
console.log("Introduction Page");
console.log("Retrieving meta information from remote repository");
gui.clickButton(buttons.NextButton);
}
Controller.prototype.TargetDirectoryPageCallback = function() {
console.log("Set target installation page: $OUTPUT");
var widget = gui.currentPageWidget();
if (widget != null) {
widget.TargetDirectoryLineEdit.setText("$OUTPUT");
}
gui.clickButton(buttons.NextButton);
}
Controller.prototype.LicenseAgreementPageCallback = function() {
console.log("Accept license agreement");
var widget = gui.currentPageWidget();
if (widget != null) {
widget.AcceptLicenseRadioButton.setChecked(true);
}
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ReadyForInstallationPageCallback = function() {
console.log("Ready to install");
gui.clickButton(buttons.CommitButton);
}
Controller.prototype.FinishedPageCallback = function() {
var widget = gui.currentPageWidget();
if (widget.LaunchQtCreatorCheckBoxForm) {
// No this form for minimal platform
widget.LaunchQtCreatorCheckBoxForm.launchQtCreatorCheckBox.setChecked(false);
}
gui.clickButton(buttons.FinishButton);
}
EOF
chmod u+x $INSTALLER
QT_QPA_PLATFORM=minimal $INSTALLER -v --script $SCRIPT
......@@ -8,11 +8,14 @@ global
branch-group kf5-qt5
kdedir /opt/kf5 # Where to install KF5-based software
# Uncomment this and edit value to choose a different Qt5
# qtdir /usr # Where to find Qt5
# qtdir /usr # Where to find Qt5
# Where to download source code. By default the build directory and
# logs will be kept under this directory as well.
source-dir ~/kde-src
make-options -j4
cmake-options -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_C_COMPILER=gcc-8
end global
# Instead of specifying modules here, the current best practice is to refer to
......@@ -32,6 +35,18 @@ include /var/opt/kdesrcbuild/kf5-qt5-build-include
# It is possible to change the options for modules loaded from the file
# included above (since it's not possible to add a module that's already been
# included), e.g.
options kcoreaddons
make-options -j4
end options
# Kaidan
module zxing-cpp
repository https://github.com/nu-book/zxing-cpp
branch master
cmake-options -DLINK_CPP_STATICALLY=OFF -DBUILD_SHARED_LIBRARY=ON
end module
module qxmpp
repository git://github.com/qxmpp-project/qxmpp.git
branch master
cmake-options -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF
end module
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment