Skip to content

Commit

Permalink
Merge pull request #630 from jdpurcell/gvr-mm
Browse files Browse the repository at this point in the history
Updates for new GraphicsView
  • Loading branch information
jurplel authored Oct 20, 2023
2 parents 05e17c2 + f1e3b3e commit 8eb7d68
Show file tree
Hide file tree
Showing 51 changed files with 4,417 additions and 1,103 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@ jobs:
strategy:
matrix:
include:
- runner: 'ubuntu-18.04'
- runner: 'ubuntu-20.04'
qtVersion: '5.15.2'
- runner: 'macOS-11'
- runner: 'ubuntu-20.04'
qtVersion: '5.9'
skipPlugins: 'true'
- runner: 'macos-latest'
qtVersion: '6.2.2'
- runner: 'macOS-10.15'
qtVersion: '5.12.12'
qtModules: 'qtimageformats'
- runner: 'macos-latest'
qtVersion: '5.15.2'
osSuffix: '_legacy'
skipHardPlugins: 'true'
- runner: 'windows-2019'
qtVersion: '6.2.2'
qtArch: 'win64_msvc2019_64'
osSuffix: '_64'
qtModules: 'qtimageformats'
- runner: 'windows-2019'
qtVersion: '5.15.2'
qtArch: 'win32_msvc2019'
Expand All @@ -51,20 +55,24 @@ jobs:
version: ${{ matrix.qtVersion }}
arch: ${{ matrix.qtArch }}
cache: true
modules: ${{ matrix.qtModules }}

- name: Build qView
shell: pwsh
run: ci/scripts/build.ps1
run: dist/scripts/build.ps1

- name: Deploy qView
shell: pwsh
run: |
if ("${{ matrix.skipPlugins }}" -ne "true") {
Invoke-Expression "& 'dist/scripts/download-plugins.ps1'"
}
if ($IsWindows) {
Invoke-Expression "& 'ci/scripts/windeployqt.ps1' ${{ env.buildNumString }}"
Invoke-Expression "& 'dist/scripts/windeployqt.ps1' ${{ env.buildNumString }}"
} elseif ($IsMacOS) {
bash ci/scripts/macdeploy.sh ${{ env.buildNumString }}
bash dist/scripts/macdeploy.sh ${{ env.buildNumString }}
} else {
bash ci/scripts/linuxdeployqt.sh ${{ env.buildNumString }}
bash dist/scripts/linuxdeployqt.sh ${{ env.buildNumString }}
}
- name: 'Upload Artifact'
Expand Down
2 changes: 2 additions & 0 deletions dist/linux/com.interversehq.qView.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
</provides>
<content_rating type="oars-1.0" />
<releases>
<release version="6.1" date="2023-08-15" />
<release version="6.0" date="2023-08-10" />
<release version="5.0" date="2022-01-12" />
<release version="4.0" date="2020-10-30" />
</releases>
Expand Down
6 changes: 3 additions & 3 deletions dist/linux/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
qview (5.0-5) bionic; urgency=low
qview (6.1-1) bionic; urgency=low

* Fix not requiring qtbase5-dev-tools
* Initial release

-- jurplel <jurplel@interversehq.com> Fri, 14 Jan 2022 20:44:22 -0500
-- jurplel <jurplel@interversehq.com> Tue, 15 Aug 2023 20:26:07 -0400
4 changes: 2 additions & 2 deletions dist/linux/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Source: qview
Section: graphics
Priority: optional
Maintainer: jurplel <jurplel@interversehq.com>
Build-Depends: debhelper (>= 11), qtbase5-dev (>= 5.9), qtbase5-dev-tools (>= 5.9), qt5-qmake (>= 5.9), qttools5-dev-tools (>= 5.9)
Build-Depends: debhelper (>= 11), qtbase5-dev (>= 5.9), qtbase5-dev-tools (>= 5.9), qt5-qmake (>= 5.9), qttools5-dev-tools (>= 5.9), libqt5x11extras5-dev (>= 5.9)
Standards-Version: 4.1.3
Homepage: https://interversehq.com/qview

Package: qview
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5widgets5 (>= 5.9), libqt5network5 (>= 5.9), libqt5concurrent5 (>= 5.9)
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5widgets5 (>= 5.9), libqt5network5 (>= 5.9), libqt5concurrent5 (>= 5.9), libqt5x11extras5 (>= 5.9)
Recommends: qt5-image-formats-plugins (>= 5.9), libqt5svg5 (>= 5.9)
Suggests: qt-heif-image-plugin (>= 0.3.3), kimageformats (>= 5.38.0)
Description: Practical and minimal image viewer
Expand Down
4 changes: 2 additions & 2 deletions dist/linux/debian/control_bionic
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Source: qview
Section: graphics
Priority: optional
Maintainer: jurplel <jurplel@interversehq.com>
Build-Depends: debhelper (>= 11), qt5-default (>= 5.9), qttools5-dev-tools (>= 5.9)
Build-Depends: debhelper (>= 11), qt5-default (>= 5.9), qttools5-dev-tools (>= 5.9), libqt5x11extras5-dev (>= 5.9)
Standards-Version: 4.1.3
Homepage: https://interversehq.com/qview

