Skip to content

Instantly share code, notes, and snippets.

@zv1n
zv1n / Qt486_build_steps.sh
Created April 14, 2017 18:41
Follow these steps to build a Qt 4.8.6 that is compatible with Surround SCM 2015.02
tar xf qt-everywhere-opensource-src-4.8.6.tar.gz
cd qt-everywhere-opensource-src-4.8.6/
# Grab the patch-set. Fixups for deprecation and some missing exports.
curl https://gist.githubusercontent.com/zv1n/5e1f19bcf5bd5d502d5737ce2a03ba05/raw/4de311e35214d1dfa0dd31262b28231b6745163b/qt_surroundscm_exports.patch > qt_486_scm.patch
patch -p1 < qt_486_scm.patch
# Disable phonon - it fails to build due to QTKit being remove from Frameworks in macOS 10.12.
./configure -no-phonon -no-phonon-backend -release
@zv1n
zv1n / fixup_surround_dylib.sh
Created April 14, 2017 18:25
Use otool and install_name_tool to change the lib paths for Qt 4.8.6.
cd /Applications/Surround\ SCM/Surround\ SCM\ Client.app/Content/MacOS/
for f in $(otool -L Surround\ SCM | grep /usr/lib/seapine | awk '{print $1}')
do
new=$(echo $f | sed 's|/usr/lib/seapine/scm|/usr/local/Trolltech/Qt-4.8.6/lib/|')
install_name_tool -change $f $new Surround\ SCM
done
@zv1n
zv1n / qt_surroundscm_exports.patch
Created April 13, 2017 18:55
Exports patch for Qt 4.8.6 and SurroundSCM
--- a/./src/gui/kernel/qcocoaapplication_mac_p.h 2014-04-10 13:37:12.000000000 -0500
+++ b/./src/gui/kernel/qcocoaapplication_mac_p.h 2017-04-13 12:46:59.000000000 -0500
@@ -104,6 +104,7 @@
- (BOOL)QT_MANGLE_NAMESPACE(qt_filterEvent):(NSEvent *)event;
@end
+Q_GUI_EXPORT
@interface QT_MANGLE_NAMESPACE(QNSApplication) : NSApplication {
}
@end