From 024c30d909d15357b8a4adef0f378455accb6dee Mon Sep 17 00:00:00 2001 From: Xawotihs Date: Sun, 21 Aug 2011 18:55:16 +0000 Subject: [PATCH] Added user and system path for QT_CONFIG, added meego policy file, updated meego rules file, removed now useless Meego Res.txt file --- JGE/src/JFileSystem.cpp | 3 + projects/mtg/debian_harmattan/Res.txt | 2 - projects/mtg/debian_harmattan/rules | 12 +++- projects/mtg/debian_harmattan/wagic.conf | 2 + projects/mtg/wagic-qt.pro | 84 +++++++++++++++++++----- 5 files changed, 84 insertions(+), 19 deletions(-) delete mode 100644 projects/mtg/debian_harmattan/Res.txt create mode 100644 projects/mtg/debian_harmattan/wagic.conf diff --git a/JGE/src/JFileSystem.cpp b/JGE/src/JFileSystem.cpp index 57e7b44dc..92812bf38 100644 --- a/JGE/src/JFileSystem.cpp +++ b/JGE/src/JFileSystem.cpp @@ -103,6 +103,9 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath) #elif defined (ANDROID) userPath = "/sdcard/Wagic/Res/"; systemPath = ""; +#elif defined (QT_CONFIG) + userPath = USERDIR; + systemPath = RESDIR; #else //Find the Res.txt file and matching Res folders for backwards compatibility ifstream mfile("Res.txt"); diff --git a/projects/mtg/debian_harmattan/Res.txt b/projects/mtg/debian_harmattan/Res.txt deleted file mode 100644 index af817ad44..000000000 --- a/projects/mtg/debian_harmattan/Res.txt +++ /dev/null @@ -1,2 +0,0 @@ -/home/user/MyDocs/wagic/Res/ -/opt/wagic/bin/Res/ diff --git a/projects/mtg/debian_harmattan/rules b/projects/mtg/debian_harmattan/rules index dd8a9eecf..ef303d999 100755 --- a/projects/mtg/debian_harmattan/rules +++ b/projects/mtg/debian_harmattan/rules @@ -12,6 +12,14 @@ APPNAME := wagic +configure: configure-stamp +configure-stamp: + dh_testdir + qmake PREFIX=/usr +# Uncomment this line for use without Qt Creator + + touch configure-stamp + builddir: mkdir -p builddir @@ -22,7 +30,7 @@ builddir/Makefile: builddir build: build-stamp -build-stamp: builddir/Makefile +build-stamp: builddir/Makefile configure-stamp dh_testdir # Add here commands to compile the package. @@ -34,7 +42,7 @@ build-stamp: builddir/Makefile clean: dh_testdir dh_testroot - rm -f build-stamp + rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. # $(MAKE) clean diff --git a/projects/mtg/debian_harmattan/wagic.conf b/projects/mtg/debian_harmattan/wagic.conf new file mode 100644 index 000000000..cc9a7d155 --- /dev/null +++ b/projects/mtg/debian_harmattan/wagic.conf @@ -0,0 +1,2 @@ +[classify gaming] +/opt/wagic/bin/wagic \ No newline at end of file diff --git a/projects/mtg/wagic-qt.pro b/projects/mtg/wagic-qt.pro index 12f175eac..79e962816 100644 --- a/projects/mtg/wagic-qt.pro +++ b/projects/mtg/wagic-qt.pro @@ -5,6 +5,7 @@ #------------------------------------------------- QT += core gui opengl phonon + #CONFIG += warn_off precompile_header // causes some massives errors on mac. VERSION = 0.16.0 TARGET = wagic @@ -21,14 +22,6 @@ maemo5 { QT += dbus } -exists($$QMAKE_INCDIR_QT"/../qmsystem2/qmkeys.h"):!contains(MEEGO_EDITION,harmattan): { - MEEGO_VERSION_MAJOR = 1 - MEEGO_VERSION_MINOR = 2 - MEEGO_VERSION_PATCH = 0 - MEEGO_EDITION = harmattan - DEFINES += MEEGO_EDITION_HARMATTAN -} - windows:INCLUDEPATH += ../../JGE/Dependencies/include windows:INCLUDEPATH += extra unix:!symbian:INCLUDEPATH += /usr/include/GL @@ -372,18 +365,40 @@ maemo5: { } # Meego/maemo 6 packaging (no launcher) -unix:!symbian:!maemo5 { +#unix:!symbian:!maemo5 { +exists($$QMAKE_INCDIR_QT"/../qmsystem2/qmkeys.h"):!contains(MEEGO_EDITION,harmattan): { + MEEGO_VERSION_MAJOR = 1 + MEEGO_VERSION_MINOR = 2 + MEEGO_VERSION_PATCH = 0 + MEEGO_EDITION = harmattan + DEFINES += MEEGO_EDITION_HARMATTAN + # Variables BINDIR = /opt/wagic/bin - RESDIR = /opt/wagic/bin/Res + RESDIR = /opt/wagic/Res + USERDIR = /home/user/MyDocs/.Wagic ICONDIR = /usr/share + DEFINES += RESDIR=\\\"$$RESDIR\\\" + DEFINES += USERDIR=\\\"$$USERDIR\\\" INSTALLS += target \ desktop \ icon \ restxt \ - res \ + policy \ + res_ai \ + res_campaigns \ + res_graphics \ + res_lang \ + res_packs \ + res_player \ + res_profiles \ + res_rules \ + res_sets \ + res_settings \ + res_sound \ + res_themes \ target.path = $$BINDIR @@ -393,9 +408,48 @@ unix:!symbian:!maemo5 { icon.files = wagic-80x80.png icon.path = /usr/share/icons/hicolor/64x64/apps - res.path = $$RESDIR - res.files += bin/Res/* + policy.files = debian_harmattan/wagic.conf + policy.path = /usr/share/policy/etc/syspart.conf.d - restxt.path = $$BINDIR - restxt.files += debian/Res.txt + res_ai.path = $$RESDIR/ai + res_ai.files += bin/Res/ai/* + + res_campaigns.path = $$RESDIR/campaigns + res_campaigns.files += bin/Res/campaigns/* + + res_graphics.path = $$RESDIR/graphics + res_graphics.files += bin/Res/graphics/* + + res_lang.path = $$RESDIR/lang + res_lang.files += bin/Res/lang/* + + res_packs.path = $$RESDIR/packs + res_packs.files += bin/Res/packs/* + + res_player.path = $$RESDIR/player + res_player.files += bin/Res/player/* + + res_profiles.path = $$RESDIR/profiles + res_profiles.files += bin/Res/profiles/* + + res_rules.path = $$RESDIR/rules + res_rules.files += bin/Res/rules/* + + res_sets.sets = $$RESDIR/sets + res_sets.sets += bin/Res/sets/* + + res_settings.sets = $$RESDIR/settings + res_settings.sets += bin/Res/settings/* + + res_sound.sets = $$RESDIR/sound + res_sound.sets += bin/Res/sound/* + + res_themes.sets = $$RESDIR/themes + res_themes.sets += bin/Res/themes/* +} else:unix { + RESDIR = Res + USERDIR = ~/.Wagic + DEFINES += RESDIR=\\\"$$RESDIR\\\" + DEFINES += USERDIR=\\\"$$USERDIR\\\" } +