Package: qview
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5widgets5 (>= 5.9), libqt5network5 (>= 5.9), libqt5concurrent5 (>= 5.9)
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5widgets5 (>= 5.9), libqt5network5 (>= 5.9), libqt5concurrent5 (>= 5.9), libqt5x11extras5 (>= 5.9)
Recommends: qt5-image-formats-plugins (>= 5.9), libqt5svg5 (>= 5.9)
Suggests: qt-heif-image-plugin (>= 0.3.3), kimageformats (>= 5.38.0)
Description: Practical and minimal image viewer
Expand Down
5 changes: 3 additions & 2 deletions dist/linux/rpm/qview.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: qview
Version: 5.0
Version: 6.1
Release: 1
Summary: Practical and minimal image viewer

Expand All @@ -12,6 +12,7 @@ BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.9
BuildRequires: pkgconfig(Qt5Widgets) >= 5.9
BuildRequires: pkgconfig(Qt5Network) >= 5.9
BuildRequires: pkgconfig(Qt5X11Extras) >= 5.9


%description
Expand Down Expand Up @@ -42,4 +43,4 @@ cp dist/linux/com.interversehq.qView.appdata.xml %{buildroot}/usr/share/metainfo
%license LICENSE
%doc README.md

%changelog
%changelog
62 changes: 0 additions & 62 deletions dist/mac/Info_legacy.plist

This file was deleted.

6 changes: 3 additions & 3 deletions ci/scripts/build.ps1 → dist/scripts/build.ps1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/pwsh
#!/usr/bin/env pwsh

param
(
$Prefix = "/usr"
)

if ($IsWindows) {
ci/scripts/vcvars.ps1
dist/scripts/vcvars.ps1
}

if ((qmake --version -split '\n')[1][17] -eq '6') {
Expand All @@ -20,4 +20,4 @@ if ($IsWindows) {
nmake
} else {
make
}
}
111 changes: 111 additions & 0 deletions dist/scripts/download-plugins.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/usr/bin/env pwsh

# This script will download binary plugins from the kimageformats-binaries repository using Github's API.

$pluginNames = "qtapng", "kimageformats"

$qtVersion = ((qmake --version -split '\n')[1] -split ' ')[3]
Write-Host "Detected Qt Version $qtVersion"

# Qt version availability and runner names are assumed.
if ($IsWindows) {
$imageName = "windows-2019"
} elseif ($IsMacOS) {
$imageName = "macos-latest"
} else {
$imageName = "ubuntu-20.04"
}

$binaryBaseUrl = "https://github.com/jurplel/kimageformats-binaries/releases/download/cont"

if ($pluginNames.count -eq 0) {
Write-Host "the pluginNames array is empty."
}

foreach ($pluginName in $pluginNames) {
$arch = If (-not $env:arch -or $env:arch -eq '') { "" } Else { "-$env:arch" }
$artifactName = "$pluginName-$imageName-$qtVersion$arch.zip"
$downloadUrl = "$binaryBaseUrl/$artifactName"

Write-Host "Downloading $downloadUrl"
Invoke-WebRequest -URI $downloadUrl -OutFile $artifactName
Expand-Archive $artifactName -DestinationPath $pluginName
Remove-Item $artifactName
}


if ($IsWindows) {
$out_frm = "bin/"
$out_imf = "bin/imageformats"
} elseif ($IsMacOS) {
$out_frm = "bin/qView.app/Contents/Frameworks"
$out_imf = "bin/qView.app/Contents/PlugIns/imageformats"
} else {
$out_frm = "bin/appdir/usr/lib"
$out_imf = "bin/appdir/usr/plugins/imageformats"
}

New-Item -Type Directory -Path "$out_frm" -ErrorAction SilentlyContinue
New-Item -Type Directory -Path "$out_imf" -ErrorAction SilentlyContinue

# Copy QtApng
if ($pluginNames -contains 'qtapng') {
if ($IsWindows) {
cp qtapng/QtApng/plugins/imageformats/qapng.dll "$out_imf/"
} elseif ($IsMacOS) {
cp qtapng/QtApng/plugins/imageformats/libqapng.dylib "$out_imf/"
} else {
cp qtapng/QtApng/plugins/imageformats/libqapng.so "$out_imf/"
}
}

