Linux support (#381)
* Add desktop release CI and support for Arch Linux packaging * Make Gradle wrapper executable in desktop-release workflow * Make Gradle wrapper executable in desktop-release workflow * Make Gradle wrapper executable in desktop-release workflow * Configure Gradle and update Java environment in desktop-release workflow * Update Java setup and AUR packaging in desktop release workflow * Update Java setup and AUR packaging in desktop release workflow * Add MSIX packaging support for Windows desktop distribution * Update AUR packaging metadata and validation * Use spine toc attribute for NCX resolution * crash fixes * Implement automatic discovery and injection of EPUB font face siblings * Enhance custom font support with family grouping and variable font handling * Optimize metadata loading and improve TTS highlighting * Add keyboard navigation support for EPUB reader * Refine PDF spread page sizing to respect aspect ratios * Implement responsive maximum height for reader popups and sheets * Handle TTS generation failures by skipping problematic chunks * Refactor PDF tile rendering logic and zoom indicator behavior * Prefer block and offset locators over page index in native vertical flow * Implement save and share actions for original book files * Add Estonian language support * Implement temporary viewing mode for external files * Implement direct opening for temporary external files without library persistence * fix failing tests * Import SharedFileCapabilities in DesktopLibraryUi * Improve native vertical reader progress, persistence, and image support * Center target in viewport for native vertical reader and support animated scrolling
This commit is contained in:
parent
a13d6599d1
commit
625a4d5d2e
102 changed files with 6012 additions and 687 deletions
52
scripts/desktop/download-pdfium.ps1
Normal file
52
scripts/desktop/download-pdfium.ps1
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
param(
|
||||
[string]$Repository = $env:GITHUB_REPOSITORY,
|
||||
[string]$Tag = "pdfium-desktop-v1",
|
||||
[string]$Destination = "third_party/pdfium"
|
||||
)
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($Repository)) {
|
||||
throw "Repository is required. Pass -Repository owner/repo or set GITHUB_REPOSITORY."
|
||||
}
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$assets = @(
|
||||
@{ Name = "pdfium-linux-x64-v8.zip"; Directory = "linux-x64-v8" },
|
||||
@{ Name = "pdfium-win-x64-v8.zip"; Directory = "win-x64-v8" }
|
||||
)
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $Destination | Out-Null
|
||||
$workDir = Join-Path ([System.IO.Path]::GetTempPath()) ("reader-pdfium-" + [System.Guid]::NewGuid().ToString("N"))
|
||||
New-Item -ItemType Directory -Force -Path $workDir | Out-Null
|
||||
|
||||
try {
|
||||
foreach ($asset in $assets) {
|
||||
$zipPath = Join-Path $workDir $asset.Name
|
||||
gh release download $Tag --repo $Repository --pattern $asset.Name --dir $workDir --clobber
|
||||
|
||||
if (-not (Test-Path $zipPath)) {
|
||||
throw "Pdfium release asset was not downloaded: $($asset.Name)"
|
||||
}
|
||||
|
||||
$targetDir = Join-Path $Destination $asset.Directory
|
||||
if (Test-Path $targetDir) {
|
||||
Remove-Item -Recurse -Force $targetDir
|
||||
}
|
||||
|
||||
$extractDir = Join-Path $workDir $asset.Directory
|
||||
New-Item -ItemType Directory -Force -Path $extractDir | Out-Null
|
||||
Expand-Archive -Force -Path $zipPath -DestinationPath $extractDir
|
||||
|
||||
$rootedDir = Join-Path $extractDir $asset.Directory
|
||||
if (Test-Path $rootedDir) {
|
||||
Move-Item -Path $rootedDir -Destination $targetDir
|
||||
} else {
|
||||
New-Item -ItemType Directory -Force -Path $targetDir | Out-Null
|
||||
Move-Item -Path (Join-Path $extractDir "*") -Destination $targetDir
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (Test-Path $workDir) {
|
||||
Remove-Item -Recurse -Force $workDir
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue