]> git.lyx.org Git - features.git/commitdiff
Packaging fix on Windows
authorAngus Leeming <leeming@lyx.org>
Fri, 22 Apr 2005 20:32:57 +0000 (20:32 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 22 Apr 2005 20:32:57 +0000 (20:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9863 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/package.C.in

index e7f800ddf8028341ea0de6b3a70a53eb8c684ae5..faa382ca9e012b5a301c38946bf34597ab1ee57e 100644 (file)
@@ -1,3 +1,10 @@
+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:
index 6082df98f0f6826ad8eeb3d402303110f5f45304..a839648a73eeb2564c9836d452f5837204d4d3c4 100644 (file)
@@ -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;