Skip to content

pdfgear: Update to version 2.1.15, add file associations#17676

Merged
z-Fng merged 1 commit into
ScoopInstaller:masterfrom
SorYoshino:pdfgear
Apr 27, 2026
Merged

pdfgear: Update to version 2.1.15, add file associations#17676
z-Fng merged 1 commit into
ScoopInstaller:masterfrom
SorYoshino:pdfgear

Conversation

@SorYoshino
Copy link
Copy Markdown
Contributor

Summary

Updates pdfgear to version 2.1.15 and introduces automated registry-based file association for .pdf documents.

Changes

  • Update version to 2.1.15
  • Improve Manifest Accuracy:
    • Add notes to guide users on manual registry import if needed.
    • Expand bin to include pdfeditor.exe, PDFLauncher.exe, and pdfconverter.exe.
    • Refine description for better clarity and SEO consistency.
  • File Association Support:
    • Add install-associations.reg and uninstall-associations.reg templates.
    • Implement post_install logic to dynamically generate registry files with the correct installation path ({{pdfgear_dir}}).
    • Add uninstaller script to clean up registry entries upon uninstallation.
  • Robust checkver:
    • Switch version detection URL to https://www.pdfgear.com/js/jquery.common.js, which provides a more consistent update string than the landing page.

Testing

The test results are as follows:
┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras][ pdfgear ≡  1]
└─> .\bin\checkver.ps1 -App '.\bucket\pdfgear.json' -f
pdfgear: 2.1.15 (scoop version is 2.1.15)
Forcing autoupdate!
Autoupdating pdfgear
DEBUG[1777198630] [$updatedProperties] = [url hash] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:500:5
DEBUG[1777198630] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1777198630] $substitutions.$dotVersion                    2.1.15
DEBUG[1777198630] $substitutions.$matchHead                     2.1.15
DEBUG[1777198630] $substitutions.$url                           https://downloadfiles.pdfgear.com/releases/windows/pdfgear_setup_v2.1.15.exe
DEBUG[1777198630] $substitutions.$dashVersion                   2-1-15
DEBUG[1777198630] $substitutions.$basenameNoExt                 pdfgear_setup_v2.1.15
DEBUG[1777198630] $substitutions.$cleanVersion                  2115
DEBUG[1777198630] $substitutions.$patchVersion                  15
DEBUG[1777198630] $substitutions.$urlNoExt                      https://downloadfiles.pdfgear.com/releases/windows/pdfgear_setup_v2.1.15
DEBUG[1777198630] $substitutions.$matchTail                     
DEBUG[1777198630] $substitutions.$minorVersion                  1
DEBUG[1777198630] $substitutions.$baseurl                       https://downloadfiles.pdfgear.com/releases/windows
DEBUG[1777198630] $substitutions.$version                       2.1.15
DEBUG[1777198630] $substitutions.$underscoreVersion             2_1_15
DEBUG[1777198630] $substitutions.$buildVersion                  
DEBUG[1777198630] $substitutions.$preReleaseVersion             2.1.15
DEBUG[1777198630] $substitutions.$basename                      pdfgear_setup_v2.1.15.exe
DEBUG[1777198630] $substitutions.$majorVersion                  2
DEBUG[1777198630] $substitutions.$match1                        2.1.15
DEBUG[1777198630] $hashfile_url = $null -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Downloading pdfgear_setup_v2.1.15.exe to compute hashes!
Loading pdfgear_setup_v2.1.15.exe from cache
Computed hash: 3a37578a08e0723b1bd101482c9e3cfa8f4add4f8854ec0187fc5cf2bfef9fe2
Writing updated pdfgear manifest

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras][ pdfgear ≡  1]
└─> scoop install Unofficial/pdfgear
Installing 'pdfgear' (2.1.15) [64bit] from 'Unofficial' bucket
Loading pdfgear_setup_v2.1.15.exe from cache.
Checking hash of pdfgear_setup_v2.1.15.exe... OK.
Extracting pdfgear_setup_v2.1.15.exe... Done.
Linking D:\Software\Scoop\Local\apps\pdfgear\current => D:\Software\Scoop\Local\apps\pdfgear\2.1.15
Creating shim for 'pdfeditor'.
Making D:\Software\Scoop\Local\shims\pdfeditor.exe a GUI binary.
Creating shim for 'PDFLauncher'.
Making D:\Software\Scoop\Local\shims\pdflauncher.exe a GUI binary.
Creating shim for 'pdfconverter'.
Making D:\Software\Scoop\Local\shims\pdfconverter.exe a GUI binary.
Creating shortcut for PDFgear (PDFLauncher.exe)
Running post_install script... Done.
'pdfgear' (2.1.15) was installed successfully!
Notes
-----
To register file associations, please execute the following command:
- `reg import "D:\Software\Scoop\Local\apps\pdfgear\current\install-associations.reg"`
-----

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras][ pdfgear ≡  1]
└─> reg import "D:\Software\Scoop\Local\apps\pdfgear\current\install-associations.reg"
The operation completed successfully.

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras][ pdfgear ≡  1]
└─> scoop uninstall pdfgear -p
Uninstalling 'pdfgear' (2.1.15).
Running uninstaller script... Done.
Removing shim 'pdfeditor.shim'.
Removing shim 'pdfeditor.exe'.
Removing shim 'PDFLauncher.shim'.
Removing shim 'PDFLauncher.exe'.
Removing shim 'pdfconverter.shim'.
Removing shim 'pdfconverter.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\PDFgear.lnk
Unlinking D:\Software\Scoop\Local\apps\pdfgear\current
Removing persisted data.
'pdfgear' was uninstalled.
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

