Skip to content
Closed
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
55 changes: 55 additions & 0 deletions .github/workflows/LinuxInstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:

- name: 'VCPKG: Set up VCPKG'
run: |
mkdir -p "$VCPKG_DEFAULT_BINARY_CACHE"
VCPKG_COMMIT="$(python3 - <<'PY'
import json
with open("loupe/vcpkg-configuration.json", encoding="utf-8") as f:
Expand Down Expand Up @@ -204,6 +205,60 @@ jobs:
evidence_dir="$RUNNER_TEMP/loupe-package-boundary-linux"
mkdir -p "$evidence_dir"
set -o pipefail
# Qt may ship the proprietary Mimer SQL driver, but its external
# libmimerapi.so is not part of the Loop distribution. linuxdeployqt
# validates every discovered plugin and aborts on that unresolved
# dependency, so remove this non-distributable optional driver from
# the ephemeral Qt installation before deployment.
sqldrivers_dir="$QT_ROOT_DIR/plugins/sqldrivers"
for optional_driver in libqsqlmimer.so libqsqloci.so; do
driver="$sqldrivers_dir/$optional_driver"
if [[ -e "$driver" ]]; then
rm -f "$driver"
echo "Removed non-distributable optional Qt SQL driver: $driver" | tee -a "$evidence_dir/linuxdeployqt.txt"
fi
done
for driver in "$sqldrivers_dir"/*.so; do
[[ -e "$driver" ]] || continue
unresolved="$(ldd "$driver" | awk '/=> not found/ { print $1 }')"
if [[ -n "$unresolved" ]]; then
echo "Removed Qt SQL driver with unresolved dependencies ($unresolved): $driver" | tee -a "$evidence_dir/linuxdeployqt.txt"
rm -f "$driver"
fi
done
platform_dir="install/usr/lib/platforms"
mkdir -p "$platform_dir"
for platform_plugin in libqoffscreen.so libqminimal.so; do
source_plugin="$QT_ROOT_DIR/plugins/platforms/$platform_plugin"
if [[ -e "$source_plugin" ]]; then
cp -f "$source_plugin" "$platform_dir/$platform_plugin"
echo "Staged Qt platform plugin: $platform_plugin" | tee -a "$evidence_dir/linuxdeployqt.txt"
elif [[ "$platform_plugin" == "libqoffscreen.so" ]]; then
echo "::error::Required Qt platform plugin is missing: $source_plugin"
exit 1
fi
done
qml_module_source="LoupeEditor/Loupe/Quick"
qml_module_destination="install/usr/lib/qml/Loupe/Quick"
if [[ ! -d "$qml_module_source" ]]; then
echo "::error::Built Loupe.Quick QML module is missing: $qml_module_source"
exit 1
fi
mkdir -p "$qml_module_destination"
cp -a "$qml_module_source/." "$qml_module_destination/"
sqlite_driver="$QT_ROOT_DIR/plugins/sqldrivers/libqsqlite.so"
if [[ ! -e "$sqlite_driver" ]]; then
echo "::error::Required Qt SQLite driver is missing: $sqlite_driver"
exit 1
fi
mkdir -p install/usr/lib/sqldrivers
cp -f "$sqlite_driver" install/usr/lib/sqldrivers/libqsqlite.so
cat > install/usr/bin/qt.conf <<'EOF'
[Paths]
Prefix=..
Plugins=lib
Qml2Imports=lib/qml
EOF
cp install/usr/share/icons/hicolor/scalable/apps/io.github.mberrys.Loupe-pdf.svg install/io.github.mberrys.Loupe-pdf.svg
bash "$GITHUB_WORKSPACE/loupe/scripts/ci/download_verified.sh" \
--gh-asset "probonopd/linuxdeployqt" \
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/WindowsInstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,20 @@ jobs:
throw "windeployqt failed for $name with exit code $exitCode"
}
}
$qmlModuleSource = Join-Path $env:GITHUB_WORKSPACE "loupeuildLoupeEditorLoupeQuick"
$qmlModuleDestination = Join-Path $installBin "qmlLoupeQuick"
if (-not (Test-Path -LiteralPath $qmlModuleSource -PathType Container)) {
throw "Built Loupe.Quick QML module is missing: $qmlModuleSource"
}
New-Item -ItemType Directory -Force -Path $qmlModuleDestination | Out-Null
Copy-Item -LiteralPath (Join-Path $qmlModuleSource "*") -Destination $qmlModuleDestination -Recurse -Force
$sqliteDriver = Join-Path $env:QT_ROOT_DIR "pluginssqldriversqsqlite.dll"
$sqliteDestination = Join-Path $installBin "sqldriversqsqlite.dll"
if (-not (Test-Path -LiteralPath $sqliteDriver)) {
throw "Required Qt SQLite driver is missing: $sqliteDriver"
}
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $sqliteDestination) | Out-Null
Copy-Item -LiteralPath $sqliteDriver -Destination $sqliteDestination -Force

# The clean installed-artifact smoke intentionally removes developer
# Qt environment variables. Make the staged tree self-describing so
Expand All @@ -289,7 +303,7 @@ jobs:
[Paths]
Prefix=.
Plugins=.
Qml2Imports=qml
Qml2Imports=qml;.
"@ | Set-Content -LiteralPath (Join-Path $installBin "qt.conf") -Encoding ascii
Copy-Item -LiteralPath (Join-Path $installBin "qt.conf") -Destination (Join-Path $evidenceDir "qt.conf")
env:
Expand Down
6 changes: 3 additions & 3 deletions Desktop/io.github.mberrys.Loupe-pdf.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<category>Utility</category>
</categories>
<developer_name>Michael Berry</developer_name>
<url type="homepage">https://github.com/mberrys/Loupe-pdf</url>
<url type="bugtracker">https://github.com/mberrys/Loupe-pdf/issues</url>
<url type="help">https://github.com/mberrys/Loupe-pdf</url>
<url type="homepage">https://github.com/studio-berry/loop</url>
<url type="bugtracker">https://github.com/studio-berry/loop/issues</url>
<url type="help">https://github.com/studio-berry/loop</url>
<content_rating type="oars-1.1"/>
<launchable type="desktop-id">io.github.mberrys.Loupe-pdf.desktop</launchable>
<releases>
Expand Down
3 changes: 3 additions & 0 deletions WixInstaller/Product.wxs.in
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ ${LOUPE_WIX_QT_STYLES_COMPONENT}

<Fragment>
<ComponentGroup Id="LOUPE_Editor">
<Component Id="cmpQtConf" Directory="INSTALLFOLDER" Guid="{A4B2C6D8-E0F1-4A3B-9C5D-7E8F0A1B2C3D}">
<File Id="filQtConf" KeyPath="yes" Source="$(var.MyInstallDir)\qt.conf" />
</Component>
<Component Id="cmpLoupeEditor" Directory="INSTALLFOLDER" Guid="{52D3CF62-F556-4E7A-BCEB-75E5E65ED786}">
<File Id="filLoupeEditor" KeyPath="yes" Source="$(var.MyInstallDir)\LoupeEditor.exe">
<Shortcut Id="LOUPE_Editor_Shortcut" Directory="ProgramMenuDir" Name="Loupe" Description="Inspect and prepare production PDFs" WorkingDirectory="INSTALLFOLDER" Icon="LOUPE_VP_Icon.exe" IconIndex="0" Advertise="yes"/>
Expand Down
4 changes: 4 additions & 0 deletions changes/cdx-ci-packaging-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Category: fixed
Audience: maintainers
Breaking-Change: no
Summary: Ensure Linux packaging creates the vcpkg binary cache directory and include the staged Qt configuration in the Windows MSI.
2 changes: 1 addition & 1 deletion scripts/smoke-test-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ PDF_TOOL="${BIN_DIR}/PdfTool"
PROFILE_PATH="${PROFILES_DIR}/loupe-default.json"

set +e
PREFLIGHT_OUTPUT="$("$PDF_TOOL" preflight "$TEST_PDF" --profile "$PROFILE_PATH" --console-format text 2>&1)"
PREFLIGHT_OUTPUT="$("$PDF_TOOL" preflight "$TEST_PDF" --profile "$PROFILE_PATH" --console-format json 2>&1)"
PREFLIGHT_EXIT=$?
set -e

Expand Down
6 changes: 3 additions & 3 deletions scripts/smoke-test-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,20 @@ Remove-Item Env:QT_ROOT_DIR -ErrorAction SilentlyContinue
Remove-Item Env:Qt6_DIR -ErrorAction SilentlyContinue
Remove-Item Env:LOUPE_QT_ROOT -ErrorAction SilentlyContinue
try {
$preflightOutput = & $pdfTool preflight $TestPdf --profile $profilePath --console-format text 2>&1
$preflightOutput = & $pdfTool preflight $TestPdf --profile $profilePath --console-format json 2>&1
$preflightExit = $LASTEXITCODE
Remove-Item Env:QT_QUICK_BACKEND -ErrorAction SilentlyContinue
$nativeOutput = @(& $editor --quick-smoke 2>&1)
$nativeExit = $LASTEXITCODE
if ($nativeExit -ne 0) {
throw "LoupeEditor native Quick startup failed with exit code $($nativeExit): $nativeOutput"
throw "LoupeEditor native Quick startup failed with exit code $($nativeExit): $($nativeOutput -join [Environment]::NewLine)"
}
Write-Host "OK: LoupeEditor native Quick startup"
$env:QT_QUICK_BACKEND = "software"
$softwareOutput = @(& $editor --quick-smoke 2>&1)
$softwareExit = $LASTEXITCODE
if ($softwareExit -ne 0) {
throw "LoupeEditor software Quick startup failed with exit code $($softwareExit): $softwareOutput"
throw "LoupeEditor software Quick startup failed with exit code $($softwareExit): $($softwareOutput -join [Environment]::NewLine)"
}
Write-Host "OK: LoupeEditor software Quick startup"
} finally {
Expand Down
Loading