aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2014-10-06 07:57:49 -0400
committerKen Moore <moorekou@gmail.com>2014-10-06 07:57:49 -0400
commit9bd9f99eccc775e5fc3c1196c48a404c0c10c5e6 (patch)
treee031e5e8b0b362a33e5429fda2c18bfd4bbfa32c /lumina-fm
parentAdd the template for the new LuminaThemes library class (not integrated into ... (diff)
parentupdate debian/changelog (diff)
downloadlumina-9bd9f99eccc775e5fc3c1196c48a404c0c10c5e6.tar.gz
lumina-9bd9f99eccc775e5fc3c1196c48a404c0c10c5e6.tar.bz2
lumina-9bd9f99eccc775e5fc3c1196c48a404c0c10c5e6.zip
Merge pull request #14 from Nanolx/master
proper prefix handling
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/lumina-fm.pro15
-rw-r--r--lumina-fm/main.cpp11
2 files changed, 13 insertions, 13 deletions
diff --git a/lumina-fm/lumina-fm.pro b/lumina-fm/lumina-fm.pro
index afe46993..a192d3d7 100644
--- a/lumina-fm/lumina-fm.pro
+++ b/lumina-fm/lumina-fm.pro
@@ -2,7 +2,10 @@
QT += core gui phonon
TARGET = lumina-fm
-target.path = /usr/local/bin
+isEmpty(PREFIX) {
+ PREFIX = /usr/local
+}
+target.path = $$PREFIX/bin
TEMPLATE = app
@@ -22,9 +25,9 @@ FORMS += MainUI.ui \
# RESOURCES+= lumina-fm.qrc
-INCLUDEPATH += ../libLumina /usr/local/include
+INCLUDEPATH += ../libLumina $$PREFIX/include
- LIBS += -L../libLumina -lLuminaUtils
+ LIBS += -L../libLumina -lLuminaUtils
freebsd-* {
LIBS += -lQtSolutions_SingleApplication-head
}
@@ -101,10 +104,10 @@ TRANSLATIONS = i18n/lumina-fm_af.ts \
i18n/lumina-fm_zh_TW.ts \
i18n/lumina-fm_zu.ts
-dotrans.path=/usr/local/share/Lumina-DE/i18n/
-dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/
+dotrans.path=$$PREFIX/share/Lumina-DE/i18n/
+dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$$PREFIX/share/Lumina-DE/i18n/
desktop.files=lumina-fm.desktop
-desktop.path=/usr/local/share/applications/
+desktop.path=$$PREFIX/share/applications/
INSTALLS += target dotrans desktop
diff --git a/lumina-fm/main.cpp b/lumina-fm/main.cpp
index 4c23366a..267e6e68 100644
--- a/lumina-fm/main.cpp
+++ b/lumina-fm/main.cpp
@@ -8,10 +8,7 @@
#include <QTextCodec>
#include "MainUI.h"
-
-#ifndef PREFIX
-#define PREFIX QString("/usr/local")
-#endif
+#include "../global.h"
int main(int argc, char ** argv)
{
@@ -33,16 +30,16 @@ int main(int argc, char ** argv)
QTranslator translator;
QLocale mylocale;
QString langCode = mylocale.name();
-
+
if ( ! QFile::exists(PREFIX + "/share/Lumina-DE/i18n/lumina-fm_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
translator.load( QString("lumina-fm_") + langCode, PREFIX + "/share/i18n/Lumina-DE/" );
a.installTranslator( &translator );
qDebug() << "Locale:" << langCode;
-
+
//Load current encoding for this locale
QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec
qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name();
-
+
MainUI w;
QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) );
w.OpenDirs(in);
bgstack15