📝 Walkthrough

Walkthrough

This PR updates the PDFGear package manifest to version 2.1.15 and introduces file association functionality. It adds registry files that associate PDF files with PDFGear applications and includes a post_install script that processes these registry files by substituting a directory placeholder and conditionally remapping registry hives for global installations. The manifest also defines binary entry points for three executables and an uninstaller.script that removes the associations during uninstallation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: updating pdfgear to version 2.1.15 and adding file association support.
Description check ✅ Passed The description is comprehensive and follows the template requirements, including a clear summary, detailed changes, testing results, and confirmation of both checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

Copy link
Copy Markdown

@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: 1

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

9-27: Consider auto-importing the generated .reg on install for symmetry with uninstall.

The uninstaller.script already executes reg.exe import automatically for matching un*.reg files, but post_install only rewrites the install .reg to $dir and leaves the actual import to the user via notes. This asymmetry adds friction and risks users skipping the step, leaving file associations unregistered after install. Since the rewritten file is already in $dir and a global install runs elevated anyway, you can mirror the uninstall flow and import it directly, then drop the notes.

♻️ Proposed refactor for symmetric install/uninstall
-    "notes": [
-        "To register file associations, please execute the following command:",
-        "reg import \"$dir\\install-associations.reg\""
-    ],
     "architecture": {
         "64bit": {
             "url": "https://downloadfiles.pdfgear.com/releases/windows/pdfgear_setup_v2.1.15.exe",
             "hash": "3a37578a08e0723b1bd101482c9e3cfa8f4add4f8854ec0187fc5cf2bfef9fe2"
         }
     },
     "innosetup": true,
     "post_install": [
         "$pdfgear_dir = $dir -replace '\\\\', '\\\\'",
         "Get-ChildItem -Path \"$bucketsdir\\$bucket\\scripts\\$app\" -Filter '*.reg' -File | ForEach-Object {",
         "    $content = Get-Content -Path $_.FullName -Encoding utf8",
         "    if ($global) { $content = $content -replace 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE' }",
-        "    $content -replace '{{pdfgear_dir}}', $pdfgear_dir | Set-Content -Path \"$dir\\$($_.Name)\" -Encoding unicode",
+        "    $target = \"$dir\\$($_.Name)\"",
+        "    $content -replace '{{pdfgear_dir}}', $pdfgear_dir | Set-Content -Path $target -Encoding unicode",
+        "    if ($_.Name -notlike 'un*.reg') {",
+        "        Start-Process -FilePath 'reg.exe' -ArgumentList @('import', ('\"{0}\"' -f $target)) -WindowStyle Hidden -Wait",
+        "    }",
         "}"
     ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/pdfgear.json` around lines 9 - 27, The post_install currently rewrites
install .reg files to $dir but does not import them; update the post_install
sequence in bucket/pdfgear.json so that after creating each rewritten .reg (the
block that sets $pdfgear_dir and processes Get-ChildItem | ForEach-Object) it
runs reg.exe import on the newly written file (using the same $dir and
$_.Name)—respecting the $global replacement logic—and then remove the separate
user-facing note about manual import; refer to the existing variables
$pdfgear_dir, $dir, $bucketsdir, $bucket, $app and the Get-ChildItem |
ForEach-Object block to locate where to add the reg.exe import call for symmetry
with the uninstaller.script behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bucket/pdfgear.json`:
- Line 25: The replacement uses PowerShell's -replace which treats $ in the
replacement as backreference tokens, so replace the use of "-replace
'{{pdfgear_dir}}', $pdfgear_dir" with a literal string replacement to avoid $
being interpreted (e.g., call the string .Replace('{{pdfgear_dir}}',
$pdfgear_dir) or, if keeping -replace, first escape $ in $pdfgear_dir via
$pdfgear_dir -replace '\$', '$$$$'); update the expression that builds the
target content (the invocation currently using "$content -replace
'{{pdfgear_dir}}', $pdfgear_dir | Set-Content -Path \"$dir\\$($_.Name)\"
-Encoding unicode") to use one of these safer approaches so Set-Content receives
the correct path.

---

Nitpick comments:
In `@bucket/pdfgear.json`:
- Around line 9-27: The post_install currently rewrites install .reg files to
$dir but does not import them; update the post_install sequence in
bucket/pdfgear.json so that after creating each rewritten .reg (the block that
sets $pdfgear_dir and processes Get-ChildItem | ForEach-Object) it runs reg.exe
import on the newly written file (using the same $dir and $_.Name)—respecting
the $global replacement logic—and then remove the separate user-facing note
about manual import; refer to the existing variables $pdfgear_dir, $dir,
$bucketsdir, $bucket, $app and the Get-ChildItem | ForEach-Object block to
locate where to add the reg.exe import call for symmetry with the
uninstaller.script behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 256c8d97-f641-4642-ac42-8f51bd611848

📥 Commits

Reviewing files that changed from the base of the PR and between 479ca03 and 388d282.

📒 Files selected for processing (3)
  • bucket/pdfgear.json
  • scripts/pdfgear/install-associations.reg
  • scripts/pdfgear/uninstall-associations.reg

Comment thread bucket/pdfgear.json
@SorYoshino
Copy link
Copy Markdown
Contributor Author

/verify

@github-actions
Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

pdfgear

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Copy link
Copy Markdown
Member

@z-Fng z-Fng left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@z-Fng z-Fng merged commit 5cce1b4 into ScoopInstaller:master Apr 27, 2026
4 checks passed
@SorYoshino
Copy link
Copy Markdown
Contributor Author

Hello, @z-Fng .

Thank you very much for reviewing and merging my PR.

When you have time, could you please also review some of the other PRs I submitted, such as the ones for Everything and Calibre? They were submitted several months ago but have not been reviewed yet. Even worse, for some reason I cannot find them in the list of PRs I submitted.

They may contain a relatively large number of changes, but I have provided detailed explanations and tests for them, so I believe reviewing them should not take too much of your time. Thank you again for your continued contributions to the community.

@SorYoshino SorYoshino deleted the pdfgear branch April 28, 2026 15:01
@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Apr 29, 2026

When you have time, could you please also review some of the other PRs I submitted, such as the ones for Everything and Calibre? They were submitted several months ago but have not been reviewed yet.

Okay, I'll take a look at these PRs soon. I've been really swamped lately.

Even worse, for some reason I cannot find them in the list of PRs I submitted.

https://www.githubstatus.com/incidents/x69zbgdyfzg0

@SorYoshino
Copy link
Copy Markdown
Contributor Author

Even worse, for some reason I cannot find them in the list of PRs I submitted.

https://www.githubstatus.com/incidents/x69zbgdyfzg0

Thank you for your reply. It seems the issue has been resolved.

@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented May 12, 2026

Hi, @SorYoshino.

Thanks for your continued contributions! Over the past year, you've submitted more than 100 PRs (which accounts for almost a sixth of everything I've reviewed in this repo). I think you'd be a great fit as a collaborator for the Scoop Extras bucket, or potentially even a bucket maintainer, depending on the admins.

If you're open to this, let me know. I'll gladly recommend you to our admins, though the final decision on adding collaborators/members is ultimately up to them.

@SorYoshino
Copy link
Copy Markdown
Contributor Author

Hello, @z-Fng .

I am highly interested in becoming a contributor to the Extras bucket. However, due to my busy work schedule, I may only have time to handle related PRs on weekends. If that is not an issue, I would be more than happy to help with related matters.

@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented May 14, 2026

If that is not an issue, I would be more than happy to help with related matters.

Any help is welcome.

If you're open to this, let me know. I'll gladly recommend you to our admins, though the final decision on adding collaborators/members is ultimately up to them.

I have already submitted a proposal to our admins. Let's wait for feedback.

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.

2 participants