From: Eli Zaretskii Date: Fri, 17 May 2013 09:35:23 +0000 (+0300) Subject: Support invocation of un-installed runemacs.exe. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2~47^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e2af3481e94276340f7c00f1c8275bc323f6910;p=emacs.git Support invocation of un-installed runemacs.exe. --- diff --git a/nt/ChangeLog b/nt/ChangeLog index ebda94e80f3..696d320c8bc 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2013-05-17 Eli Zaretskii + + * runemacs.c (WinMain): Support invocation of un-installed + nt/runemacs.exe, by looking for src/emacs.exe. + 2013-05-16 Eli Zaretskii * inc/stdint.h (SIZE_MAX) [!__GNUC__]: Define. (Bug#14409) diff --git a/nt/runemacs.c b/nt/runemacs.c index b090ffdd639..fd1524a9c41 100644 --- a/nt/runemacs.c +++ b/nt/runemacs.c @@ -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 {