mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add macOS, Windows, & Ubuntu 22.04 Qt6 builds (#4522)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
c44e7295da
commit
bf6350ad79
|
@ -10,10 +10,20 @@ if [ ! -f ./bin/chatterino ] || [ ! -x ./bin/chatterino ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Qt5_DIR set to: ${Qt5_DIR}"
|
if [ -n "$Qt5_DIR" ]; then
|
||||||
|
echo "Using Qt DIR from Qt5_DIR: $Qt5_DIR"
|
||||||
|
_QT_DIR="$Qt5_DIR"
|
||||||
|
elif [ -n "$Qt6_DIR" ]; then
|
||||||
|
echo "Using Qt DIR from Qt6_DIR: $Qt6_DIR"
|
||||||
|
_QT_DIR="$Qt6_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${Qt5_DIR}/lib"
|
if [ -n "$_QT_DIR" ]; then
|
||||||
export PATH="${Qt5_DIR}/bin:$PATH"
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${_QT_DIR}/lib"
|
||||||
|
export PATH="${_QT_DIR}/bin:$PATH"
|
||||||
|
else
|
||||||
|
echo "No Qt environment variable set, assuming system-installed Qt"
|
||||||
|
fi
|
||||||
|
|
||||||
script_path=$(readlink -f "$0")
|
script_path=$(readlink -f "$0")
|
||||||
script_dir=$(dirname "$script_path")
|
script_dir=$(dirname "$script_path")
|
||||||
|
|
|
@ -5,8 +5,22 @@ if [ -d bin/chatterino.app ] && [ ! -d chatterino.app ]; then
|
||||||
mv bin/chatterino.app chatterino.app
|
mv bin/chatterino.app chatterino.app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$Qt5_DIR" ]; then
|
||||||
|
echo "Using Qt DIR from Qt5_DIR: $Qt5_DIR"
|
||||||
|
_QT_DIR="$Qt5_DIR"
|
||||||
|
elif [ -n "$Qt6_DIR" ]; then
|
||||||
|
echo "Using Qt DIR from Qt6_DIR: $Qt6_DIR"
|
||||||
|
_QT_DIR="$Qt6_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$_QT_DIR" ]; then
|
||||||
|
export PATH="${_QT_DIR}/bin:$PATH"
|
||||||
|
else
|
||||||
|
echo "No Qt environment variable set, assuming system-installed Qt"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Running MACDEPLOYQT"
|
echo "Running MACDEPLOYQT"
|
||||||
$Qt5_DIR/bin/macdeployqt chatterino.app
|
macdeployqt chatterino.app
|
||||||
echo "Creating python3 virtual environment"
|
echo "Creating python3 virtual environment"
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
echo "Entering python3 virtual environment"
|
echo "Entering python3 virtual environment"
|
||||||
|
@ -14,5 +28,5 @@ echo "Entering python3 virtual environment"
|
||||||
echo "Installing dmgbuild"
|
echo "Installing dmgbuild"
|
||||||
python3 -m pip install dmgbuild
|
python3 -m pip install dmgbuild
|
||||||
echo "Running dmgbuild.."
|
echo "Running dmgbuild.."
|
||||||
dmgbuild --settings ./../.CI/dmg-settings.py -D app=./chatterino.app Chatterino2 chatterino-osx.dmg
|
dmgbuild --settings ./../.CI/dmg-settings.py -D app=./chatterino.app Chatterino2 chatterino-osx-Qt-$1.dmg
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -24,7 +24,12 @@ case "$ubuntu_release" in
|
||||||
dependencies="libc6, libstdc++6, libqt5core5a, libqt5concurrent5, libqt5dbus5, libqt5gui5, libqt5network5, libqt5svg5, libqt5widgets5, qt5-image-formats-plugins, libboost-filesystem1.71.0"
|
dependencies="libc6, libstdc++6, libqt5core5a, libqt5concurrent5, libqt5dbus5, libqt5gui5, libqt5network5, libqt5svg5, libqt5widgets5, qt5-image-formats-plugins, libboost-filesystem1.71.0"
|
||||||
;;
|
;;
|
||||||
22.04)
|
22.04)
|
||||||
dependencies="libc6, libstdc++6, libqt5core5a, libqt5concurrent5, libqt5dbus5, libqt5gui5, libqt5network5, libqt5svg5, libqt5widgets5, qt5-image-formats-plugins, libboost-filesystem1.74.0"
|
if [ -n "$Qt6_DIR" ]; then
|
||||||
|
echo "Qt6_DIR set, assuming Qt6"
|
||||||
|
dependencies="libc6, libstdc++6, libqt6core6, libqt6widgets6, libqt6network6, libqt6core5compat6, libqt6svg6, qt6-qpa-plugins, qt6-image-formats-plugins"
|
||||||
|
else
|
||||||
|
dependencies="libc6, libstdc++6, libqt5core5a, libqt5concurrent5, libqt5dbus5, libqt5gui5, libqt5network5, libqt5svg5, libqt5widgets5, qt5-image-formats-plugins, libboost-filesystem1.74.0"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported Ubuntu release $ubuntu_release"
|
echo "Unsupported Ubuntu release $ubuntu_release"
|
||||||
|
|
59
.docker/Dockerfile-ubuntu-22.04-qt6-build
Normal file
59
.docker/Dockerfile-ubuntu-22.04-qt6-build
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
ARG UBUNTU_VERSION=22.04
|
||||||
|
|
||||||
|
FROM ubuntu:$UBUNTU_VERSION
|
||||||
|
|
||||||
|
ARG QT_VERSION=6.2.4
|
||||||
|
ARG BUILD_WITH_QT6=ON
|
||||||
|
|
||||||
|
ENV TZ=UTC
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get -y install --no-install-recommends \
|
||||||
|
cmake \
|
||||||
|
virtualenv \
|
||||||
|
rapidjson-dev \
|
||||||
|
libfuse2 \
|
||||||
|
libssl-dev \
|
||||||
|
libboost-dev \
|
||||||
|
libxcb-randr0-dev \
|
||||||
|
libboost-system-dev \
|
||||||
|
libboost-filesystem-dev \
|
||||||
|
libpulse-dev \
|
||||||
|
libxkbcommon-x11-0 \
|
||||||
|
build-essential \
|
||||||
|
libgl1-mesa-dev \
|
||||||
|
libxcb-icccm4 \
|
||||||
|
libxcb-image0 \
|
||||||
|
libxcb-keysyms1 \
|
||||||
|
libxcb-render-util0 \
|
||||||
|
libxcb-xinerama0 \
|
||||||
|
libfontconfig1-dev
|
||||||
|
|
||||||
|
RUN apt-get -y install \
|
||||||
|
git \
|
||||||
|
lsb-release \
|
||||||
|
python3-pip && \
|
||||||
|
apt-get clean all
|
||||||
|
|
||||||
|
# Install Qt as we do in CI
|
||||||
|
|
||||||
|
RUN pip3 install -U pip && \
|
||||||
|
pip3 install aqtinstall && \
|
||||||
|
aqt install-qt linux desktop $QT_VERSION -O /opt/qt --modules qt5compat
|
||||||
|
|
||||||
|
ADD . /src
|
||||||
|
|
||||||
|
RUN mkdir /src/build
|
||||||
|
|
||||||
|
# cmake
|
||||||
|
RUN cd /src/build && \
|
||||||
|
CXXFLAGS=-fno-sized-deallocation cmake \
|
||||||
|
-DBUILD_WITH_QT6=$BUILD_WITH_QT6 \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=appdir/usr/ \
|
||||||
|
-DCMAKE_PREFIX_PATH=/opt/qt/$QT_VERSION/gcc_64/lib/cmake \
|
||||||
|
-DBUILD_WITH_QTKEYCHAIN=OFF \
|
||||||
|
..
|
||||||
|
|
||||||
|
# build
|
||||||
|
RUN cd /src/build && \
|
||||||
|
make -j8
|
23
.docker/Dockerfile-ubuntu-22.04-qt6-package
Normal file
23
.docker/Dockerfile-ubuntu-22.04-qt6-package
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
ARG UBUNTU_VERSION=22.04
|
||||||
|
|
||||||
|
FROM chatterino-ubuntu-$UBUNTU_VERSION-qt6-build
|
||||||
|
|
||||||
|
# In CI, this is set from the aqtinstall action
|
||||||
|
ENV Qt6_DIR=/opt/qt/6.2.4/gcc_64
|
||||||
|
|
||||||
|
WORKDIR /src/build
|
||||||
|
|
||||||
|
ADD .CI /src/.CI
|
||||||
|
|
||||||
|
# Install dependencies necessary for AppImage packaging
|
||||||
|
RUN apt-get update && apt-get -y install --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
libxcb-shape0 \
|
||||||
|
libfontconfig1 \
|
||||||
|
file
|
||||||
|
|
||||||
|
# package deb
|
||||||
|
RUN ./../.CI/CreateUbuntuDeb.sh
|
||||||
|
|
||||||
|
# package appimage
|
||||||
|
RUN ./../.CI/CreateAppImage.sh
|
52
.github/workflows/build.yml
vendored
52
.github/workflows/build.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, macos-latest]
|
os: [windows-latest, macos-latest]
|
||||||
qt-version: [5.15.2, 5.12.12]
|
qt-version: [5.15.2, 6.5.0]
|
||||||
pch: [true]
|
pch: [true]
|
||||||
force-lto: [false]
|
force-lto: [false]
|
||||||
plugins: [false]
|
plugins: [false]
|
||||||
|
@ -190,7 +190,7 @@ jobs:
|
||||||
nmake /S /NOLOGO crashpad_handler
|
nmake /S /NOLOGO crashpad_handler
|
||||||
mkdir Chatterino2/crashpad
|
mkdir Chatterino2/crashpad
|
||||||
cp bin/crashpad/crashpad_handler.exe Chatterino2/crashpad/crashpad_handler.exe
|
cp bin/crashpad/crashpad_handler.exe Chatterino2/crashpad/crashpad_handler.exe
|
||||||
7z a bin/chatterino.pdb.7z bin/chatterino.pdb
|
7z a bin/chatterino-Qt-${{ matrix.qt-version }}.pdb.7z bin/chatterino.pdb
|
||||||
|
|
||||||
- name: Package (windows)
|
- name: Package (windows)
|
||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
@ -199,21 +199,21 @@ jobs:
|
||||||
windeployqt bin/chatterino.exe --release --no-compiler-runtime --no-translations --no-opengl-sw --dir Chatterino2/
|
windeployqt bin/chatterino.exe --release --no-compiler-runtime --no-translations --no-opengl-sw --dir Chatterino2/
|
||||||
cp bin/chatterino.exe Chatterino2/
|
cp bin/chatterino.exe Chatterino2/
|
||||||
echo nightly > Chatterino2/modes
|
echo nightly > Chatterino2/modes
|
||||||
7z a chatterino-windows-x86-64.zip Chatterino2/
|
7z a chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip Chatterino2/
|
||||||
|
|
||||||
- name: Upload artifact (Windows - binary)
|
- name: Upload artifact (Windows - binary)
|
||||||
if: startsWith(matrix.os, 'windows') && matrix.skip_artifact != 'yes'
|
if: startsWith(matrix.os, 'windows') && matrix.skip_artifact != 'yes'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: chatterino-windows-x86-64-${{ matrix.qt-version }}.zip
|
name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip
|
||||||
path: build/chatterino-windows-x86-64.zip
|
path: build/chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip
|
||||||
|
|
||||||
- name: Upload artifact (Windows - symbols)
|
- name: Upload artifact (Windows - symbols)
|
||||||
if: startsWith(matrix.os, 'windows') && matrix.skip_artifact != 'yes'
|
if: startsWith(matrix.os, 'windows') && matrix.skip_artifact != 'yes'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: chatterino-windows-x86-64-${{ matrix.qt-version }}-symbols.pdb.7z
|
name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}-symbols.pdb.7z
|
||||||
path: build/bin/chatterino.pdb.7z
|
path: build/bin/chatterino-Qt-${{ matrix.qt-version }}.pdb.7z
|
||||||
|
|
||||||
- name: Clean Conan cache
|
- name: Clean Conan cache
|
||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
@ -341,15 +341,15 @@ jobs:
|
||||||
pwd
|
pwd
|
||||||
ls -la build || true
|
ls -la build || true
|
||||||
cd build
|
cd build
|
||||||
sh ./../.CI/CreateDMG.sh
|
sh ./../.CI/CreateDMG.sh ${{ matrix.qt-version }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Upload artifact (MacOS)
|
- name: Upload artifact (MacOS)
|
||||||
if: startsWith(matrix.os, 'macos')
|
if: startsWith(matrix.os, 'macos')
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: chatterino-osx-${{ matrix.qt-version }}.dmg
|
name: chatterino-osx-Qt-${{ matrix.qt-version }}.dmg
|
||||||
path: build/chatterino-osx.dmg
|
path: build/chatterino-osx-Qt-${{ matrix.qt-version }}.dmg
|
||||||
create-release:
|
create-release:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -361,12 +361,22 @@ jobs:
|
||||||
fetch-depth: 0 # allows for tags access
|
fetch-depth: 0 # allows for tags access
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: chatterino-windows-x86-64-5.15.2.zip
|
name: chatterino-windows-x86-64-Qt-5.15.2.zip
|
||||||
path: release-artifacts/
|
path: release-artifacts/
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: chatterino-windows-x86-64-5.15.2-symbols.pdb.7z
|
name: chatterino-windows-x86-64-Qt-5.15.2-symbols.pdb.7z
|
||||||
|
path: release-artifacts/
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: chatterino-windows-x86-Qt-64-6.5.0.zip
|
||||||
|
path: release-artifacts/
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: chatterino-windows-x86-64-Qt-6.5.0-symbols.pdb.7z
|
||||||
path: release-artifacts/
|
path: release-artifacts/
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
|
@ -386,7 +396,17 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: chatterino-osx-5.15.2.dmg
|
name: Chatterino-ubuntu-22.04-Qt-6.2.4.deb
|
||||||
|
path: release-artifacts/
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: chatterino-osx-Qt-5.15.2.dmg
|
||||||
|
path: release-artifacts/
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: chatterino-osx-Qt-6.5.0.dmg
|
||||||
path: release-artifacts/
|
path: release-artifacts/
|
||||||
|
|
||||||
- name: Copy flatpakref
|
- name: Copy flatpakref
|
||||||
|
@ -394,6 +414,12 @@ jobs:
|
||||||
cp .CI/chatterino-nightly.flatpakref release-artifacts/
|
cp .CI/chatterino-nightly.flatpakref release-artifacts/
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Mark experimental
|
||||||
|
run: |
|
||||||
|
for file in *; do mv -n "$file" "$(echo $file | sed 's/\(6\(\.[[:digit:]]\)\{2\}\)/\1-EXPERIMENTAL/g')"; done
|
||||||
|
working-directory: release-artifacts
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: ncipollo/release-action@v1.12.0
|
uses: ncipollo/release-action@v1.12.0
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
- Dev: Add scripting capabilities with Lua (#4341, #4504)
|
- Dev: Add scripting capabilities with Lua (#4341, #4504)
|
||||||
- Dev: Conan 2.0 is now used instead of Conan 1.0. (#4417)
|
- Dev: Conan 2.0 is now used instead of Conan 1.0. (#4417)
|
||||||
- Dev: Added tests and benchmarks for `LinkParser`. (#4436)
|
- Dev: Added tests and benchmarks for `LinkParser`. (#4436)
|
||||||
|
- Dev: Experimental builds with Qt 6 are now provided. (#4522)
|
||||||
- Dev: Removed `CHATTERINO_TEST` definitions. (#4526)
|
- Dev: Removed `CHATTERINO_TEST` definitions. (#4526)
|
||||||
|
|
||||||
## 2.4.2
|
## 2.4.2
|
||||||
|
|
Loading…
Reference in a new issue