Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Chatterino/chatterino2 into danke…
Browse files Browse the repository at this point in the history
…rino
  • Loading branch information
Mm2PL committed Sep 14, 2023
2 parents 4e48069 + 337b043 commit 2e40d33
Show file tree
Hide file tree
Showing 133 changed files with 1,821 additions and 1,437 deletions.
4 changes: 2 additions & 2 deletions .CI/build-installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ if ($isTagged) {
# This is a release.
# Make sure, any existing `modes` file is overwritten for the user,
# for example when updating from nightly to stable.
Write-Output "" > Chatterino2/modes;
Write-Output "" | Out-File Chatterino2/modes -Encoding ASCII;
$installerBaseName = "Chatterino.Installer";
}
else {
Write-Output nightly > Chatterino2/modes;
Write-Output nightly | Out-File Chatterino2/modes -Encoding ASCII;
$defines = "/DIS_NIGHTLY=1";
$installerBaseName = "Chatterino.Nightly.Installer";
}
Expand Down
2 changes: 1 addition & 1 deletion .CI/chatterino-installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Chatterino"
#define MyAppVersion "2.4.4"
#define MyAppVersion "2.4.5"
#define MyAppPublisher "Chatterino Team"
#define MyAppURL "https://www.chatterino.com"
#define MyAppExeName "chatterino.exe"
Expand Down
5 changes: 4 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Checks: "-*,
-performance-noexcept-move-constructor,
-misc-non-private-member-variables-in-classes,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-special-member-functions,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-identifier-length,
Expand All @@ -36,8 +35,12 @@ CheckOptions:
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase

- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.FunctionIgnoredRegexp
value: ^TEST$

