Review Request: Extend KStandardDirs::find[All]Exe() to also look for .com, and .bat on Windows

Jonathan Callen abcd at gentoo.org
Fri Mar 26 03:52:51 GMT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3388/#review4679
-----------------------------------------------------------


Windows itself generally searches for files ending in each extension listed in the %PATHEXT% environment variable (IIRC, it defaults to ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH" on XP, and adds ";.MSC" to the end in Vista and 7).  You may want to use this variable directly (if possible) to get the list of extensions for which to search.

- Jonathan


On 2010-03-24 18:47:29, Thomas Friedrichsmeier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3388/
> -----------------------------------------------------------
> 
> (Updated 2010-03-24 18:47:29)
> 
> 
> Review request for kdelibs, Jaroslaw Staniek and Patrick Spendrin.
> 
> 
> Summary
> -------
> 
> On Windows, KStandardDirs::findExe(), and findAllExe() append ".exe" to the filename to look for. However, executable files on Windows may also end in .com or .bat. Therefore, this patch looks for all three extensions in the order .exe, .com, .bat.
> 
> For example, rkward ships with a wrapper script rkward.bat. kwinstartmenu relies on KStandardDirs::findExe() to locate the executables referenced in .desktop files, and fails to find rkward.bat. This patch fixes that.
> 
> 
> P.S.: Where should windows-specific review requests go to?
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdecore//kernel/kstandarddirs.cpp 1106410 
> 
> Diff: http://reviewboard.kde.org/r/3388/diff
> 
> 
> Testing
> -------
> 
> Non-systematic. kwinstartmenu now adds rkward as expected. All other apps are added as before.
> 
> Ironically, the unittests all fail for me due to failure to find the test executables (also without this patch!), so I cannot run them, ATM.
> 
> 
> Thanks,
> 
> Thomas
> 
>





More information about the kde-core-devel mailing list