forked from 0ad/0ad
Updates build-osx-libs.sh to use wxWidgets 3.0.2.
Adds patch to fix wxWidgets build on Yosemite (based on http://trac.wxwidgets.org/changeset/76743), fixes #2924. Removes patch for previous version of wxWidgets. This was SVN commit r16155.
This commit is contained in:
parent
0a5089c841
commit
4ca156e2d8
@ -27,7 +27,7 @@ XML2_VERSION="libxml2-2.9.1"
|
||||
SDL2_VERSION="SDL-2.0.4-9134"
|
||||
BOOST_VERSION="boost_1_52_0"
|
||||
# * wxWidgets 2.9+ is necessary for 64-bit OS X build w/ OpenGL support
|
||||
WXWIDGETS_VERSION="wxWidgets-3.0.1"
|
||||
WXWIDGETS_VERSION="wxWidgets-3.0.2"
|
||||
JPEG_VERSION="jpegsrc.v8d"
|
||||
JPEG_DIR="jpeg-8d" # Must match directory name inside source tarball
|
||||
# * libpng was included as part of X11 but that's removed from Mountain Lion
|
||||
@ -358,8 +358,8 @@ then
|
||||
if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then
|
||||
CONF_OPTS="$CONF_OPTS --with-macosx-version-min=$MIN_OSX_VERSION"
|
||||
fi
|
||||
# patch to fix Atlas on VMs w/ software rendering (fixed upstream, see http://trac.wxwidgets.org/ticket/16555 )
|
||||
(patch -p0 -d.. -i../../patches/wxwidgets-glcanvas-fix.diff && ../configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" $CONF_OPTS && make ${JOBS} && make install) || die "wxWidgets build failed"
|
||||
# patch to fix wxWidgets build on Yosemite (fixed upstream, see http://trac.wxwidgets.org/ticket/16329 )
|
||||
(patch -p0 -d.. -i../../patches/wxwidgets-webkit-fix.diff && ../configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" $CONF_OPTS && make ${JOBS} && make install) || die "wxWidgets build failed"
|
||||
popd
|
||||
popd
|
||||
touch .already-built
|
||||
|
@ -1,65 +0,0 @@
|
||||
--- src/osx/cocoa/glcanvas.mm 2014-06-14 14:48:48.000000000 -0700
|
||||
+++ src/osx/cocoa/glcanvas.mm 2014-09-22 12:57:10.000000000 -0700
|
||||
@@ -81,28 +81,47 @@
|
||||
WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList)
|
||||
{
|
||||
NSOpenGLPixelFormatAttribute data[512];
|
||||
- const NSOpenGLPixelFormatAttribute defaultAttribs[] =
|
||||
+
|
||||
+ unsigned p = 0;
|
||||
+ data[p++] = NSOpenGLPFAMinimumPolicy; // make _SIZE tags behave more like GLX
|
||||
+
|
||||
+ // Test if we support hardware acceleration, we always want to use it if it
|
||||
+ // is available and, apparently, in spite of the Apple docs explicitly
|
||||
+ // saying the contrary:
|
||||
+ //
|
||||
+ // If present, this attribute indicates that only hardware-accelerated
|
||||
+ // renderers are considered. If not present, accelerated renderers are
|
||||
+ // still preferred.
|
||||
+ //
|
||||
+ // hardware acceleration is not always used without it, so we do need to
|
||||
+ // specify it. But we shouldn't do it if acceleration is really not
|
||||
+ // available.
|
||||
+ const NSOpenGLPixelFormatAttribute
|
||||
+ attrsAccel[] = { NSOpenGLPFAAccelerated, 0 };
|
||||
+ if ( WXGLPixelFormat testFormat = [[NSOpenGLPixelFormat alloc]
|
||||
+ initWithAttributes: attrsAccel] )
|
||||
{
|
||||
- NSOpenGLPFADoubleBuffer,
|
||||
- NSOpenGLPFAMinimumPolicy,
|
||||
- NSOpenGLPFAColorSize,(NSOpenGLPixelFormatAttribute)8,
|
||||
- NSOpenGLPFAAlphaSize,(NSOpenGLPixelFormatAttribute)0,
|
||||
- NSOpenGLPFADepthSize,(NSOpenGLPixelFormatAttribute)8,
|
||||
- NSOpenGLPFAAccelerated, // use hardware accelerated context
|
||||
- (NSOpenGLPixelFormatAttribute)nil
|
||||
- };
|
||||
-
|
||||
+ // Hardware acceleration is available, use it.
|
||||
+ data[p++] = NSOpenGLPFAAccelerated;
|
||||
+ [testFormat release];
|
||||
+ }
|
||||
+
|
||||
const NSOpenGLPixelFormatAttribute *attribs;
|
||||
if ( !attribList )
|
||||
{
|
||||
- attribs = defaultAttribs;
|
||||
+ // Default attributes
|
||||
+ data[p++] = NSOpenGLPFADoubleBuffer;
|
||||
+ data[p++] = NSOpenGLPFAColorSize;
|
||||
+ data[p++] = (NSOpenGLPixelFormatAttribute)8;
|
||||
+ data[p++] = NSOpenGLPFAAlphaSize;
|
||||
+ data[p++] = (NSOpenGLPixelFormatAttribute)0;
|
||||
+ data[p++] = NSOpenGLPFADepthSize;
|
||||
+ data[p++] = (NSOpenGLPixelFormatAttribute)8;
|
||||
+ data[p] = 0;
|
||||
+ attribs = data;
|
||||
}
|
||||
else
|
||||
{
|
||||
- unsigned p = 0;
|
||||
- data[p++] = NSOpenGLPFAMinimumPolicy; // make _SIZE tags behave more like GLX
|
||||
- data[p++] = NSOpenGLPFAAccelerated; // use hardware accelerated context
|
||||
-
|
||||
for ( unsigned arg = 0; attribList[arg] !=0 && p < WXSIZEOF(data); )
|
||||
{
|
||||
switch ( attribList[arg++] )
|
112
libraries/osx/patches/wxwidgets-webkit-fix.diff
Normal file
112
libraries/osx/patches/wxwidgets-webkit-fix.diff
Normal file
@ -0,0 +1,112 @@
|
||||
Index: include/wx/defs.h
|
||||
===================================================================
|
||||
--- include/wx/defs.h
|
||||
+++ include/wx/defs.h
|
||||
@@ -3091,4 +3091,5 @@
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(NSSet);
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(EAGLContext);
|
||||
+DECLARE_WXCOCOA_OBJC_CLASS(UIWebView);
|
||||
|
||||
typedef WX_UIWindow WXWindow;
|
||||
@@ -3096,6 +3097,13 @@
|
||||
typedef WX_EAGLContext WXGLContext;
|
||||
typedef WX_NSString* WXGLPixelFormat;
|
||||
-
|
||||
-#endif
|
||||
+typedef WX_UIWebView OSXWebViewPtr;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#if wxOSX_USE_COCOA_OR_CARBON
|
||||
+DECLARE_WXCOCOA_OBJC_CLASS(WebView);
|
||||
+typedef WX_WebView OSXWebViewPtr;
|
||||
+#endif
|
||||
+
|
||||
|
||||
#endif /* __WXMAC__ */
|
||||
Index: include/wx/html/webkit.h
|
||||
===================================================================
|
||||
--- include/wx/html/webkit.h
|
||||
+++ include/wx/html/webkit.h
|
||||
@@ -19,5 +19,4 @@
|
||||
|
||||
#include "wx/control.h"
|
||||
-DECLARE_WXCOCOA_OBJC_CLASS(WebView);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -108,5 +107,5 @@
|
||||
wxString m_pageTitle;
|
||||
|
||||
- WX_WebView m_webView;
|
||||
+ OSXWebViewPtr m_webView;
|
||||
|
||||
// we may use this later to setup our own mouse events,
|
||||
Index: include/wx/osx/webview_webkit.h
|
||||
===================================================================
|
||||
--- include/wx/osx/webview_webkit.h
|
||||
+++ include/wx/osx/webview_webkit.h
|
||||
@@ -158,5 +158,5 @@
|
||||
wxString m_pageTitle;
|
||||
|
||||
- wxObjCID m_webView;
|
||||
+ OSXWebViewPtr m_webView;
|
||||
|
||||
// we may use this later to setup our own mouse events,
|
||||
Index: src/osx/webview_webkit.mm
|
||||
===================================================================
|
||||
--- src/osx/webview_webkit.mm
|
||||
+++ src/osx/webview_webkit.mm
|
||||
@@ -442,7 +442,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView goBack];
|
||||
+ [m_webView goBack];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::GoForward()
|
||||
@@ -450,7 +450,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView goForward];
|
||||
+ [m_webView goForward];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Reload(wxWebViewReloadFlags flags)
|
||||
@@ -849,7 +849,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView cut:m_webView];
|
||||
+ [m_webView cut:m_webView];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Copy()
|
||||
@@ -857,7 +857,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView copy:m_webView];
|
||||
+ [m_webView copy:m_webView];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Paste()
|
||||
@@ -865,7 +865,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView paste:m_webView];
|
||||
+ [m_webView paste:m_webView];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::DeleteSelection()
|
||||
@@ -873,7 +873,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView deleteSelection];
|
||||
+ [m_webView deleteSelection];
|
||||
}
|
||||
|
||||
bool wxWebViewWebKit::HasSelection() const
|
Loading…
Reference in New Issue
Block a user