Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kiennq/scoop-better-shimexe

 
 

Repository files navigation

Scoop, although very useful and nice to use, uses a (subjectively) terrible shim.exe file to redirect commands from scoop\shims\app.exe to scoop\apps\app\current\app.exe, because:

  1. It's made in C#, and thus requires an instantiation of a .NET command line app everytime it is started, which can make a command run much slower than if it had been ran directly;
  2. It does not handle Ctrl+C and other signals correctly, which can be quite infuriating.

The last issue making interaction with REPLs and long-running apps practically impossible, and having never been fixed, I set out to improve them with this repository.

shim.cpp is:

  • Faster, because it does not use the .NET Framework, and parses the .shim file in a simpler way.
  • More efficient, because by the time the target of the shim is started, all allocated memory will have been freed.
  • And more importantly, it works better:
    • Signals originating from pressing Ctrl+C are ignored, and therefore handled directly by the spawned child. Your processes and REPLs will no longer close when pressing Ctrl+C.
    • Children are automatically killed when the shim process is killed. No more orphaned processes and weird behaviors.

Note: This project is not affiliated with Scoop.

Installation

  • Building:

    • Build by clang++: Makefile is supported
    • Build by using ninja: ninja -C build shim.exe
    • Build by using msbuild: msbuild /p:Configuration=Release .\build\shim.vcxproj
  • Replace any .exe in scoop\shims by shim.exe.

An additional script, repshims.bat, is provided. It will replace all .exes in the user's Scoop directory by shim.exe.

License

SPDX-License-Identifier: MIT OR Unlicense

About

A better shim.exe file for Scoop.

Resources

License

MIT, Unlicense licenses found

Licenses found

MIT
LICENSE-MIT
Unlicense
LICENSE-UNLICENSE

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 45.9%
  • C++ 43.5%
  • Zig 6.3%
  • Makefile 2.8%
  • Batchfile 1.5%