Created
June 2, 2012 23:57
-
-
Save Tasssadar/2860554 to your computer and use it in GitHub Desktop.
Patch for lorris to make it compilable under Mac OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dep/SDL/include/SDL_main.h b/dep/SDL/include/SDL_main.h | |
index 3312cb6..38564a3 100644 | |
--- a/dep/SDL/include/SDL_main.h | |
+++ b/dep/SDL/include/SDL_main.h | |
@@ -51,8 +51,9 @@ | |
* } | |
* @endcode | |
*/ | |
-#ifndef USING_PCH | |
+#if !defined USING_PCH && !defined(Q_OS_MAC) | |
#define main SDL_main | |
+#error "aaa 1" | |
#endif | |
/** The prototype for the application's main() function */ | |
diff --git a/dep/qextserialport/config.pri b/dep/qextserialport/config.pri | |
index 204cca4..d693393 100644 | |
--- a/dep/qextserialport/config.pri | |
+++ b/dep/qextserialport/config.pri | |
@@ -8,4 +8,6 @@ | |
QEXTSERIALPORT_LIBRARY = yes | |
# uncomment the following line too if you want to use it as static library | |
-QEXTSERIALPORT_STATIC = yes | |
+unix:!macx { | |
+ QEXTSERIALPORT_STATIC = yes | |
+} | |
diff --git a/src/joystick/joymgr.h b/src/joystick/joymgr.h | |
index e139dcc..72f65f2 100644 | |
--- a/src/joystick/joymgr.h | |
+++ b/src/joystick/joymgr.h | |
@@ -12,12 +12,13 @@ | |
#include <QMutex> | |
#include <QStringList> | |
-#ifdef Q_OS_WIN | |
+#if defined Q_OS_WIN || defined Q_OS_MAC | |
#include <SDL.h> | |
#else // use lib from OS on other systems | |
#include <SDL/SDL.h> | |
#endif | |
+ | |
#include "../singleton.h" | |
#include "joystick.h" | |
#include "joythread.h" | |
diff --git a/src/pch.h b/src/pch.h | |
index 8651eb3..b51c860 100644 | |
--- a/src/pch.h | |
+++ b/src/pch.h | |
@@ -13,10 +13,10 @@ | |
#include <QVBoxLayout> | |
#include <QHBoxLayout> | |
-#ifdef Q_OS_WIN | |
+#if defined Q_OS_WIN || defined Q_OS_MAC | |
#include <SDL.h> | |
#else // use lib from OS on other systems | |
- #include <SDL/SDL.h> | |
+ #include <SDL.h> | |
#endif | |
#include "common.h" | |
#include "shared/hexfile.h" | |
diff --git a/src/src.pro b/src/src.pro | |
index d467d72..0fd4760 100644 | |
--- a/src/src.pro | |
+++ b/src/src.pro | |
@@ -230,6 +230,7 @@ unix:!macx:!symbian { | |
INSTALLS += target translations | |
} | |
macx { | |
+ INCLUDEPATH += ../dep/SDL/include | |
LIBS += -lqwt_lorris -lqextserialport -lSDL -lqextserialport | |
QMAKE_POST_LINK = mkdir \ | |
"$$DESTDIR/translations" 2> /dev/null \ | |
@@ -237,6 +238,13 @@ macx { | |
cp \ | |
translations/*.qm \ | |
"$$DESTDIR/translations/ 2> /dev/null" | |
+ | |
+ translations.path = /usr/share/lorris/ | |
+ translations.files = ../translations/Lorris.*.qm | |
+ qext.path = /usr/lib/ | |
+ qext.files = ../dep/qextserialport/lib/libqextserialport.* | |
+ target.path = /Applications/ | |
+ INSTALLS += target translations qext | |
} | |
FORMS += \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment