-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 3 images with 6.7 Qt: the rest after AQT will support android/wasm
* AQT android was moved: miurahr/aqtinstall#774 * AQT wasm was moved: miurahr/aqtinstall#779
- Loading branch information
Showing
12 changed files
with
641 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Image: stateoftheartio/qt6:6.6-gcc-aqt | ||
|
||
FROM ubuntu:20.04 | ||
MAINTAINER State Of The Art <docker@state-of-the-art.io> (@stateoftheartio) | ||
|
||
# PIP requirement like "aqtinstall==2.0.6" or url with egg file | ||
ARG AQT_VERSION="aqtinstall==3.1.13" | ||
|
||
ARG QT_VERSION=6.7.0 | ||
# LINUXDEPLOY_COMMIT Jan 3, 2024 | ||
ARG LINUXDEPLOY_COMMIT=2b73a2173f8acfc0269e681bdb28ebf65b0b4b48 | ||
# LINUXDEPLOY_QT_COMMIT Apr 25, 2024 | ||
ARG LINUXDEPLOY_QT_COMMIT=0e7e8ce889c1105373e88e409ea555058673bb1e | ||
ARG QT_PATH=/opt/Qt | ||
|
||
ARG ADDITIONAL_PACKAGES="sudo git openssh-client ca-certificates build-essential curl python3 locales patchelf" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
QT_VERSION=${QT_VERSION} \ | ||
AQT_VERSION=${AQT_VERSION} \ | ||
QT_PATH=${QT_PATH} \ | ||
QT_GCC=${QT_PATH}/${QT_VERSION}/gcc_64 \ | ||
PATH=${QT_PATH}/Tools/CMake/bin:${QT_PATH}/Tools/Ninja:${QT_PATH}/${QT_VERSION}/gcc_64/bin:$PATH | ||
|
||
COPY get_qt.sh get_linuxdeploy.sh install_packages.sh /tmp/ | ||
|
||
# Get Qt binaries with aqt | ||
RUN /tmp/get_qt.sh | ||
|
||
# Get linuxdeploy and build it | ||
RUN /tmp/get_linuxdeploy.sh | ||
|
||
# Install the required packages | ||
RUN /tmp/install_packages.sh | ||
|
||
# Reconfigure locale | ||
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales | ||
|
||
# Add group & user + sudo | ||
RUN groupadd -r user && useradd --create-home --gid user user && echo 'user ALL=NOPASSWD: ALL' > /etc/sudoers.d/user | ||
|
||
USER user | ||
WORKDIR /home/user | ||
ENV HOME /home/user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/sh -xe | ||
# Script to install linuxdeploy with qt plugin | ||
|
||
[ "$LINUXDEPLOY_GIT" ] || LINUXDEPLOY_GIT="https://github.com/linuxdeploy/linuxdeploy.git" | ||
[ "$LINUXDEPLOY_COMMIT" ] || LINUXDEPLOY_COMMIT="17ca786a2523a375617a8b274f70cef9c7189373" # Jul 13, 2023 | ||
[ "$LINUXDEPLOY_QT_GIT" ] || LINUXDEPLOY_QT_GIT="https://github.com/linuxdeploy/linuxdeploy-plugin-qt.git" | ||
[ "$LINUXDEPLOY_QT_COMMIT" ] || LINUXDEPLOY_QT_COMMIT="9a388d32b1e95d8b69e201356f050137eb6c0aa3" # May 25, 2023 | ||
|
||
# Init the package system | ||
apt update | ||
|
||
echo | ||
echo '--> Save the original installed packages list' | ||
echo | ||
|
||
dpkg --get-selections | cut -f 1 > /tmp/packages_orig.lst | ||
|
||
echo | ||
echo '--> Install the required packages to install linuxdeploy' | ||
echo | ||
|
||
apt install -y git libboost-filesystem-dev libboost-regex-dev cimg-dev wget patchelf nlohmann-json3-dev build-essential | ||
|
||
echo | ||
echo '--> Download & install the linuxdeploy' | ||
echo | ||
|
||
git clone "$LINUXDEPLOY_GIT" /tmp/linuxdeploy | ||
git -C /tmp/linuxdeploy checkout "$LINUXDEPLOY_COMMIT" | ||
git -C /tmp/linuxdeploy submodule update --init --recursive | ||
git clone "$LINUXDEPLOY_QT_GIT" /tmp/linuxdeploy-plugin-qt | ||
git -C /tmp/linuxdeploy-plugin-qt checkout "$LINUXDEPLOY_QT_COMMIT" | ||
git -C /tmp/linuxdeploy-plugin-qt submodule update --init --recursive | ||
|
||
cmake /tmp/linuxdeploy -B /tmp/linuxdeploy-build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DUSE_CCACHE=OFF | ||
cmake --build /tmp/linuxdeploy-build | ||
|
||
cmake /tmp/linuxdeploy-plugin-qt -B /tmp/linuxdeploy-plugin-qt-build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DUSE_CCACHE=OFF | ||
cmake --build /tmp/linuxdeploy-plugin-qt-build | ||
|
||
mkdir -p /usr/local/bin | ||
mv /tmp/linuxdeploy-build/bin/linuxdeploy /usr/local/bin | ||
mv /tmp/linuxdeploy-plugin-qt-build/bin/linuxdeploy-plugin-qt /usr/local/bin | ||
|
||
echo | ||
echo '--> Restore the packages list to the original state' | ||
echo | ||
|
||
dpkg --get-selections | cut -f 1 > /tmp/packages_curr.lst | ||
grep -Fxv -f /tmp/packages_orig.lst /tmp/packages_curr.lst | xargs apt remove -y --purge | ||
|
||
# Complete the cleaning | ||
|
||
apt -qq clean | ||
rm -rf /var/lib/apt/lists/* /tmp/linuxdeploy* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh -xe | ||
# Script to install Qt 6 in docker container | ||
|
||
[ "$AQT_VERSION" ] || AQT_VERSION=aqtinstall | ||
[ "$QT_VERSION" ] || exit 1 | ||
|
||
[ "$QT_PATH" ] || QT_PATH=/opt/Qt | ||
|
||
root_dir=$PWD | ||
[ "$root_dir" != '/' ] || root_dir="" | ||
|
||
# Init the package system | ||
apt update | ||
|
||
echo | ||
echo '--> Save the original installed packages list' | ||
echo | ||
|
||
dpkg --get-selections | cut -f 1 > /tmp/packages_orig.lst | ||
|
||
echo | ||
echo '--> Install the required packages to install Qt' | ||
echo | ||
|
||
apt install -y git python3-pip libglib2.0-0 | ||
pip3 install --no-cache-dir "$AQT_VERSION" | ||
|
||
echo | ||
echo '--> Download & install the Qt library using aqt' | ||
echo | ||
|
||
aqt install-qt -O "$QT_PATH" linux desktop "$QT_VERSION" linux_gcc_64 | ||
aqt install-tool -O "$QT_PATH" linux desktop tools_cmake | ||
aqt install-tool -O "$QT_PATH" linux desktop tools_ninja | ||
|
||
pip3 freeze | xargs pip3 uninstall -y | ||
|
||
echo | ||
echo '--> Restore the packages list to the original state' | ||
echo | ||
|
||
dpkg --get-selections | cut -f 1 > /tmp/packages_curr.lst | ||
grep -Fxv -f /tmp/packages_orig.lst /tmp/packages_curr.lst | xargs apt remove -y --purge | ||
|
||
# Complete the cleaning | ||
|
||
apt -qq clean | ||
rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh -xe | ||
|
||
[ "$QT_PATH" ] || QT_PATH=/opt/Qt | ||
|
||
[ "$ADDITIONAL_PACKAGES" ] || ADDITIONAL_PACKAGES='build-essential ninja-build' | ||
|
||
# Init package system | ||
apt update | ||
|
||
echo | ||
echo '--> Locating the shared libs required for the installed tools' | ||
echo | ||
|
||
find "$QT_PATH" /usr/local -executable -type f -o -name '*.so' | xargs ldd 2>/dev/null | \ | ||
grep -F '=> not found' | tr '\t' ' ' | cut -d' ' -f2 | sort -u | tee /tmp/not_found_libs.lst | ||
|
||
echo | ||
echo '--> Locating packages to provide the required shared libs' | ||
echo | ||
|
||
apt install -y apt-file | ||
apt-file update | ||
|
||
while read line ; do apt-file find $line | grep '^lib' | head -1; done < /tmp/not_found_libs.lst | tee /tmp/to_install_libs.lst | ||
|
||
# TODO: Clean apt-file cache | ||
|
||
apt autoremove -y --purge apt-file | ||
|
||
echo | ||
echo '--> Install the found libraries' | ||
echo | ||
|
||
cat /tmp/to_install_libs.lst | cut -d: -f 1 | xargs apt install -y --no-install-suggests --no-install-recommends $ADDITIONAL_PACKAGES | ||
|
||
# Complete the cleaning | ||
|
||
apt -qq clean | ||
rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Image: stateoftheartio/qt6:6.6-macos-aqt | ||
|
||
FROM ubuntu:20.04 | ||
MAINTAINER State Of The Art <docker@state-of-the-art.io> (@stateoftheartio) | ||
|
||
# PIP requirement like "aqtinstall==2.0.6" or url with egg file | ||
ARG AQT_VERSION="aqtinstall==3.1.13" | ||
ARG OSXCROSS_URL=https://github.com/tpoechtrager/osxcross/archive/ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b.tar.gz | ||
ARG OSXCROSS_SHA256=fe2880db44d0cd0fea9fd37b77743c32297f2832eb8bcbf49ea16182f1634ace | ||
ARG SDK_URL=https://github.com/alexey-lysiuk/macos-sdk/releases/download/12.3/MacOSX12.3.tar.xz | ||
ARG SDK_SHA256=91c03be5399be04d8f6b773da13045525e01298c1dfff273b4e1f1e904ee5484 | ||
|
||
ARG QT_VERSION=6.7.0 | ||
ARG QT_PATH=/opt/Qt | ||
|
||
ARG ADDITIONAL_PACKAGES="sudo git openssh-client ca-certificates curl python3 locales clang genisoimage" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
QT_VERSION=${QT_VERSION} \ | ||
AQT_VERSION=${AQT_VERSION} \ | ||
QT_PATH=${QT_PATH} \ | ||
QT_MACOS=${QT_PATH}/${QT_VERSION}/macos \ | ||
PATH=$PATH:${QT_PATH}/Tools/CMake/bin:${QT_PATH}/Tools/Ninja:${QT_PATH}/${QT_VERSION}/macos/bin:/opt/osxcross/bin | ||
|
||
COPY get_qt.sh get_osxcross.sh install_packages.sh /tmp/ | ||
|
||
# Get Qt binaries with aqt | ||
RUN /tmp/get_qt.sh | ||
|
||
# Get osxcross | ||
RUN /tmp/get_osxcross.sh | ||
|
||
# Install the required packages | ||
RUN /tmp/install_packages.sh | ||
|
||
# Reconfigure locale | ||
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales | ||
|
||
# Add group & user + sudo | ||
RUN groupadd -r user && useradd --create-home --gid user user && echo 'user ALL=NOPASSWD: ALL' > /etc/sudoers.d/user | ||
|
||
USER user | ||
WORKDIR /home/user | ||
ENV HOME /home/user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/sh -xe | ||
# Script to install osxcross with SDK | ||
|
||
[ "$OSXCROSS_URL" ] || OSXCROSS_URL="https://github.com/tpoechtrager/osxcross/archive/5e1b71fcceb23952f3229995edca1b6231525b5b.tar.gz" # Sep 22, 2023 | ||
[ "$OSXCROSS_SHA256" ] || OSXCROSS_SHA256=d3f771bbc20612fea577b18a71be3af2eb5ad2dd44624196cf55de866d008647 | ||
[ "$SDK_URL" ] || SDK_URL="https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz" | ||
[ "$SDK_SHA256" ] || SDK_SHA256=cd4f08a75577145b8f05245a2975f7c81401d75e9535dcffbb879ee1deefcbf4 | ||
|
||
root_dir=$PWD | ||
[ "$root_dir" != '/' ] || root_dir="" | ||
|
||
# Init the package system | ||
apt update | ||
|
||
echo | ||
echo '--> Save the original installed packages list' | ||
echo | ||
|
||
dpkg --get-selections | cut -f 1 > /tmp/packages_orig.lst | ||
|
||
echo | ||
echo '--> Install the required packages to install osxcross' | ||
echo | ||
|
||
apt install -y curl ca-certificates clang llvm-dev libxml2-dev uuid-dev libssl-dev cpio libbz2-dev make patch git zlib1g-dev | ||
|
||
echo | ||
echo '--> Download & install the osxcross and sdk' | ||
echo | ||
|
||
mkdir /tmp/osxcross | ||
cd /tmp/osxcross | ||
|
||
echo "$OSXCROSS_SHA256 -" > sum.txt && curl -fLs "$OSXCROSS_URL" | tee /tmp/osxcross.tar.gz | sha256sum -c sum.txt | ||
tar xf /tmp/osxcross.tar.gz --strip-components=1 | ||
echo "$SDK_SHA256 -" > sum.txt && curl -fLs "$SDK_URL" | tee /tmp/osxcross/tarballs/$(basename "$SDK_URL") | sha256sum -c sum.txt | ||
|
||
# Build and place the osxcross | ||
export OUT_DIR=/opt/osxcross | ||
UNATTENDED=1 TARGET_DIR=$OUT_DIR ./build.sh | ||
|
||
# Create helper files | ||
mkdir -p /usr/local/bin | ||
cat - <<EOF > /usr/local/bin/qt-cmake | ||
#!/bin/sh | ||
set -e | ||
# Set arch to "x86_64" or "aarch64" to build it | ||
[ "\$BUILD_ARCH" ] || BUILD_ARCH=x86_64 | ||
eval "\$($OUT_DIR/bin/\$BUILD_ARCH-apple-*-osxcross-conf)" | ||
export OSXCROSS_HOST="\$BUILD_ARCH-apple-\$OSXCROSS_TARGET" | ||
export OSXCROSS_TOOLCHAIN_FILE="\$OSXCROSS_TARGET_DIR"/toolchain.cmake | ||
export CMAKE_TOOLCHAIN_FILE=\$QT_MACOS/lib/cmake/Qt6/qt.toolchain.cmake | ||
exec cmake -DQT_CHAINLOAD_TOOLCHAIN_FILE=\$OSXCROSS_TOOLCHAIN_FILE "\$@" | ||
EOF | ||
|
||
chmod +x /usr/local/bin/* | ||
|
||
# Required tools for macdeployqt, they will work for both architectures | ||
ln -s $OUT_DIR/bin/x86_64-apple-*-otool /usr/local/bin/otool | ||
ln -s $OUT_DIR/bin/x86_64-apple-*-install_name_tool /usr/local/bin/install_name_tool | ||
ln -s $OUT_DIR/bin/x86_64-apple-*-strip /usr/local/bin/strip | ||
|
||
echo | ||
echo '--> Restore the packages list to the original state' | ||
echo | ||
|
||
dpkg --get-selections | cut -f 1 > /tmp/packages_curr.lst | ||
grep -Fxv -f /tmp/packages_orig.lst /tmp/packages_curr.lst | xargs apt remove -y --purge | ||
|
||
# Complete the cleaning | ||
|
||
apt -qq clean | ||
rm -rf /var/lib/apt/lists/* /tmp/osxcross* |
Oops, something went wrong.