Skip to content

Commit

Permalink
Version 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Khachayants committed Aug 14, 2022
1 parent 224199a commit b8eb752
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && \
apt-get update && apt-get build-dep -y qt5-default && \
apt-get install -y git build-essential python \
libxcb-xinerama0-dev libxcb-util-dev flex bison gperf libicu-dev libxslt-dev ruby \
libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev \
libxrandr-dev libdbus-1-dev libfontconfig1-dev libcap-dev libxtst-dev \
libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev \
libxss-dev libegl1-mesa-dev gperf bison libasound2-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libx11-xcb-dev \
libicu-dev libelf-dev libdw-dev libzstd-dev wget p7zip-full vim
ADD ./build.sh /root/build.sh
RUN chmod +x /root/build.sh

WORKDIR /root
ENTRYPOINT /bin/bash /root/build.sh
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# qt-creator-build
# qt-creator-build

Dockerfile that builds [Qt-Creator](https://code.qt.io/cgit/qt-creator/qt-creator.git/) from sources with all necessary dependencies.

```sh
mkdir ./install
docker build -t qtc-build .
docker run --rm -ti -v `realpath ./install`:/root/install qtc-build
```
Archive with Qt-Creator will be appeared at install directory.
98 changes: 98 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/bin/bash

set -e
set -x

QT_VERSION=6.2.2
QT_CREATOR_VERSION=8.0.0
LLVM_VERSION=release/14.x
CLAZY_VERSION=1.10

INSTALL_PREFIX=/opt/qt-creator/$QT_CREATOR_VERSION
WORKDIR=/tmp/workdir

SCRIPT=`realpath $0`
SCRIPTPATH=`dirname $SCRIPT`

mkdir -p $WORKDIR
cd $WORKDIR

# CMake checkout and build
git clone https://gitlab.kitware.com/cmake/cmake.git --depth 1
cd cmake
./bootstrap && make -j7 && make install && make clean

# LLVM download and extract
echo "Build LLVM"
cd $WORKDIR
git clone https://github.com/llvm/llvm-project.git -b $LLVM_VERSION --depth 1
mkdir llvm-project/build && cd llvm-project/build
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt" \
../llvm
make -j7 && make install && make clean
export PATH=$PATH:$INSTALL_PREFIX/bin

echo "Build clazy"
cd $WORKDIR
git clone https://github.com/KDE/clazy.git -b $CLAZY_VERSION
cd clazy && cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX . && make -j4 && make install

# Download and build Qt
echo "Checkout Qt sources"
cd $WORKDIR
git clone https://code.qt.io/qt/qt5.git -b $QT_VERSION --depth 1
cd qt5 && ./init-repository

echo "Configure Qt"
cd $WORKDIR && mkdir -p build && cd build
../qt5/configure \
-prefix $INSTALL_PREFIX \
-opensource \
-confirm-license \
-skip qtwebengine -skip qt3d -skip qtspeech -skip wayland -skip qtquick3d \
-nomake examples -nomake tests \
-silent

echo "Building Qt ..."
make -j4

echo "Installing Qt ..."
make install
make clean

# Download and build Qt-Creator
echo "Checkout Qt-Creator sources"
cd $WORKDIR
git clone https://code.qt.io/qt-creator/qt-creator.git -b v$QT_CREATOR_VERSION --depth 1

cd qt-creator
git submodule update --init --recursive

mkdir ../build-creator
cd ../build-creator

cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$INSTALL_PREFIX \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DCMAKE_INSTALL_RPATH=$INSTALL_PREFIX/lib \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=On \
-DPYTHON_EXECUTABLE=`which python3` ../qt-creator

#read -p "Press enter to continue"

echo "Building Qt-Creator ..."
make -j4

echo "Installing Qt-Creator ..."
make install

# Collect artifacts
mkdir -p /root/install
cd /root/install
tar -zcf qt-creator-$QT_CREATOR_VERSION.tar.gz $INSTALL_PREFIX

echo "Done"

0 comments on commit b8eb752

Please # to comment.