The later versions of this compiler don't need it any more, so make it easier
to set up the projects for them at the expense of MSVC 6 and 7 users who will
now need to explicitly define wxUSE_RC_MANIFEST=1 and predefine the
architecture macro (or setup their resource compiler include path to get
wx/msw/rcdefs.h under the lib directory but predefining the architecture is
clearly simpler).
Do generate manifest when using gcc as it predefines the architecture macros
allowing us to avoid requiring using the generated rcdefs.h.
The other compilers will be dealt with as needed if anybody is still using
them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73483
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
configurations if you need them is to use nmake from the command line with
WXUNIV=1 or UNICODE=0 command line parameter respectively.
configurations if you need them is to use nmake from the command line with
WXUNIV=1 or UNICODE=0 command line parameter respectively.
+- The manifest is not included by wx/msw/wx.rc any longer for MSVC compiler.
+ If you're using MSVC 6 or 7 which require it, you must explicitly define
+ wxUSE_RC_MANIFEST=1 and also predefine WX_CPU_X86 in the resource compiler
+ options in your project file.
+
Major new features in this release
----------------------------------
Major new features in this release
----------------------------------
@itemdef{wxUSE_HOTKEY, Use wxWindow::RegisterHotKey() and wxWindow::UnregisterHotKey}
@itemdef{wxUSE_INKEDIT, Use InkEdit library. Related to Tablet PCs.}
@itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.}
@itemdef{wxUSE_HOTKEY, Use wxWindow::RegisterHotKey() and wxWindow::UnregisterHotKey}
@itemdef{wxUSE_INKEDIT, Use InkEdit library. Related to Tablet PCs.}
@itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.}
-@itemdef{wxUSE_NO_MANIFEST, Use to prevent the auto generation, under MSVC, of manifest file needed by windows XP and above.}
+@itemdef{wxUSE_NO_MANIFEST, Can be predefined to disable inclusion of the
+manifest from wxWidgets RC file. See also wxUSE_RC_MANIFEST.}
@itemdef{wxUSE_NORLANDER_HEADERS, Using headers whose author is Anders Norlander.}
@itemdef{wxUSE_OLE, Enables OLE helper routines.}
@itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.}
@itemdef{wxUSE_NORLANDER_HEADERS, Using headers whose author is Anders Norlander.}
@itemdef{wxUSE_OLE, Enables OLE helper routines.}
@itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.}
@itemdef{wxUSE_PENWINDOWS, See src/msw/penwin.cpp file.}
@itemdef{wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW, Use PS printing in wxMSW.}
@itemdef{wxUSE_PS_PRINTING, See src/msw/dcprint.cpp file.}
@itemdef{wxUSE_PENWINDOWS, See src/msw/penwin.cpp file.}
@itemdef{wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW, Use PS printing in wxMSW.}
@itemdef{wxUSE_PS_PRINTING, See src/msw/dcprint.cpp file.}
+@itemdef{wxUSE_RC_MANIFEST, Include manifest for common controls library v6
+from wxWidgets RC file. This may be needed to be defined explicitly for MSVC 6
+and 7 (98 and 2003) only as later versions of MSVC generate this manifest
+themselves and the manifest generation is enabled by default for the other
+compilers. See also wxUSE_NO_MANIFEST.}
@itemdef{wxUSE_REGKEY, Use wxRegKey class.}
@itemdef{wxUSE_RICHEDIT, Enable use of riched32.dll in wxTextCtrl}
@itemdef{wxUSE_RICHEDIT2, Enable use of riched20.dll in wxTextCtrl}
@itemdef{wxUSE_REGKEY, Use wxRegKey class.}
@itemdef{wxUSE_RICHEDIT, Enable use of riched32.dll in wxTextCtrl}
@itemdef{wxUSE_RICHEDIT2, Enable use of riched20.dll in wxTextCtrl}
- _UNICODE unless you want to use deprecated ANSI build of wxWidgets.
- NDEBUG if you want to build in release mode, i.e. disable asserts.
- WXUSINGDLL if you are using DLL build of wxWidgets.
- _UNICODE unless you want to use deprecated ANSI build of wxWidgets.
- NDEBUG if you want to build in release mode, i.e. disable asserts.
- WXUSINGDLL if you are using DLL build of wxWidgets.
+* If using MSVC 6 or 7 only (i.e. not for later versions), also define
+ wxUSE_RC_MANIFEST=1 and WX_CPU_X86.
* Add $WXWIN/lib/prefix_lib-or-dll to the libraries path. The prefix depends
on the compiler, by default it is "vc" for MSVC, "gcc" for g++ and so on.
* Add the list of libraries to link with to the linker input. The exact list
* Add $WXWIN/lib/prefix_lib-or-dll to the libraries path. The prefix depends
on the compiler, by default it is "vc" for MSVC, "gcc" for g++ and so on.
* Add the list of libraries to link with to the linker input. The exact list
EMIT(#define _WX_RCDEFS_H)
#ifdef _MSC_FULL_VER
EMIT(#define _WX_RCDEFS_H)
#ifdef _MSC_FULL_VER
-EMIT(#define WX_MSC_FULL_VER _MSC_FULL_VER)
+#if _MSC_FULL_VER < 140040130
+EMIT(#define wxUSE_RC_MANIFEST 1)
+#endif
#ifndef _WX_RCDEFS_H
#define _WX_RCDEFS_H
#ifndef _WX_RCDEFS_H
#define _WX_RCDEFS_H
+#ifdef __GNUC__
+ // We must be using windres which uses gcc as its preprocessor. We do need
+ // to generate the manifest then as gcc doesn't do it automatically and we
+ // can define the architecture macro on our own as all the usual symbols
+ // are available (unlike with Microsoft RC.EXE which doesn't predefine
+ // anything useful at all).
+ #ifndef wxUSE_RC_MANIFEST
+ #define wxUSE_RC_MANIFEST 1
+ #endif
+
+ #if defined __i386__
+ #ifndef WX_CPU_X86
+ #define WX_CPU_X86
+ #endif
+ #elif defined __x86_64__
+ #ifndef WX_CPU_AMD64
+ #define WX_CPU_AMD64
+ #endif
+ #elif defined __ia64__
+ #ifndef WX_CPU_IA64
+ #define WX_CPU_IA64
+ #endif
+ #endif
+#endif
+
+// Don't do anything here for the other compilers, in particular don't define
+// WX_CPU_X86 here as we used to do. If people define wxUSE_RC_MANIFEST, they
+// must also define the architecture constant correctly.
//////////////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////////////
//
-// Manifest file for Windows XP
+// Include manifest file for common controls library v6 required to use themes.
+//
+// Predefining wxUSE_NO_MANIFEST as 1 always disables the use of the manifest.
+// Otherwise we include it only if wxUSE_RC_MANIFEST is defined as 1.
//
#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
//
#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
-// Visual Studio 2005 generates the manifest automatically and so we
-// shouldn't include it in the resources manually:
-#if !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130
+#if defined(wxUSE_RC_MANIFEST) && wxUSE_RC_MANIFEST
// see "about isolated applications" topic in MSDN
#ifdef ISOLATION_AWARE_ENABLED
// see "about isolated applications" topic in MSDN
#ifdef ISOLATION_AWARE_ENABLED
wxMANIFEST_ID 24 "wx/msw/ia64.manifest"
#elif defined(WX_CPU_X86)
wxMANIFEST_ID 24 "wx/msw/wx.manifest"
wxMANIFEST_ID 24 "wx/msw/ia64.manifest"
#elif defined(WX_CPU_X86)
wxMANIFEST_ID 24 "wx/msw/wx.manifest"
+#else
+// Notice that if the manifest is included, WX_CPU_XXX constant corresponding
+// to the architecture we're compiling for must be defined. This can be done
+// either manually in your make/project file or by configuring the resource
+// compiler paths to search in $(WXWIN)/lib/$(COMPILER_PREFIX)_lib/mswu[d]
+// directory for its include files, as wx/msw/rcdefs.h file in this directory
+// is generated during wxWidgets build and contains the correct definition.
+#error "One of WX_CPU_XXX constants must be defined. See comment above."
-#endif // !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130
+#endif // wxUSE_RC_MANIFEST
#endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
#endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)