Skip to content

Conversation

@haussmann
Copy link
Contributor

@haussmann haussmann commented Dec 22, 2025

  • Fixes the checkver, so no more release candidates are allowed
  • Fixes autoupdate hash extraction
  • adds dependency extras/vcredist2022

Replaces shortcut with mupdf-gl.exe, since:

The main viewer program that sports the most features

  • keeping the old one additionally prevents the mupdf-gl from being recommended by windows to open PDF files

Furthermore:

Checkver OK

PS C:\Users\WDAGUtilityAccount\scoop\buckets\extras> .\bin\checkver.ps1 mupdf
mupdf: 1.27.0

Autoupdate OK:

PS C:\Users\WDAGUtilityAccount\scoop\buckets\extras> .\bin\checkver.ps1 mupdf -f
mupdf: 1.27.0 (scoop version is 1.27.0)
Forcing autoupdate!
Autoupdating mupdf
DEBUG[1766423083.58134] [$updatedProperties] = [hash url] -> C:\Users\WDAGUtilityAccount\scoop\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1766423083.64418] $substitutions (hashtable) -> C:\Users\WDAGUtilityAccount\scoop\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1766423083.64418] $substitutions.$buildVersion                                                                                                                                                           
DEBUG[1766423083.64418] $substitutions.$match1                        1.27.0                                                                                                                                   
DEBUG[1766423083.64418] $substitutions.$preReleaseVersion             1.27.0                                                                                                                                   
DEBUG[1766423083.64418] $substitutions.$version                       1.27.0                                                                                                                                   
DEBUG[1766423083.64418] $substitutions.$patchVersion                  0                                                                                                                                        
DEBUG[1766423083.64418] $substitutions.$urlNoExt                      https://casper.mupdf.com/downloads/archive/mupdf-1.27.0-windows                                                                          
DEBUG[1766423083.64418] $substitutions.$dotVersion                    1.27.0                                                                                                                                   
DEBUG[1766423083.64418] $substitutions.$cleanVersion                  1270                                                                                                                                     
DEBUG[1766423083.64418] $substitutions.$underscoreVersion             1_27_0                                                                                                                                   
DEBUG[1766423083.64418] $substitutions.$minorVersion                  27                                                                                                                                       
DEBUG[1766423083.64418] $substitutions.$url                           https://casper.mupdf.com/downloads/archive/mupdf-1.27.0-windows.zip                                                                      
DEBUG[1766423083.64418] $substitutions.$majorVersion                  1                                                                                                                                        
DEBUG[1766423083.64418] $substitutions.$matchTail                                                                                                                                                              
DEBUG[1766423083.64418] $substitutions.$basenameNoExt                 mupdf-1.27.0-windows                                                                                                                     
DEBUG[1766423083.64418] $substitutions.$basename                      mupdf-1.27.0-windows.zip                                                                                                                 
DEBUG[1766423083.64418] $substitutions.$dashVersion                   1-27-0                                                                                                                                   
DEBUG[1766423083.64418] $substitutions.$baseurl                       https://casper.mupdf.com/downloads/archive                                                                                               
DEBUG[1766423083.64418] $substitutions.$matchHead                     1.27.0                                                                                                                                   
DEBUG[1766423083.73772] $hashfile_url = https://mupdf.com/releases?product=MuPDF -> C:\Users\WDAGUtilityAccount\scoop\apps\scoop\current\lib\autoupdate.ps1:224:5
Searching hash for mupdf-1.27.0-windows.zip in https://mupdf.com/releases?product=MuPDF
DEBUG[1766423083.84726] $regex = mupdf-1\.27\.0-windows\.zip[^}]+SHA256":"(\w+)" -> C:\Users\WDAGUtilityAccount\scoop\apps\scoop\current\lib\autoupdate.ps1:78:9
Found: f3e60b630453301914e52fb8ec001f6ab56cdb90daf39e533deae3ff214fcff8 using Extract Mode
Writing updated mupdf manifest

Confirmed Virustotal OK

https://www.virustotal.com/gui/file/f3e60b630453301914e52fb8ec001f6ab56cdb90daf39e533deae3ff214fcff8

Tests

  • updated from v1.21.0-rc1 to v1.27.0
  • uninstall
  • application seems to run fine in a minimal test

Observations

Stores data outside of scoop:

  • ~\.mupdf.history

Summary by CodeRabbit

  • Updates
    • Switched to MuPDF GL version for package distribution
    • Added Visual C++ 2022 redistributable as a suggested dependency
    • Updated package download sources and version detection endpoints

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

The PR updates the mupdf manifest file with revised download URLs pointing to casper.mupdf.com, changes the executable shortcut from mupdf.exe to mupdf-gl.exe, adds a vcredist2022 suggestion, and refines version checking and hash extraction patterns and URLs.

Changes

