-
-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feat/transparent-…
…window
- Loading branch information
Showing
269 changed files
with
8,795 additions
and
2,803 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
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
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,30 @@ | ||
param ( | ||
[string] $InstallDir = "Chatterino2" | ||
) | ||
|
||
if ($null -eq $Env:VCToolsRedistDir) { | ||
Write-Error "VCToolsRedistDir is not set. Forgot to set Visual Studio environment variables?"; | ||
exit 1 | ||
} | ||
|
||
# A path to the runtime libraries (e.g. "$Env:VCToolsRedistDir\onecore\x64\Microsoft.VC143.CRT") | ||
$vclibs = (Get-ChildItem "$Env:VCToolsRedistDir\onecore\x64" -Filter '*.CRT')[0].FullName; | ||
|
||
# All executables and libraries in the installation directory | ||
$targets = Get-ChildItem -Recurse -Include '*.dll', '*.exe' $InstallDir; | ||
# All dependencies of the targets (with duplicates) | ||
$all_deps = $targets | ForEach-Object { (dumpbin /DEPENDENTS $_.FullName) -match '^(?!Dump of).+\.dll$' } | ForEach-Object { $_.Trim() }; | ||
# All dependencies without duplicates | ||
$dependencies = $all_deps | Sort-Object -Unique; | ||
|
||
$n_deployed = 0; | ||
foreach ($dll in $dependencies) { | ||
Write-Output "Checking for $dll"; | ||
if (Test-Path -PathType Leaf "$vclibs\$dll") { | ||
Write-Output "Deploying $dll"; | ||
Copy-Item "$vclibs\$dll" "$InstallDir\$dll" -Force; | ||
$n_deployed++; | ||
} | ||
} | ||
|
||
Write-Output "Deployed $n_deployed libraries"; |
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,34 @@ | ||
#!/bin/bash | ||
|
||
set -ev; | ||
|
||
# aqt installs into .qtinstall/Qt/<version>/gcc_64 | ||
# This is doing the same as jurplel/install-qt-action | ||
# See https://github.com/jurplel/install-qt-action/blob/74ca8cd6681420fc8894aed264644c7a76d7c8cb/action/src/main.ts#L52-L74 | ||
qtpath=$(echo .qtinstall/Qt/[0-9]*/*/bin/qmake | sed -e s:/bin/qmake$::) | ||
export LD_LIBRARY_PATH="$qtpath/lib" | ||
export QT_ROOT_DIR=$qtpath | ||
export QT_PLUGIN_PATH="$qtpath/plugins" | ||
export PATH="$PATH:$(realpath "$qtpath/bin")" | ||
export Qt6_DIR="$(realpath "$qtpath")" | ||
|
||
cmake -S. -Bbuild-clang-tidy \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On \ | ||
-DUSE_PRECOMPILED_HEADERS=OFF \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \ | ||
-DCHATTERINO_LTO=Off \ | ||
-DCHATTERINO_PLUGINS=On \ | ||
-DBUILD_WITH_QT6=On \ | ||
-DBUILD_TESTS=On \ | ||
-DBUILD_BENCHMARKS=On | ||
|
||
# Run MOC and UIC | ||
# This will compile the dependencies | ||
# Get the targets using `ninja -t targets | grep autogen` | ||
cmake --build build-clang-tidy --parallel -t \ | ||
Core_autogen \ | ||
LibCommuni_autogen \ | ||
Model_autogen \ | ||
Util_autogen \ | ||
chatterino-lib_autogen |
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
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
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
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 |
---|---|---|
|
@@ -61,6 +61,10 @@ jobs: | |
submodules: recursive | ||
fetch-depth: 0 # allows for tags access | ||
|
||
- name: Fix git permission error | ||
run: | | ||
git config --global --add safe.directory '*' | ||
- name: Build | ||
run: | | ||
mkdir build | ||
|
@@ -112,24 +116,24 @@ jobs: | |
matrix: | ||
include: | ||
# macOS | ||
- os: macos-latest | ||
- os: macos-13 | ||
qt-version: 5.15.2 | ||
force-lto: false | ||
plugins: false | ||
plugins: true | ||
skip-artifact: false | ||
skip-crashpad: false | ||
# Windows | ||
- os: windows-latest | ||
qt-version: 6.5.0 | ||
qt-version: 6.7.1 | ||
force-lto: false | ||
plugins: false | ||
plugins: true | ||
skip-artifact: false | ||
skip-crashpad: false | ||
# Windows 7/8 | ||
- os: windows-latest | ||
qt-version: 5.15.2 | ||
force-lto: false | ||
plugins: false | ||
plugins: true | ||
skip-artifact: false | ||
skip-crashpad: true | ||
|
||
|
@@ -139,6 +143,8 @@ jobs: | |
C2_PLUGINS: ${{ matrix.plugins }} | ||
C2_ENABLE_CRASHPAD: ${{ matrix.skip-crashpad == false }} | ||
C2_BUILD_WITH_QT6: ${{ startsWith(matrix.qt-version, '6.') }} | ||
C2_USE_OPENSSL3: ${{ startsWith(matrix.qt-version, '6.') && 'True' || 'False' }} | ||
C2_CONAN_CACHE_SUFFIX: ${{ startsWith(matrix.qt-version, '6.') && '-QT6' || '' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -148,35 +154,15 @@ jobs: | |
|
||
- name: Install Qt5 | ||
if: startsWith(matrix.qt-version, '5.') | ||
uses: jurplel/install-qt-action@v3.3.0 | ||
uses: jurplel/install-qt-action@v4.0.0 | ||
with: | ||
cache: true | ||
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-v2 | ||
version: ${{ matrix.qt-version }} | ||
|
||
- name: Install Qt 6.5.3 imageformats | ||
if: startsWith(matrix.qt-version, '6.') | ||
uses: jurplel/[email protected] | ||
with: | ||
cache: false | ||
modules: qtimageformats | ||
set-env: false | ||
version: 6.5.3 | ||
extra: --noarchives | ||
|
||
- name: Find Qt 6.5.3 Path | ||
if: startsWith(matrix.qt-version, '6.') && startsWith(matrix.os, 'windows') | ||
shell: pwsh | ||
id: find-good-imageformats | ||
run: | | ||
cd "$Env:RUNNER_WORKSPACE/Qt/6.5.3" | ||
cd (Get-ChildItem)[0].Name | ||
cd plugins/imageformats | ||
echo "PLUGIN_PATH=$(pwd)" | Out-File -Path "$Env:GITHUB_OUTPUT" -Encoding ASCII | ||
- name: Install Qt6 | ||
if: startsWith(matrix.qt-version, '6.') | ||
uses: jurplel/install-qt-action@v3.3.0 | ||
uses: jurplel/install-qt-action@v4.0.0 | ||
with: | ||
cache: true | ||
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-v2 | ||
|
@@ -188,16 +174,9 @@ jobs: | |
if: startsWith(matrix.os, 'windows') | ||
uses: ilammy/[email protected] | ||
|
||
- name: Setup conan variables (Windows) | ||
if: startsWith(matrix.os, 'windows') | ||
run: | | ||
"C2_USE_OPENSSL3=$(if ($Env:C2_BUILD_WITH_QT6 -eq "on") { "True" } else { "False" })" >> "$Env:GITHUB_ENV" | ||
"C2_CONAN_CACHE_SUFFIX=$(if ($Env:C2_BUILD_WITH_QT6 -eq "on") { "-QT6" } else { "`" })" >> "$Env:GITHUB_ENV" | ||
shell: powershell | ||
|
||
- name: Setup sccache (Windows) | ||
# sccache v0.7.4 | ||
uses: hendrikmuhs/[email protected].12 | ||
uses: hendrikmuhs/[email protected].13 | ||
if: startsWith(matrix.os, 'windows') | ||
with: | ||
variant: sccache | ||
|
@@ -276,14 +255,9 @@ jobs: | |
cd build | ||
windeployqt bin/chatterino.exe --release --no-compiler-runtime --no-translations --no-opengl-sw --dir Chatterino2/ | ||
cp bin/chatterino.exe Chatterino2/ | ||
..\.CI\deploy-crt.ps1 Chatterino2 | ||
echo nightly > Chatterino2/modes | ||
- name: Fix Qt6 (windows) | ||
if: startsWith(matrix.qt-version, '6.') && startsWith(matrix.os, 'windows') | ||
working-directory: build | ||
run: | | ||
cp ${{ steps.find-good-imageformats.outputs.PLUGIN_PATH }}/qwebp.dll Chatterino2/imageformats/qwebp.dll | ||
- name: Package (windows) | ||
if: startsWith(matrix.os, 'windows') | ||
working-directory: build | ||
|
@@ -365,15 +339,15 @@ jobs: | |
|
||
# Windows | ||
- uses: actions/download-artifact@v4 | ||
name: Windows Qt6.5.0 | ||
name: Windows Qt6.7.1 | ||
with: | ||
name: chatterino-windows-x86-64-Qt-6.5.0.zip | ||
name: chatterino-windows-x86-64-Qt-6.7.1.zip | ||
path: release-artifacts/ | ||
|
||
- uses: actions/download-artifact@v4 | ||
name: Windows Qt6.5.0 symbols | ||
name: Windows Qt6.7.1 symbols | ||
with: | ||
name: chatterino-windows-x86-64-Qt-6.5.0-symbols.pdb.7z | ||
name: chatterino-windows-x86-64-Qt-6.7.1-symbols.pdb.7z | ||
path: release-artifacts/ | ||
|
||
- uses: actions/download-artifact@v4 | ||
|
@@ -406,18 +380,9 @@ jobs: | |
cp .CI/chatterino-nightly.flatpakref release-artifacts/ | ||
shell: bash | ||
|
||
# macOS | ||
- uses: actions/download-artifact@v4 | ||
name: macOS x86_64 Qt5.15.2 dmg | ||
with: | ||
name: chatterino-macos-Qt-5.15.2.dmg | ||
path: release-artifacts/ | ||
|
||
- name: Rename artifacts | ||
run: | | ||
ls -l | ||
# Rename the macos build to indicate that it's for macOS 10.15 users | ||
mv chatterino-macos-Qt-5.15.2.dmg Chatterino-macOS-10.15.dmg | ||
# Mark all Windows Qt5 builds as old | ||
mv chatterino-windows-x86-64-Qt-5.15.2.zip chatterino-windows-old-x86-64-Qt-5.15.2.zip | ||
|
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
Oops, something went wrong.