Hi I find this interesting from a different standpoint: PATH management For me in Windows this is a pain. Say I want to put notepad++.exe on my PATH: 1.) I put 'C:\Program Files\Notepad++' into PATH > there is also uninstall.exe in this directory, which is now in PATH too... 2.) I create a directory, put in a .cmd or .bat and now put that directory into PATH. > Terminate batch job (Y/N)? 3.) I put the .bat into System32 (vim for Windows does this) > same as 2.) but now also needs admin permissions to "install" Would it be possible to modify alias.c to create a small launcher program that can be placed into PATH? BR
Yeah, Notepad++'s uninstall.exe is PATH-hostile and poor planning. In other cases even adjacent DLLs can get in the way since they're eligible for resolving dependencies. Notepad++ is a good candidate for a command alias. You don't need to modify alias.c to achieve this, though. You only need to provide a path relative to the alias program. For example, if you have a "bin" directory in your profile directory (assuming standard location), you can install the alias in there with this EXE path: gcc -DEXE="../../../Program Files/Notepad++/notepad++.exe" ... Since that's awkward, I just modified alias.c to support absolute paths starting with a drive. See w64devkit commit 0b63b1c. That permits: gcc -DEXE="C:/Program Files/Notepad++/notepad++.exe" ... The alias can live anywhere or be moved around. The absolute vs. relative branch is trivially resolved at compile time since it's conditional on a constant, so this change was free.
Yeah, unfortunately, many popular applications do this cluttering of the binary directory... I have my home on the D: drive, so I just tried absolute paths which obviously failed before your adjustments. My path is already cleared from a bunch of .bat files now, which is awesome :) Thank you for that. The only *minor* annoyance with GUI apps like notepad++ is that if they are not running already, the terminal will be blocked until you either ctrl+c or exit the app. But I have a hunch that fixing this is harder then what it is worth.