]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't include the manifest in wx/msw/wx.rc by default for MSVC compiler.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 9 Feb 2013 00:35:46 +0000 (00:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 9 Feb 2013 00:35:46 +0000 (00:35 +0000)
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

docs/changes.txt
docs/doxygen/mainpages/const_wxusedef.h
docs/msw/install.txt
include/wx/msw/genrcdefs.h
include/wx/msw/rcdefs.h
include/wx/msw/wx.rc

index 1178a107d8797ed49023a374ee3a700836048ba7..d50ccb9359ca91550424239136e4f5e14b9bc6ca 100644 (file)
@@ -496,6 +496,11 @@ Build system changes
   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
 ----------------------------------
index d38f5c3a6bdd8ef4fab05c02f5c3f7677671716c..e4cf76046939cdda73d1411fa60b31452fc9a90c 100644 (file)
@@ -342,7 +342,8 @@ library:
 @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.}
@@ -350,6 +351,11 @@ library:
 @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}
index 123d796484398a25b68c318275a0d91f443e467e..54ecc1e72b21b6c8cf6cb40120c5be7ec43c15da 100644 (file)
@@ -797,6 +797,8 @@ following to use 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.
   - _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
index 4dfb6c1c0aebd059d21cda27816c96904901e53b..a69638e9ba09f7c8114bad5be8a79a7643d3f159 100644 (file)
@@ -13,7 +13,9 @@ EMIT(#ifndef _WX_RCDEFS_H)
 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
 #endif
 
 #ifdef _M_AMD64
 #endif
 
 #ifdef _M_AMD64
index c5ef7d1f62466c58ff0ebcd624db595ef8b07bec..75e5d15a3df3a7420b4d9089b4abe6aa3d3a08bd 100644 (file)
 #ifndef _WX_RCDEFS_H
 #define _WX_RCDEFS_H
 
 #ifndef _WX_RCDEFS_H
 #define _WX_RCDEFS_H
 
-#define WX_CPU_X86
+#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.
 
 #endif
 
 #endif
index d9aff3b171d177bcd711cc543485db753d751ca7..771779f4475e8c3894a3f41c71cf0bbb29d37d86 100644 (file)
@@ -90,14 +90,15 @@ wxBITMAP_STD_COLOURS    BITMAP "wx/msw/colours.bmp"
 
 //////////////////////////////////////////////////////////////////////////////
 //
 
 //////////////////////////////////////////////////////////////////////////////
 //
-// 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
@@ -112,8 +113,16 @@ wxMANIFEST_ID 24 "wx/msw/amd64.manifest"
 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
 
 #endif
 
-#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)