Cohort / File(s) Summary
mupdf manifest configuration
bucket/mupdf.json
Added suggest field for vcredist2022; updated 64-bit download and autoupdate URLs to casper.mupdf.com; changed shortcuts mapping from mupdf.exe to mupdf-gl.exe; updated checkver URL to mupdf.com/releases?product=MuPDF with refined regex for numeric versions; adjusted autoupdate hash URL and SHA256 extraction regex

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Verify all updated URLs (checkver, autoupdate, download) are syntactically correct and resolve properly
  • Review regex patterns for version extraction and SHA256 hash extraction to ensure they correctly match new URL patterns
  • Confirm the shortcuts mapping change from mupdf.exe to mupdf-gl.exe is intentional and matches upstream changes

Possibly related PRs

Suggested labels

review-needed

Suggested reviewers

  • z-Fng

Poem

🐰 A manifest tale, with URLs renewed,
From mupdf.com, the downloads pursued,
GL-enabled shortcuts, now shining bright,
Regex patterns polished for hashes done right! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: version update to 1.27.0 with fixes to checkver, autoupdate, and shortcut replacement.
Description check ✅ Passed The description covers all required template elements: it references the issue closure, includes the conventional PR title checkbox marked, confirms reading the Contributing Guide, and provides detailed implementation notes with verification steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

mupdf

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
bucket/mupdf.json (1)

1-41: Consider adding a notes field about data storage.

The PR objectives mention that mupdf stores data outside Scoop in ~/.mupdf.history. Consider adding a "notes" field to inform users about this persistent data location.

🔎 Suggested addition

After the homepage or license field, you could add:

"notes": "MuPDF stores history data in ~/.mupdf.history outside of the Scoop directory."
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc8e041 and f9dc511.

📒 Files selected for processing (1)
  • bucket/mupdf.json
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds in recent versions uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format. This was confirmed by a working 10.0.0 update with valid hash.
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format.
📚 Learning: 2025-10-15T11:54:31.320Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16341
File: bucket/foxit-pdf-reader.json:47-50
Timestamp: 2025-10-15T11:54:31.320Z
Learning: In bucket/foxit-pdf-reader.json and bucket/foxit-reader.json, the checkver script uses MaximumRedirection 1 (not 0) for Invoke-WebRequest to properly handle Foxit's backend redirect behavior when parsing the Location header for version detection.

Applied to files:

  • bucket/mupdf.json
📚 Learning: 2025-09-05T09:41:52.653Z
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds in recent versions uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format. This was confirmed by a working 10.0.0 update with valid hash.

Applied to files:

  • bucket/mupdf.json
📚 Learning: 2025-10-16T15:59:21.258Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16349
File: bucket/fvim.json:45-49
Timestamp: 2025-10-16T15:59:21.258Z
Learning: In Scoop manifests, the `autoupdate.url` and `autoupdate.architecture.<arch>.url` fields must be valid URIs according to the JSON schema (defined with `"format": "uri"`). Variables like `$matchUrlx64` that contain only path segments must be combined with a base URL (e.g., `https://github.com/.../releases/download/`) to form a complete valid URI.

Applied to files:

  • bucket/mupdf.json
📚 Learning: 2025-09-05T09:41:52.653Z
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format.

Applied to files:

  • bucket/mupdf.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (5)
bucket/mupdf.json (5)

20-25: Good change to use the primary viewer executable.

Switching the shortcut from mupdf.exe to mupdf-gl.exe is appropriate if the GL version is the primary viewer. This prevents Windows from recommending the legacy executable while keeping both binaries accessible via the command line.


11-11: No action needed. The casper.mupdf.com download source is officially maintained by Artifex Software and is a stable, approved distribution channel. The URL is valid and will remain reliable for future releases.


6-8: Clarify vcredist2022 dependency classification.

The vcredist2022 entry is marked as optional ("suggest") rather than required ("depends"). While third-party mupdf bindings document Visual C++ Redistributable as a requirement, official mupdf documentation does not explicitly list it as a runtime dependency. Verify whether mupdf executables will fail without vcredist2022 installed or if it already satisfies these dependencies elsewhere, then adjust the classification accordingly.


27-28: Verify the checkver URL change works with MuPDF's releases page.

The regex change to [0-9.]+ correctly excludes release candidates (like 1.27.0-rc1) by matching only numeric versions with dots, which addresses the known issue with RC extractions. The URL update to https://mupdf.com/releases?product=MuPDF follows patterns used in similar package manifests. Confirm that this specific URL+query combination returns the expected release file listing when accessed by the checkver tool.


30-40: Hash extraction pattern is valid and will successfully extract SHA256 hashes.

The releases page returns JSON-formatted data with SHA256 hashes for each file. The regex pattern $basename[^}]+SHA256\":\"(\\w+)\" correctly matches the JSON structure and will extract the hash value for the Windows download (f3e60b630453301914e52fb8ec001f6ab56cdb90daf39e533deae3ff214fcff8 for version 1.27.0). The autoupdate configuration is functional as implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant