[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111174: Move fix for cygw32 icon iss
From: |
Daniel Colascione |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111174: Move fix for cygw32 icon issue from emacs-24 branch to trunk as Stefan Monnier requests |
Date: |
Mon, 10 Dec 2012 09:52:35 -0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111174 [merge]
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Mon 2012-12-10 09:52:35 -0800
message:
Move fix for cygw32 icon issue from emacs-24 branch to trunk as Stefan
Monnier requests
modified:
ChangeLog
configure.ac
nt/ChangeLog
nt/emacs.rc
src/ChangeLog
src/Makefile.in
src/emacs.c
src/unexw32.c
src/w32fns.c
src/w32gui.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-12-10 11:17:21 +0000
+++ b/ChangeLog 2012-12-10 17:52:35 +0000
@@ -1,3 +1,9 @@
+2012-12-10 Daniel Colascione <address@hidden>
+
+ * configure.ac (W32_RES, W32_RES_LINK, WINDRES): Teach the cygw32
+ build how to compile Windows resource files; use these variables
+ to tell src/Makefile.in how and whether to compile resources.
+
2012-12-10 RĂ¼diger Sonderfeld <address@hidden>
* configure.ac (inotify): New option.
=== modified file 'configure.ac'
--- a/configure.ac 2012-12-10 11:17:21 +0000
+++ b/configure.ac 2012-12-10 17:52:35 +0000
@@ -1606,6 +1606,8 @@
HAVE_W32=no
W32_OBJ=
W32_LIBS=
+W32_RES=
+W32_RES_LINK=
if test "${with_w32}" != no; then
if test "${opsys}" != "cygwin"; then
AC_MSG_ERROR([Using w32 with an autotools build is only supported for
Cygwin.])
@@ -1614,13 +1616,21 @@
[AC_MSG_ERROR([`--with-w32' was specified, but windows.h
cannot be found.])])
AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.])
+ AC_CHECK_TOOL(WINDRES, [windres],
+ [AC_MSG_ERROR([No resource compiler found.])])
W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
+ W32_RES="emacs.res"
+ # Tell the linker that emacs.res is an object (which we compile from
+ # the rc file), not a linker script.
+ W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
fi
AC_SUBST(W32_OBJ)
AC_SUBST(W32_LIBS)
+AC_SUBST(W32_RES)
+AC_SUBST(W32_RES_LINK)
if test "${HAVE_W32}" = "yes"; then
window_system=w32
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2012-12-09 22:10:18 +0000
+++ b/nt/ChangeLog 2012-12-10 17:52:35 +0000
@@ -1,3 +1,9 @@
+2012-12-10 Daniel Colascione <address@hidden>
+
+ * emacs.rc: Use forward slashes in relative paths in order to
+ avoid complaints from Cygwin. (Forward slashes work perfectly
+ well in the NT build.)
+
2012-12-09 Eli Zaretskii <address@hidden>
* inc/unistd.h (unsetenv): Provide a prototype.
=== modified file 'nt/emacs.rc'
--- a/nt/emacs.rc 2012-11-27 03:10:32 +0000
+++ b/nt/emacs.rc 2012-12-10 17:52:35 +0000
@@ -1,5 +1,5 @@
-Emacs ICON icons\emacs.ico
-32649 CURSOR icons\hand.cur
+Emacs ICON icons/emacs.ico
+32649 CURSOR icons/hand.cur
#ifdef WIN64
1 24 "emacs-x64.manifest"
#else
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-12-10 17:34:47 +0000
+++ b/src/ChangeLog 2012-12-10 17:52:35 +0000
@@ -1,3 +1,24 @@
+2012-12-10 Daniel Colascione <address@hidden>
+
+ * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
+ declarations.
+
+ * w32fns.c (cache_system_info): Initialize the global hinst
+ variable here so various initialization calls DTRT.
+
+ * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused
+ variables.
+ (hinst): Remove unneeded extern declaration.
+ (_start): Remove initialization of above variables; remove
+ initialization of hinst, as cache_system_info now does that.
+
+ * emacs.c (main): Call cache_system_info early in startup; we
+ previously weren't calling it in Cygwin builds.
+
+ * Makefile.in (ntsource, WINDRES, W32_RES, address@hidden): Teach
+ the autoconf build system how to compile a Windows resource file
+ and link it to Emacs.
+
2012-12-10 Dmitry Antipov <address@hidden>
Per-buffer window counters.
=== modified file 'src/Makefile.in'
--- a/src/Makefile.in 2012-12-10 12:08:02 +0000
+++ b/src/Makefile.in 2012-12-10 17:52:35 +0000
@@ -28,9 +28,11 @@
# Here are the things that we expect ../configure to edit.
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir = @srcdir@
+ntsource = $(srcdir)/../nt
abs_builddir = @abs_builddir@
VPATH = $(srcdir)
CC = @CC@
+WINDRES = @WINDRES@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
@@ -267,6 +269,13 @@
## --lwinspool if HAVE_W32, else empty.
address@hidden@
+## emacs.res if HAVE_W32
address@hidden@
+## If HAVE_W32, compiler arguments for including
+## the resource file in the binary.
+## XXX -Wl,-b -Wl,pe-i386 -Wl,emacs.res
address@hidden@
+
## Empty if !HAVE_X_WINDOWS
## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT
## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE
@@ -329,7 +338,6 @@
@$(MKDEPDIR)
$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
-
## lastfile must follow all files whose initialized data areas should
## be dumped as pure by dump-emacs.
base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
@@ -463,9 +471,11 @@
$(lib)/libgnu.a: $(config_h)
cd $(lib) && $(MAKE) libgnu.a
-temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj)
$(lib)/libgnu.a
+temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) \
+ $(lib)/libgnu.a $(W32_RES)
$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS)
$(TEMACS_LDFLAGS2) \
- -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES)
+ -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) \
+ $(W32_RES_LINK)
test "$(CANNOT_DUMP)" = "yes" || \
test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
@@ -506,11 +516,14 @@
doc.o: buildobj.h
+emacs.res: $(ntsource)/emacs.rc \
+ $(ntsource)/icons/emacs.ico \
+ $(ntsource)/emacs-x86.manifest
+ $(WINDRES) -O COFF -o $@ $(ntsource)/emacs.rc
ns-app: emacs$(EXEEXT)
cd ../nextstep && $(MAKE) $(MFLAGS) all
-
.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
.PHONY: versionclean extraclean frc
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2012-12-10 12:08:02 +0000
+++ b/src/emacs.c 2012-12-10 17:52:35 +0000
@@ -41,6 +41,7 @@
#if defined WINDOWSNT || defined HAVE_NTGUI
#include "w32select.h"
#include "w32font.h"
+#include "w32common.h"
#endif
#if defined HAVE_NTGUI && defined CYGWIN
@@ -733,6 +734,13 @@
}
#endif
+#if defined WINDOWSNT || defined HAVE_NTGUI
+ /* Set global variables used to detect Windows version. Do this as
+ early as possible. (unexw32.c calls this function as well, but
+ the additional call here is harmless.) */
+ cache_system_info ();
+#endif
+
#ifdef RUN_TIME_REMAP
if (initialized)
run_time_remap (argv[0]);
=== modified file 'src/unexw32.c'
--- a/src/unexw32.c 2012-10-17 19:02:44 +0000
+++ b/src/unexw32.c 2012-12-10 07:11:21 +0000
@@ -85,13 +85,6 @@
PIMAGE_SECTION_HEADER heap_section;
-#ifdef HAVE_NTGUI
-extern HINSTANCE hinst;
-HINSTANCE hprevinst = NULL;
-LPSTR lpCmdLine = "";
-int nCmdShow = 0;
-#endif /* HAVE_NTGUI */
-
/* Startup code for running on NT. When we are running as the dumped
version, we need to bootstrap our heap and .bss section into our
address space before we can actually hand off control to the startup
@@ -121,15 +114,6 @@
/* Prevent Emacs from being locked up (eg. in batch mode) when
accessing devices that aren't mounted (eg. removable media drives). */
SetErrorMode (SEM_FAILCRITICALERRORS);
-
- /* Invoke the NT CRT startup routine now that our housecleaning
- is finished. */
-#ifdef HAVE_NTGUI
- /* determine WinMain args like crt0.c does */
- hinst = GetModuleHandle (NULL);
- lpCmdLine = GetCommandLine ();
- nCmdShow = SW_SHOWDEFAULT;
-#endif
mainCRTStartup ();
}
=== modified file 'src/w32fns.c'
--- a/src/w32fns.c 2012-12-10 12:08:02 +0000
+++ b/src/w32fns.c 2012-12-10 17:52:35 +0000
@@ -1821,7 +1821,6 @@
static BOOL
w32_init_class (HINSTANCE hinst)
{
-
if (w32_unicode_gui)
{
WNDCLASSW uwc;
@@ -7027,6 +7026,9 @@
DWORD data;
} version;
+ /* Cache the module handle of Emacs itself. */
+ hinst = GetModuleHandle (NULL);
+
/* Cache the version of the operating system. */
version.data = GetVersion ();
w32_major_version = version.info.major;
=== modified file 'src/w32gui.h'
--- a/src/w32gui.h 2012-09-20 01:02:21 +0000
+++ b/src/w32gui.h 2012-12-10 07:11:21 +0000
@@ -79,9 +79,6 @@
#define FACE_DEFAULT (~0)
extern HINSTANCE hinst;
-extern HINSTANCE hprevinst;
-extern LPSTR lpCmdLine;
-extern int nCmdShow;
/* Bit Gravity */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111174: Move fix for cygw32 icon issue from emacs-24 branch to trunk as Stefan Monnier requests,
Daniel Colascione <=