Skip to content

grepwin: Fix portability#17697

Merged
z-Fng merged 5 commits intoScoopInstaller:masterfrom
SiriosDev:fix-grepwin
Apr 29, 2026
Merged

grepwin: Fix portability#17697
z-Fng merged 5 commits intoScoopInstaller:masterfrom
SiriosDev:fix-grepwin

Conversation

@SiriosDev
Copy link
Copy Markdown
Contributor

To properly handle portability, by renaming the executable to grepWin_portable.exe, the alternative solution would have been to add the argument to the “script” registry key, but that would not have covered the case where the executable is launched directly

Closes #17696

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

SiriosDev and others added 3 commits April 28, 2026 22:57
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

The grepwin manifest renames the portable executable to grepWin_portable.exe and updates pre_install/post_install paths and template substitutions accordingly. bin is changed to map grepWin to grepWin_portable.exe. shortcuts now launch grepWin_portable.exe and drop the "/portable" argument. notes are expanded into an array including the reg import "$dir\\install-context.reg" command for context-menu registration. An update-only PowerShell block conditionally re-imports install-context.reg, and pre_uninstall now redirects the reg import output to $null.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the portability fix rationale, references the linked issue (#17696), and confirms both checklist items were completed as required.
Linked Issues check ✅ Passed The PR successfully addresses issue #17696 by renaming the executable to grepwin_portable.exe, ensuring portable mode works for direct and context-menu launches.
Out of Scope Changes check ✅ Passed All changes in bucket/grepwin.json are directly scoped to fixing portability: executable rename, bin mapping update, shortcut adjustments, and registry handling improvements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'grepwin: Fix portability' directly relates to the main change in the changeset, which addresses portable mode functionality by renaming the executable to grepWin_portable.exe and updating the manifest accordingly.

✏️ 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.

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

1-63: Please run the standard Scoop manifest verification flow before merge.

Recommended local checks:

scoop config debug true
scoop config gh_token <your-github-token>   # optional, read-only

.\bin\checkver.ps1 -App grepwin -f
.\bin\formatjson.ps1 -App grepwin

scoop install .\bucket\grepwin.json -a 64bit
scoop uninstall grepwin
scoop install .\bucket\grepwin.json -a 32bit

And for this PR specifically, verify:

  • grepWin shim launches grepWin_portable.exe
  • direct EXE launch uses INI persistence
  • reg import "$dir\install-context.reg" context-menu launch also uses INI persistence

As per coding guidelines: "Provide clear instructions for testing the manifest locally before submission."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/grepwin.json` around lines 1 - 63, Run the standard local verification
and functional tests for this manifest: enable debug and (optionally) gh_token,
then execute the provided checkver and formatjson scripts (referencing checkver
and autoupdate entries) for grepwin.json, install the manifest in both
architectures via the scoop install command to validate pre_install and
post_install behavior (verify pre_install creates grepwin.ini and renames exe to
grepWin_portable.exe, post_install correctly substitutes $app_path into
install-context.reg/uninstall-context.reg and writes them to $dir), confirm the
shim "grepWin" launches grepWin_portable.exe, launching the EXE directly
persists settings to grepwin.ini, and importing "$dir\\install-context.reg" adds
the context menu that also uses the same INI persistence; fix any issues
discovered in pre_install, post_install, bin/shortcuts, persist, or the reg
files before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@bucket/grepwin.json`:
- Around line 1-63: Run the standard local verification and functional tests for
this manifest: enable debug and (optionally) gh_token, then execute the provided
checkver and formatjson scripts (referencing checkver and autoupdate entries)
for grepwin.json, install the manifest in both architectures via the scoop
install command to validate pre_install and post_install behavior (verify
pre_install creates grepwin.ini and renames exe to grepWin_portable.exe,
post_install correctly substitutes $app_path into
install-context.reg/uninstall-context.reg and writes them to $dir), confirm the
shim "grepWin" launches grepWin_portable.exe, launching the EXE directly
persists settings to grepwin.ini, and importing "$dir\\install-context.reg" adds
the context menu that also uses the same INI persistence; fix any issues
discovered in pre_install, post_install, bin/shortcuts, persist, or the reg
files before merging.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8f8ac72-5506-4c7f-b981-2674a6c38d82

📥 Commits

Reviewing files that changed from the base of the PR and between 0084dd4 and 3604d08.

📒 Files selected for processing (1)
  • bucket/grepwin.json

@SiriosDev
Copy link
Copy Markdown
Contributor Author

/verify

@github-actions
Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

grepwin

  • 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.

A workaround is needed to replace the executable file name in the registry for existing users.

Comment thread bucket/grepwin.json Outdated
@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Apr 29, 2026

/verify

@github-actions
Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

grepwin

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

Check the full log for details.

@z-Fng z-Fng changed the title grepwin@2.1.12: Fix portability grepwin: Fix portability Apr 29, 2026
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 99b851c into ScoopInstaller:master Apr 29, 2026
3 checks passed
Comment thread bucket/grepwin.json
@SiriosDev
Copy link
Copy Markdown
Contributor Author

SiriosDev commented Apr 29, 2026

Oh, right—when I reverted the changes I had initially made to the registry, I forgot to fix the typo in the context menu; instead of Search with, it was and it is search with

@SiriosDev SiriosDev deleted the fix-grepwin branch April 29, 2026 09:20
@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Apr 29, 2026

I forgot to fix the typo in the context menu; instead of Search with, it was and it is search with

Feel free to submit another PR for this.

@SiriosDev SiriosDev restored the fix-grepwin branch April 29, 2026 12:11
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.

[Bug]: grepwin does not run properly in portable mode in some cases

2 participants