Changes to integrate a new qml gui target

This commit is contained in:
Felix Hammer
2015-01-06 00:48:19 +01:00
parent 6a8c159450
commit 507fbae5aa
7 changed files with 52 additions and 17 deletions
+8 -2
View File
@@ -1,8 +1,14 @@
# QMake pro-file for PokerTH
TEMPLATE = subdirs
SUBDIRS = pokerth_protocol.pro pokerth_db.pro pokerth_lib.pro pokerth_game.pro
!mac:!gui_800x480:!client {
SUBDIRS = pokerth_protocol.pro pokerth_db.pro pokerth_lib.pro
qml-client{
SUBDIRS += pokerth_qml-client.pro
}
!qml-client{
SUBDIRS += pokerth_game.pro
}
!mac:!gui_800x480:!client:!qml-client {
SUBDIRS += pokerth_server.pro chatcleaner.pro
}
CONFIG += ordered
Regular → Executable
+4 -3
View File
@@ -408,11 +408,12 @@ unix:!mac {
LIBPATH += $${PREFIX}/lib /opt/gsasl/lib
LIB_DIRS = $${PREFIX}/lib \
$${PREFIX}/lib64 \
$${PREFIX}/lib/x86_64-linux-gnu \
$$system(qmake -query QT_INSTALL_LIBS)
}
android{
LIBPATH += $${PREFIX}/lib/armv7
LIB_DIRS = $${PREFIX}/lib/armv7
LIBPATH += $${PREFIX}/lib/armv5
LIB_DIRS = $${PREFIX}/lib/armv5
}
BOOST_FS = boost_filesystem \
boost_filesystem-mt
@@ -522,7 +523,7 @@ unix:!mac {
$$BOOST_REGEX \
$$BOOST_CHRONO \
$$BOOST_SYS
!count(BOOST_LIBS, 5):error("Unable to find boost libraries in PREFIX=$${PREFIX}/armv5")
!count(BOOST_LIBS, 6):error("Unable to find boost libraries in PREFIX=$${PREFIX}/armv5")
LIBS += -ltinyxml
LIBS += $$BOOST_LIBS
LIBS += -lgsasl -lidn
Regular → Executable
+16 -9
View File
@@ -33,17 +33,24 @@ win32 {
DEFINES += _WIN32_WINNT=0x0501
}
unix : !mac {
INCLUDEPATH += $${PREFIX}/include
system(protoc pokerth.proto --cpp_out=src/third_party/protobuf)
system(protoc chatcleaner.proto --cpp_out=src/third_party/protobuf)
system(protoc pokerth.proto --java_out=tests/src)
INCLUDEPATH += $${PREFIX}/include
android {
system(wine protoc.exe pokerth.proto --cpp_out=src/third_party/protobuf)
system(wine protoc.exe chatcleaner.proto --cpp_out=src/third_party/protobuf)
system(wine protoc.exe pokerth.proto --java_out=tests/src)
}
!android {
system(protoc pokerth.proto --cpp_out=src/third_party/protobuf)
system(protoc chatcleaner.proto --cpp_out=src/third_party/protobuf)
system(protoc pokerth.proto --java_out=tests/src)
}
}
mac {
# make it x86_64 only
CONFIG += x86_64
CONFIG -= x86
CONFIG -= ppc
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
# make it x86_64 only
CONFIG += x86_64
CONFIG -= x86
CONFIG -= ppc
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
# for universal-compilation on PPC-Mac uncomment the following line
# on Intel-Mac you have to comment this line out or build will fail.
+1 -1
View File
@@ -35,7 +35,7 @@
#ifdef ANDROID
#ifndef ANDROID_TEST
#include "QtGui/5.3.0/QtGui/qpa/qplatformnativeinterface.h"
#include "QtGui/5.4.0/QtGui/qpa/qplatformnativeinterface.h"
#include <jni.h>
#endif
#endif
+1 -1
View File
@@ -69,7 +69,7 @@
#ifdef ANDROID
#ifndef ANDROID_TEST
#include "QtGui/5.3.0/QtGui/qpa/qplatformnativeinterface.h"
#include "QtGui/5.4.0/QtGui/qpa/qplatformnativeinterface.h"
#include <jni.h>
#endif
#endif
+1 -1
View File
@@ -61,7 +61,7 @@
#ifdef ANDROID
#ifndef ANDROID_TEST
#include "QtGui/5.3.0/QtGui/qpa/qplatformnativeinterface.h"
#include "QtGui/5.4.0/QtGui/qpa/qplatformnativeinterface.h"
#include <jni.h>
#endif
#endif
+21
View File
@@ -28,6 +28,23 @@
* shall include the source code for the parts of OpenSSL used as well *
* as that of the covered work. *
*****************************************************************************/
#ifdef QML_CLIENT
//START THE QML SWITCH HERE
#include <QApplication>
#include "qmlwrapper.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
qmlWrapper *myQml = new qmlWrapper();
return app.exec();
}
#else
// START OF OLD QT-WIDGETS GUI SECTION
#include <boost/asio.hpp>
#include <iostream>
#include <cstdlib>
@@ -285,3 +302,7 @@ int main( int argc, char **argv )
socket_cleanup();
return retVal;
}
// END OF OLD QT-WIDGETS GUI SECTION
#endif