+2005-04-22 Angus Leeming <leeming@lyx.org>
+
+ * package.C.in (get_binary_path): on prompting from Rob Bearman,
+ ensure that the name of the executable, as input at the command
+ line has a ".exe" suffix so that various file interogations
+ work on Windows.
+
2005-04-22 Angus Leeming <leeming@lyx.org>
* forkedcontr.h:
// Does the grunt work for abs_path_from_binary_name()
string const get_binary_path(string const & exe)
{
+#if defined (USE_WINDOWS_PACKAGING)
+ // The executable may have been invoked either with or
+ // without the .exe extension.
+ // Ensure that it is present.
+ string const as_internal_path = os::internal_path(exe);
+ string const exe_path = suffixIs(as_internal_path, ".exe") ?
+ as_internal_path : as_internal_path + ".exe";
+#else
string const exe_path = os::internal_path(exe);
+#endif
if (os::is_absolute_path(exe_path))
return exe_path;