This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
+17
-13
@@ -3,9 +3,12 @@
|
||||
TEMPLATE = app
|
||||
CODECFORSRC = UTF-8
|
||||
|
||||
INSTALLS += TARGET
|
||||
TARGET.files += bin/*
|
||||
TARGET.path = /usr/bin/
|
||||
CONFIG += qt thread embed_manifest_exe release
|
||||
#CONFIG += qt thread embed_manifest_exe warn_on debug
|
||||
UI_DIR = uics
|
||||
MOC_DIR = mocs
|
||||
OBJECTS_DIR = obj
|
||||
TARGET = pokerth
|
||||
|
||||
INCLUDEPATH += . \
|
||||
src \
|
||||
@@ -205,7 +208,6 @@ TRANSLATIONS = \
|
||||
ts/pokerth_it.ts \
|
||||
ts/pokerth_nl.ts
|
||||
|
||||
|
||||
win32{
|
||||
DEPENDPATH += src/net/win32/ src/core/win32
|
||||
INCLUDEPATH += ../boost/ ../SDL/include ../SDL_mixer
|
||||
@@ -240,6 +242,17 @@ unix: !mac{
|
||||
|
||||
## My release static libs
|
||||
#LIBS += -lcrypto -lSDL_mixer -lSDL -lmikmod
|
||||
|
||||
#### INSTALL ####
|
||||
|
||||
targets.files += pokerth
|
||||
targets.path = /usr/bin/
|
||||
|
||||
data.path = /usr/share/pokerth/data
|
||||
data.files = data/*
|
||||
|
||||
INSTALLS += targets data
|
||||
|
||||
}
|
||||
|
||||
mac{
|
||||
@@ -273,12 +286,3 @@ mac{
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
|
||||
}
|
||||
|
||||
#CONFIG += qt thread embed_manifest_exe release
|
||||
CONFIG += qt thread embed_manifest_exe warn_on debug
|
||||
UI_DIR = uics
|
||||
TARGET = bin/pokerth
|
||||
MOC_DIR = mocs
|
||||
OBJECTS_DIR = obj
|
||||
QT +=
|
||||
# QMAKE_CXXFLAGS_DEBUG += -g
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "game.h"
|
||||
#include "session.h"
|
||||
#include "tools.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
#include "configfile.h"
|
||||
#include "sdlplayer.h"
|
||||
|
||||
@@ -51,6 +51,7 @@ class startNetworkGameDialogImpl;
|
||||
class changeHumanPlayerNameDialogImpl;
|
||||
class gameLobbyDialogImpl;
|
||||
|
||||
class QtHelper;
|
||||
class QColor;
|
||||
|
||||
class SDLPlayer;
|
||||
|
||||
@@ -78,7 +78,8 @@ void StartSplash::paintEvent(QPaintEvent * event) {
|
||||
versionFont.setFamily("Nimbus Sans L");
|
||||
versionFont.setPixelSize(12);
|
||||
|
||||
QPixmap logo(":/graphics/resources/graphics/logoChip3D.png");
|
||||
// std::cout << myQtHelper->getDataPath().toStdString() << endl;
|
||||
QPixmap logo(myQtHelper->getDataPath()+"gfx/logoChip3D.png");
|
||||
|
||||
if(frameNo >= 52 && frameNo < 55) {
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#define STARTSPLASH_H
|
||||
|
||||
#include "mainwindowimpl.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
@@ -38,6 +39,7 @@ public slots:
|
||||
private:
|
||||
|
||||
mainWindowImpl *myW;
|
||||
QtHelper *myQtHelper;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -28,4 +28,31 @@ std::string QtHelper::stringToUtf8(const std::string &myString) {
|
||||
return myUtf8String;
|
||||
}
|
||||
|
||||
std::string QtHelper::getDefaultLanguage() { return QLocale::system().name().toStdString(); }
|
||||
std::string QtHelper::getDefaultLanguage() { return QLocale::system().name().toStdString(); }
|
||||
|
||||
QString QtHelper::getDataPath()
|
||||
{
|
||||
QString path = QCoreApplication::instance()->applicationDirPath();
|
||||
|
||||
#ifdef _WIN32
|
||||
path += "/data/";
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
if (QRegExp("Contents/MacOS/?$").indexIn(path) != -1) {
|
||||
// pointing into an macosx application bundle
|
||||
path += "/../Resources/data/";
|
||||
} else { path += "/data/"; }
|
||||
#else //Unix
|
||||
if (QRegExp("pokerth/?$").indexIn(path) != -1) {
|
||||
// there is an own application directory
|
||||
path += "/data/";
|
||||
} else if (QRegExp("bin/?$").indexIn(path) != -1) {
|
||||
// we are in a bin directory. e.g. /usr/bin
|
||||
path += "/../share/pokerth/data/";
|
||||
} else { path += "/data/"; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
return QDir::cleanPath(path) + "/";
|
||||
}
|
||||
@@ -16,7 +16,8 @@
|
||||
/**
|
||||
@author FThauer FHammer <webmaster@pokerth.net>
|
||||
*/
|
||||
class QtHelper{
|
||||
class QtHelper : public QObject{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QtHelper();
|
||||
|
||||
@@ -25,6 +26,8 @@ public:
|
||||
std::string stringToUtf8(const std::string &);
|
||||
std::string getDefaultLanguage();
|
||||
|
||||
QString getDataPath();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
<file>resources/graphics/bigblindPuck.png</file>
|
||||
<file>resources/graphics/fileopen16.png</file>
|
||||
<file>resources/graphics/handRanking_release.png</file>
|
||||
<file>resources/graphics/logoChip3D.png</file>
|
||||
<file>resources/graphics/smallblindPuck.png</file>
|
||||
<file>resources/graphics/toolboxFrameBG.png</file>
|
||||
<file>resources/graphics/windowicon.png</file>
|
||||
|
||||
Reference in New Issue
Block a user