- key: readability-identifier-naming.MemberCase
value: camelBack
- key: readability-identifier-naming.PrivateMemberIgnoredRegexp
Expand Down
38 changes: 38 additions & 0 deletions .docker/Dockerfile-ubuntu-20.04-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM ubuntu:20.04

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

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 5.12.12 && \
mkdir -p /opt/qt512 && \
mv /5.12.12/gcc_64/* /opt/qt512
39 changes: 1 addition & 38 deletions .docker/Dockerfile-ubuntu-20.04-build
Original file line number Diff line number Diff line change
@@ -1,41 +1,4 @@
FROM ubuntu:20.04

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

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 5.12.12 && \
mkdir -p /opt/qt512 && \
mv /5.12.12/gcc_64/* /opt/qt512
FROM chatterino-ubuntu-20.04-base

ADD . /src

Expand Down
44 changes: 44 additions & 0 deletions .docker/Dockerfile-ubuntu-22.04-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ubuntu:22.04

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 \
libfontconfig

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 5.15.2 && \
mkdir -p /opt/qt515 && \
mv /5.15.2/gcc_64/* /opt/qt515

ADD ./.patches /tmp/.patches

# Apply Qt patches
RUN patch "/opt/qt515/include/QtConcurrent/qtconcurrentthreadengine.h" /tmp/.patches/qt5-on-newer-gcc.patch
42 changes: 1 addition & 41 deletions .docker/Dockerfile-ubuntu-22.04-build
Original file line number Diff line number Diff line change
@@ -1,49 +1,9 @@
FROM ubuntu:22.04

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

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 5.15.2 && \
mkdir -p /opt/qt515 && \
mv /5.15.2/gcc_64/* /opt/qt515
FROM chatterino-ubuntu-22.04-base

ADD . /src

RUN mkdir /src/build

# Apply Qt patches
RUN patch "/opt/qt515/include/QtConcurrent/qtconcurrentthreadengine.h" /src/.patches/qt5-on-newer-gcc.patch

# cmake
RUN cd /src/build && \
CXXFLAGS=-fno-sized-deallocation cmake \
Expand Down
24 changes: 24 additions & 0 deletions .docker/Dockerfile-ubuntu-22.04-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM chatterino-ubuntu-22.04-base

ADD . /src

RUN mkdir /src/build

# cmake
RUN cd /src/build && \
CXXFLAGS=-fno-sized-deallocation cmake \
-DCMAKE_PREFIX_PATH=/opt/qt515/lib/cmake \
-DUSE_PRECOMPILED_HEADERS=OFF \
-DBUILD_WITH_QTKEYCHAIN=OFF \
-DBUILD_TESTS=ON \
..

# build
RUN cd /src/build && \
make -j8

ENV QT_QPA_PLATFORM=minimal
ENV QT_PLUGIN_PATH=/opt/qt515/plugins

# test
CMD /src/build/bin/chatterino-test
11 changes: 11 additions & 0 deletions .docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

To build, from the repo root

1. Build a docker image that contains all the dependencies necessary to build Chatterino on Ubuntu 20.04
`docker buildx build -t chatterino-ubuntu-20.04-base -f .docker/Dockerfile-ubuntu-20.04-base .`
1. Build a docker image that contains all the build artifacts and source from building Chatterino on Ubuntu 20.04
`docker buildx build -t chatterino-ubuntu-20.04-build -f .docker/Dockerfile-ubuntu-20.04-build .`
1. Build a docker image that uses the above-built image & packages it into a .deb file
Expand All @@ -20,6 +22,8 @@ To extract the final package, you can run the following command:

To build, from the repo root

1. Build a docker image that contains all the dependencies necessary to build Chatterino on Ubuntu 22.04
`docker buildx build -t chatterino-ubuntu-22.04-base -f .docker/Dockerfile-ubuntu-22.04-base .`
1. Build a docker image that contains all the build artifacts and source from building Chatterino on Ubuntu 22.04
`docker buildx build -t chatterino-ubuntu-22.04-build -f .docker/Dockerfile-ubuntu-22.04-build .`
1. Build a docker image that uses the above-built image & packages it into a .deb file
Expand All @@ -29,3 +33,10 @@ To extract the final package, you can run the following command:
`docker run -v $PWD:/opt/mount --rm -it chatterino-ubuntu-22.04-package bash -c "cp /src/build/Chatterino-x86_64.deb /opt/mount/"`

NOTE: The AppImage from Ubuntu 22.04 is broken. Approach with caution

#### Testing

1. Build a docker image builds the chatterino tests
`docker buildx build -t chatterino-ubuntu-22.04-test -f .docker/Dockerfile-ubuntu-22.04-test .`
1. Run the tests
`docker run --rm --network=host chatterino-ubuntu-22.04-test`
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
echo "C2_BUILD_WITH_QT6=ON" >> "$GITHUB_ENV"
shell: bash

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # allows for tags access
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:

- name: clang-tidy review
if: matrix.clang-tidy-review && github.event_name == 'pull_request'
uses: ZedThree/[email protected].2
uses: ZedThree/[email protected].4
with:
build_dir: build-clang-tidy
config_file: ".clang-tidy"
Expand All @@ -335,7 +335,7 @@ jobs:
- name: clang-tidy-review upload
if: matrix.clang-tidy-review && github.event_name == 'pull_request'
uses: ZedThree/clang-tidy-review/[email protected].2
uses: ZedThree/clang-tidy-review/[email protected].4

- name: Package - AppImage (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-20.04') && !matrix.skip-artifact
Expand Down Expand Up @@ -414,7 +414,7 @@ jobs:
if: (github.event_name == 'push' && github.ref == 'refs/heads/dankerino')

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # allows for tags access

Expand Down Expand Up @@ -491,7 +491,7 @@ jobs:
shell: bash

- name: Create release
uses: ncipollo/release-action@v1.12.0
uses: ncipollo/release-action@v1.13.0
with:
replacesArtifacts: true
allowUpdates: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: apt-get update
run: sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
VARIANT_SUFFIX: ${{ startsWith(matrix.qt-version, '6.') && '.EXPERIMENTAL-Qt6' || '' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # allows for tags access

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check formatting with Prettier
uses: actionsx/prettier@3d9f7c3fa44c9cb819e68292a328d7f4384be206
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post-clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: ZedThree/clang-tidy-review/[email protected].2
- uses: ZedThree/clang-tidy-review/[email protected].4
with:
lgtm_comment_body: ""
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
strategy:
matrix:
include:
- os: "ubuntu-20.04"
- os: "ubuntu-22.04"
qt-version: "5.15.2"
- os: "ubuntu-20.04"
- os: "ubuntu-22.04"
qt-version: "5.12.12"
- os: "ubuntu-22.04"
qt-version: "6.2.4"
Expand All @@ -32,7 +32,7 @@ jobs:
QT_MODULES: ${{ startsWith(matrix.qt-version, '6.') && 'qt5compat qtimageformats' || '' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -44,6 +44,12 @@ jobs:
modules: ${{ env.QT_MODULES }}
version: ${{ matrix.qt-version }}

- name: Apply Qt patches (Ubuntu)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.qt-version, '5.')
run: |
patch "$Qt5_DIR/include/QtConcurrent/qtconcurrentthreadengine.h" .patches/qt5-on-newer-gcc.patch
shell: bash

# LINUX
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Thumbs.db
dependencies
.cache
.editorconfig
vim.log

### CMake ###
CMakeLists.txt.user
Expand Down
Loading

0 comments on commit 2e40d33

Please sign in to comment.