Support invocation of un-installed runemacs.exe.

This commit is contained in:
Eli Zaretskii 2013-05-17 12:35:23 +03:00
parent 721c9e8a68
commit 3e2af3481e
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2013-05-17 Eli Zaretskii <eliz@gnu.org>
* runemacs.c (WinMain): Support invocation of un-installed
nt/runemacs.exe, by looking for src/emacs.exe.
2013-05-16 Eli Zaretskii <eliz@gnu.org>
* inc/stdint.h (SIZE_MAX) [!__GNUC__]: Define. (Bug#14409)

View file

@ -75,6 +75,11 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow)
/* Quote executable name in case of spaces in the path. */
*new_cmdline = '"';
strcpy (new_cmdline + 1, modname);
/* Detect and handle un-installed runemacs.exe in nt/ subdirectory,
while emacs.exe is in src/. */
if ((p = strrchr (new_cmdline, '\\')) != NULL
&& stricmp (p, "\\nt") == 0)
strcpy (p, "\\src");
#ifdef CHOOSE_NEWEST_EXE
{