pdfgear: Update to version 2.1.15, add file associations#17676
Conversation
📝 WalkthroughWalkthroughThis 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 Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bucket/pdfgear.json (1)
9-27: Consider auto-importing the generated.regon install for symmetry with uninstall.The
uninstaller.scriptalready executesreg.exe importautomatically for matchingun*.regfiles, butpost_installonly rewrites the install.regto$dirand leaves the actual import to the user vianotes. This asymmetry adds friction and risks users skipping the step, leaving file associations unregistered after install. Since the rewritten file is already in$dirand a global install runs elevated anyway, you can mirror the uninstall flow and import it directly, then drop thenotes.♻️ 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
📒 Files selected for processing (3)
bucket/pdfgear.jsonscripts/pdfgear/install-associations.regscripts/pdfgear/uninstall-associations.reg
|
/verify |
|
All changes look good. Wait for review from human collaborators. pdfgear
|
|
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. |
Okay, I'll take a look at these PRs soon. I've been really swamped lately.
|
Thank you for your reply. It seems the issue has been resolved. |
|
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. |
|
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. |
Any help is welcome.
I have already submitted a proposal to our admins. Let's wait for feedback. |
Summary
Updates
pdfgearto version 2.1.15 and introduces automated registry-based file association for.pdfdocuments.Changes
notesto guide users on manual registry import if needed.binto includepdfeditor.exe,PDFLauncher.exe, andpdfconverter.exe.descriptionfor better clarity and SEO consistency.install-associations.reganduninstall-associations.regtemplates.post_installlogic to dynamically generate registry files with the correct installation path ({{pdfgear_dir}}).uninstallerscript to clean up registry entries upon uninstallation.checkver: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:
<manifest-name[@version]|chore>: <general summary of the pull request>