From a00e3f68d3fe0bae63c4899ee0e5ecc83a15623d Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 22 Apr 2005 20:32:57 +0000 Subject: [PATCH] Packaging fix on Windows git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9863 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 7 +++++++ src/support/package.C.in | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index e7f800ddf8..faa382ca9e 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,10 @@ +2005-04-22 Angus Leeming + + * 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 * forkedcontr.h: diff --git a/src/support/package.C.in b/src/support/package.C.in index 6082df98f0..a839648a73 100644 --- a/src/support/package.C.in +++ b/src/support/package.C.in @@ -414,7 +414,16 @@ string const abs_path_from_command_line(string const & command_line) // 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; -- 2.39.5