Mac build script: workaround for qt_menu.nib problem.

http://code.google.com/p/phantomjs/issues/detail?id=142

See also the Qt bug:
https://bugreports.qt.nokia.com/browse/QTBUG-5952
1.3
Ariya Hidayat 2011-09-09 22:01:09 -07:00
parent b68e06a11c
commit 53b70172a1
2 changed files with 20 additions and 0 deletions

View File

@ -27,6 +27,7 @@ mv qt-everywhere-opensource-src-$QT_VERSION Qt-$QT_VERSION
cd $QT_FOLDER
patch configure ../allow-static-qtwebkit.patch
patch -p1 < ../qapplication_skip_qtmenu.patch
echo "Building Qt $QT_VERSION. Please wait..."
echo
./configure -opensource -confirm-license -release -static -no-exceptions -no-stl -no-xmlpatterns -no-phonon -no-qt3support -no-opengl -no-declarative -qt-libpng -qt-libjpeg -no-libmng -no-libtiff -D QT_NO_STYLE_CDE -D QT_NO_STYLE_CLEANLOOKS -D QT_NO_STYLE_MOTIF -D QT_NO_STYLE_PLASTIQUE -cocoa -prefix $PWD -arch x86 -nomake demos -nomake examples -nomake tools

View File

@ -0,0 +1,19 @@
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index ed9e9ce..ca35249 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1253,11 +1253,14 @@ void qt_init(QApplicationPrivate *priv, int)
[newDelegate setReflectionDelegate:oldDelegate];
[cocoaApp setDelegate:newDelegate];
+// https://bugreports.qt.nokia.com/browse/QTBUG-5952
QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) alloc] init];
if ([NSBundle loadNibNamed:@"qt_menu" owner:qtMenuLoader] == false) {
+#if 0
qFatal("Qt internal error: qt_menu.nib could not be loaded. The .nib file"
" should be placed in QtGui.framework/Versions/Current/Resources/ "
" or in the resources directory of your application bundle.");
+#endif
}
[cocoaApp setMenu:[qtMenuLoader menu]];