Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 147 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ jobs:
- name: Install dependencies
run: |
pip3 install --break-system-packages aqtinstall
python3 -m aqt install-qt mac desktop 6.3.1 -m qt5compat qtmultimedia qtimageformats
echo "${{ github.workspace }}/6.3.1/macos/bin" >> $GITHUB_PATH
python3 -m aqt install-qt mac desktop 6.9.3 -m qt5compat qtmultimedia qtimageformats qtshadertools
echo "${{ github.workspace }}/6.9.3/macos/bin" >> $GITHUB_PATH
brew install create-dmg
brew install node
brew link --overwrite node
Expand Down Expand Up @@ -420,8 +420,8 @@ jobs:
pip install -U pip
pip install aqtinstall
mkdir C:\Qt
python -m aqt install-qt windows desktop 6.3.1 win64_msvc2019_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats
dir C:\Qt\6.3.1\msvc2019_64\bin
python -m aqt install-qt windows desktop 6.9.3 win64_msvc2022_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools
dir C:\Qt\6.9.3\msvc2022_64\bin
choco install -y wget
choco install innosetup
mkdir %GITHUB_WORKSPACE%\compressed_archive
Expand All @@ -448,17 +448,17 @@ jobs:
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29
set PATH=C:\Qt\6.3.1\msvc2019_64\bin;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\Qt\6.9.3\msvc2022_64\bin;%PATH%
set DEFINES_VAR=DEFINES+="BUILD_NUMBER=\\\\\\\"${{ needs.initialization.outputs.build_number }}\\\\\\\""
qmake CONFIG+="7zip" %DEFINES_VAR%
nmake

- name: Run tests
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29
set PATH=C:\Qt\6.3.1\msvc2019_64\bin;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\Qt\6.9.3\msvc2022_64\bin;%PATH%
nmake check TESTARGS="-maxwarnings 100000"

- name: Upload executables for signing
Expand Down Expand Up @@ -504,8 +504,8 @@ jobs:
shell: cmd
working-directory: ci/win
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29
set PATH=C:\Qt\6.3.1\msvc2019_64\bin;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\Qt\6.9.3\msvc2022_64\bin;%PATH%
.\create_installer.cmd x64 7z ${{ needs.initialization.outputs.build_number }} qt6

- name: Verify installer was created
Expand Down Expand Up @@ -566,6 +566,141 @@ jobs:
name: windows-x64-qt6-${{ needs.initialization.outputs.build_number }}
path: ci/win/Output/YACReader*.exe

# Windows ARM64 Qt6 build
windows-arm64-qt6:
name: Windows ARM64 (Qt6)
runs-on: windows-2022
needs: [initialization, code-format-validation]
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'

- name: Install dependencies
shell: cmd
run: |
pip install aqtinstall
mkdir C:\Qt
python -m aqt install-qt windows desktop 6.9.3 win64_msvc2022_64 -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools
python -m aqt install-qt windows desktop 6.9.3 win64_msvc2022_arm64_cross_compiled -O c:\Qt -m qt5compat qtmultimedia qtimageformats qtshadertools
dir C:\Qt\6.9.3\msvc2022_arm64\bin
choco install -y wget
choco install innosetup
mkdir %GITHUB_WORKSPACE%\compressed_archive
wget "https://github.com/YACReader/yacreader-7z-deps/blob/main/7z2301-src.7z?raw=true" -O %GITHUB_WORKSPACE%\compressed_archive\7z2301-src.7z
7z x %GITHUB_WORKSPACE%\compressed_archive\7z2301-src.7z -o%GITHUB_WORKSPACE%\compressed_archive\lib7zip
wget "https://aka.ms/vs/17/release/vc_redist.arm64.exe" -O %GITHUB_WORKSPACE%\vc_redist.arm64.exe

- name: Prepare Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
set PATH=C:\Qt\6.9.3\msvc2022_arm64\bin;%PATH%
set DEFINES_VAR=DEFINES+="BUILD_NUMBER=\\\\\\\"${{ needs.initialization.outputs.build_number }}\\\\\\\""
qmake CONFIG+="7zip" %DEFINES_VAR%

- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
set PATH=C:\Qt\6.9.3\msvc2022_arm64\bin;%PATH%
nmake

- name: Upload executables for signing
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: actions/upload-artifact@v4
id: upload_executables
with:
name: windows-arm64-qt6-executables-unsigned-${{ needs.initialization.outputs.build_number }}
path: |
release/YACReader.exe
release/YACReaderLibrary.exe
release/YACReaderLibraryServer.exe