if ($pluginNames -contains 'kimageformats') {
if ($IsWindows) {
mv kimageformats/kimageformats/output/kimg_*.dll "$out_imf/"
# Copy karchive
if (Test-Path -Path kimageformats/kimageformats/output/KF5Archive.dll -PathType Leaf) {
cp kimageformats/kimageformats/output/zlib1.dll "$out_frm/"
cp kimageformats/kimageformats/output/KF5Archive.dll "$out_frm/"
}
# copy avif stuff
if (Test-Path -Path kimageformats/kimageformats/output/avif.dll -PathType Leaf) {
cp kimageformats/kimageformats/output/avif.dll "$out_frm/"
cp kimageformats/kimageformats/output/aom.dll "$out_frm/"
}
# copy heif stuff
if (Test-Path -Path kimageformats/kimageformats/output/heif.dll -PathType Leaf) {
cp kimageformats/kimageformats/output/heif.dll "$out_frm/"
cp kimageformats/kimageformats/output/de265.dll "$out_frm/"
cp kimageformats/kimageformats/output/libx265.dll "$out_frm/"
}
# copy raw stuff
if (Test-Path -Path kimageformats/kimageformats/output/raw.dll -PathType Leaf) {
cp kimageformats/kimageformats/output/zlib1.dll "$out_frm/"
cp kimageformats/kimageformats/output/raw.dll "$out_frm/"
cp kimageformats/kimageformats/output/lcms2.dll "$out_frm/"
}
# copy jxl stuff
if (Test-Path -Path kimageformats/kimageformats/output/jxl.dll -PathType Leaf) {
cp kimageformats/kimageformats/output/jxl.dll "$out_frm/"
cp kimageformats/kimageformats/output/jxl_threads.dll "$out_frm/"
cp kimageformats/kimageformats/output/hwy.dll "$out_frm/"
cp kimageformats/kimageformats/output/brotlicommon.dll "$out_frm/"
cp kimageformats/kimageformats/output/brotlidec.dll "$out_frm/"
cp kimageformats/kimageformats/output/brotlienc.dll "$out_frm/"
}
# copy jxl stuff
if (Test-Path -Path kimageformats/kimageformats/output/OpenEXR-3_1.dll -PathType Leaf) {
cp kimageformats/kimageformats/output/zlib1.dll "$out_frm/"
cp kimageformats/kimageformats/output/OpenEXR-3_1.dll "$out_frm/"
cp kimageformats/kimageformats/output/Imath-3_1.dll "$out_frm/"
cp kimageformats/kimageformats/output/IlmThread-3_1.dll "$out_frm/"
cp kimageformats/kimageformats/output/Iex-3_1.dll "$out_frm/"
}
} elseif ($IsMacOS) {
cp kimageformats/kimageformats/output/*.so "$out_imf/"
cp kimageformats/kimageformats/output/libKF5Archive.5.dylib "$out_frm/"
} else {
cp kimageformats/kimageformats/output/kimg_*.so "$out_imf/"
cp kimageformats/kimageformats/output/libKF5Archive.so.5 "$out_frm/"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 8 additions & 7 deletions ci/scripts/windeployqt.ps1 → dist/scripts/windeployqt.ps1
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param

# Download and extract openssl
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest https://mirror.firedaemon.com/OpenSSL/openssl-1.1.1q.zip -O openssl.zip
Invoke-WebRequest https://www.firedaemon.com/download-firedaemon-openssl-1-zip -O openssl.zip
7z x -y .\openssl.zip

# Check if "arch" environment variable is win32
Expand All @@ -21,10 +21,11 @@ if ($env:arch.substring(3, 2) -eq '32') {
# Run windeployqt which should be in path
windeployqt bin/qView.exe --no-compiler-runtime

# Do renaming-y stuff
mv bin\qView.exe "bin\qView-nightly-$NightlyVersion.exe"

# Call innomake if we are not building a nightly version (no version passed)
if ($NightlyVersion -ne '') {
& "ci/scripts/innomake.ps1"
}
if ($NightlyVersion -eq '') {
# Call innomake if we are not building a nightly version (no version passed)
& "dist/scripts/innomake.ps1"
} else {
# Do renaming-y stuff otherwise
mv bin\qView.exe "bin\qView-nightly-$NightlyVersion.exe"
}
4 changes: 2 additions & 2 deletions dist/win/qView32.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#define MyAppExeName "qView.exe"

; Update these when building
#define MyAppVersion "5.0"
#define MyAppYear "2022"
#define MyAppVersion "6.1"
#define MyAppYear "2023"

[Setup]
AppId={{A6A9BAAB-C59E-4EAB-ACE1-3EEDE3031880}
Expand Down
4 changes: 2 additions & 2 deletions dist/win/qView64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#define MyAppExeName "qView.exe"

; Update these when building
#define MyAppVersion "5.0"
#define MyAppYear "2022"
#define MyAppVersion "6.1"
#define MyAppYear "2023"

[Setup]
AppId={{A6A9BAAB-C59E-4EAB-ACE1-3EEDE3031880}
Expand Down
Loading

0 comments on commit 8eb7d68

Please sign in to comment.