- name: Submit to SignPath
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
project-slug: 'yacreader'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'zipped-files'
github-artifact-id: ${{ steps.upload_executables.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: 'release/signed'

- name: Replace executables with signed versions
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
shell: pwsh
run: |
Copy-Item "release/signed/YACReader.exe" "release/YACReader.exe" -Force
Copy-Item "release/signed/YACReaderLibrary.exe" "release/YACReaderLibrary.exe" -Force
Copy-Item "release/signed/YACReaderLibraryServer.exe" "release/YACReaderLibraryServer.exe" -Force
Remove-Item -Path "release/signed" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "Signed executables are ready for installer creation"

- name: Create installer
shell: cmd
working-directory: ci/win
run: |
set PATH=C:\Qt\6.9.3\msvc2022_64\bin;%PATH%
.\create_installer.cmd arm64 7z ${{ needs.initialization.outputs.build_number }} qt6

- name: Verify installer was created
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
shell: pwsh
run: |
if (-not (Test-Path "ci/win/Output/YACReader*.exe")) {
throw "Installer file was not created"
}
Get-ChildItem "ci/win/Output/YACReader*.exe"

- name: Upload unsigned installer
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: actions/upload-artifact@v4
id: upload_unsigned
with:
name: windows-arm64-qt6-unsigned-${{ needs.initialization.outputs.build_number }}
path: ci/win/Output/YACReader*.exe

- name: Submit to SignPath
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
project-slug: 'yacreader'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'zipped-files'
github-artifact-id: ${{ steps.upload_unsigned.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: 'ci/win/Output/signed'

- name: Replace with signed installer and cleanup
if: github.repository == 'YACReader/yacreader' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
shell: pwsh
working-directory: ci/win/Output
run: |
$signedFiles = Get-ChildItem "signed/YACReader*.exe"
foreach ($file in $signedFiles) {
$destName = $file.Name
Copy-Item $file.FullName $destName -Force
Write-Host "Replaced with signed: $destName"
}
Remove-Item -Path "signed" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "Cleaned up signed directory"

- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: windows-arm64-qt6-${{ needs.initialization.outputs.build_number }}
path: ci/win/Output/YACReader*.exe

# Windows x86 Qt5 build
windows-x86:
name: Windows x86 (Qt5)
Expand Down Expand Up @@ -774,6 +909,7 @@ jobs:
- windows-x86
- windows-x64
- windows-x64-qt6
- windows-arm64-qt6
- docker-amd64
- docker-arm64
steps:
Expand Down Expand Up @@ -887,6 +1023,7 @@ jobs:
- windows-x86
- windows-x64
- windows-x64-qt6
- windows-arm64-qt6
- docker-amd64
- docker-arm64
steps:
Expand Down
8 changes: 8 additions & 0 deletions YACReader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ int main(int argc, char *argv[])
mwv->openComicFromPath(arglist.at(0));
}

// This forces the style that was being used before Qt6.7. Qt6.7 introduced a new style for Windows 11. The new style seems to have somo known bugs.
// There is a bug in the Windows 11 style that causes checked QToolButton to not have a background color (css doesn't work either).
// So it makes imposible for the user to see if the button is checked or not.
// QTBUG-132443
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
QApplication::setStyle("windowsvista");
#endif

#ifdef Q_OS_MACOS
app.setWindow(mwv);
#endif
Expand Down
8 changes: 8 additions & 0 deletions YACReaderLibrary/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,14 @@ int main(int argc, char **argv)

app.installEventFilter(mw);

// This forces the style that was being used before Qt6.7. Qt6.7 introduced a new style for Windows 11. The new style seems to have somo known bugs.
// There is a bug in the Windows 11 style that causes checked QToolButton to not have a background color (css doesn't work either).
// So it makes imposible for the user to see if the button is checked or not.
// QTBUG-132443
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
QApplication::setStyle("windowsvista");
#endif

int ret = app.exec();

QLOG_INFO() << "YACReaderLibrary closed with exit code :" << ret;
Expand Down
5 changes: 3 additions & 2 deletions YACReaderLibrary/qml/FlowView6.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick

import QtQuick.Controls

import Qt5Compat.GraphicalEffects

Expand Down
6 changes: 3 additions & 3 deletions YACReaderLibrary/qml/FolderContentView6.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.15
import QtQuick

import QtQuick.Controls 2.15
import QtQuick.Layouts 1.12
import QtQuick.Controls
import QtQuick.Layouts

import Qt5Compat.GraphicalEffects

Expand Down
6 changes: 3 additions & 3 deletions YACReaderLibrary/qml/GridComicsView6.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.15
import QtQuick

import QtQuick.Controls 2.15
import QtQuick.Layouts 1.12
import QtQuick.Controls
import QtQuick.Layouts

import Qt5Compat.GraphicalEffects

Expand Down
4 changes: 2 additions & 2 deletions YACReaderLibrary/qml/InfoComicsView6.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import QtQuick 2.15
import QtQuick

import QtQuick.Controls 2.15
import QtQuick.Controls

import com.yacreader.ComicModel 1.0

Expand Down
2 changes: 1 addition & 1 deletion YACReaderLibrary/qml/InfoFavorites6.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 2.15
import QtQuick

import Qt5Compat.GraphicalEffects

Expand Down
2 changes: 1 addition & 1 deletion YACReaderLibrary/qml/InfoRating6.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 2.15
import QtQuick

import Qt5Compat.GraphicalEffects

Expand Down
2 changes: 1 addition & 1 deletion YACReaderLibrary/qml/InfoTick6.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 2.15
import QtQuick

import Qt5Compat.GraphicalEffects

Expand Down
31 changes: 13 additions & 18 deletions ci/win/build_installer_qt6.iss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ OutputDir=..\Output
ChangesAssociations=true
SetupIconFile=setup.ico
UninstallDisplayIcon=uninstall.ico
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode={#PLATFORM}
ArchitecturesAllowed={#PLATFORM}

[Registry]
Root: HKCR; SubKey: .cbz; ValueType: string; ValueData: Comic Book (zip); Flags: uninsdeletekey; Tasks: File_association
Expand Down Expand Up @@ -43,41 +43,36 @@ Source: Qt6Network.dll; DestDir: {app}
Source: Qt6OpenGL.dll; DestDir: {app}
Source: Qt6OpenGLWidgets.dll; DestDir: {app}
Source: Qt6Qml.dll; DestDir: {app}
Source: Qt6QmlLocalStorage.dll; DestDir: {app}
Source: Qt6QmlModels.dll; DestDir: {app}
Source: Qt6QmlMeta.dll; DestDir: {app}
Source: Qt6QmlWorkerScript.dll; DestDir: {app}
Source: Qt6QmlXmlListModel.dll; DestDir: {app}
Source: Qt6Quick.dll; DestDir: {app}
Source: Qt6QuickEffects.dll; DestDir: {app}
Source: Qt6QuickControls2.dll; DestDir: {app}
Source: Qt6QuickControls2Impl.dll; DestDir: {app}
Source: Qt6QuickDialogs2.dll; DestDir: {app}
Source: Qt6QuickDialogs2QuickImpl.dll; DestDir: {app}
Source: Qt6QuickDialogs2Utils.dll; DestDir: {app}
Source: Qt6QuickControls2Basic.dll; DestDir: {app}
Source: Qt6QuickControls2BasicStyleImpl.dll; DestDir: {app}
Source: Qt6QuickControls2Fusion.dll; DestDir: {app}
Source: Qt6QuickControls2FusionStyleImpl.dll; DestDir: {app}
Source: Qt6QuickLayouts.dll; DestDir: {app}
Source: Qt6QuickParticles.dll; DestDir: {app}
Source: Qt6QuickShapes.dll; DestDir: {app}
Source: Qt6QuickTemplates2.dll; DestDir: {app}
Source: Qt6QuickWidgets.dll; DestDir: {app}
Source: Qt6Sql.dll; DestDir: {app}
Source: Qt6Svg.dll; DestDir: {app}

Source: Qt6ShaderTools.dll; DestDir: {app}

;Qt Angle
Source: opengl32sw.dll; DestDir: {app}
Source: D3Dcompiler_47.dll; DestDir: {app}

;Qt QML
Source: QtQml\*; DestDir: {app}\QtQml\; Flags: recursesubdirs
Source: QtQuick\*; DestDir: {app}\QtQuick\; Flags: recursesubdirs

;Qt5 Compat
Source: Qt5Compat\*; DestDir: {app}\Qt5Compat\; Flags: recursesubdirs
Source: opengl32sw.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
Source: D3Dcompiler_47.dll; DestDir: {app}; Flags: skipifsourcedoesntexist

;Qt PlugIns
Source:generic\*; DestDir: {app}\generic\
Source:iconengines\*; DestDir: {app}\iconengines\
Source:imageformats\*; DestDir: {app}\imageformats\
Source:networkinformation\*; DestDir: {app}\networkinformation\
Source:platforms\*; DestDir: {app}\platforms\
Source:qml\*; DestDir: {app}\qml\; Flags: recursesubdirs
Source:qmltooling\*; DestDir: {app}\qmltooling\
Source:sqldrivers\qsqlite.dll; DestDir: {app}\sqldrivers\
Source:styles\*; DestDir: {app}\styles\
Expand Down
Loading
Loading