Use lowercase packagename when installing on linux/unix for easier packaging

This commit is contained in:
Felix Kauselmann 2014-08-18 23:22:41 +02:00
parent 197660b46e
commit cb3c889abf
10 changed files with 21 additions and 20 deletions

View File

@ -3,7 +3,7 @@ Name=YACReader
GenericName=Yet Another Comic Reader
Comment=Yet Another Comic Reader
Exec=YACReader %f
Icon=/home/herr_k/builds/yacreader/yacreader/YACReader/test/share/YACReader/icon.png
Icon=/usr/share/yacreader/icon.png
Terminal=false
Type=Application
StartupNotify=true

View File

@ -80,22 +80,22 @@ isEmpty(DESTDIR) {
bin.files = $$DESTDIR/YACReader
}
docs.path = $$DATADIR/doc/YACReader
docs.path = $$DATADIR/doc/yacreader
#rename docs for better packageability
docs.extra = cp ../CHANGELOG.txt ../changelog; cp ../README.txt ../README
docs.files = ../README ../changelog
icon.path = $$DATADIR/YACReader
icon.path = $$DATADIR/yacreader
icon.files = ../images/icon.png
desktop.path = $$DATADIR/applications
desktop.extra = desktop-file-edit --set-icon=$$DATADIR/YACReader/icon.png $$PWD/../YACReader.desktop
desktop.extra = desktop-file-edit --set-icon=$$DATADIR/yacreader/icon.png $$PWD/../YACReader.desktop
desktop.files = ../YACReader.desktop
#TODO: icons should be located at /usr/share/icons and have the same basename as their application
translation.path = $$DATADIR/YACReader/languages
translation.path = $$DATADIR/yacreader/languages
translation.files = ../release/languages/yacreader_*
manpage.path = $$DATADIR/man/man1

View File

@ -129,7 +129,7 @@ int main(int argc, char * argv[])
QTranslator translator;
QString sufix = QLocale::system().name();
#if defined Q_OS_UNIX && !defined Q_OS_MAC
translator.load(QString(DATADIR)+"/YACReader/languages/yacreader_"+sufix);
translator.load(QString(DATADIR)+"/yacreader/languages/yacreader_"+sufix);
#else
translator.load(QCoreApplication::applicationDirPath()+"/languages/yacreader_"+sufix);
#endif

View File

@ -3,7 +3,7 @@ Name=YACReader Library
GenericName=Yet Another Comic Reader
Comment=Yet Another Comic Reader
Exec=YACReaderLibrary %f
Icon=/usr/share/YACReader/iconLibrary.png
Icon=/usr/share/yacreader/iconLibrary.png
Terminal=false
Type=Application
StartupNotify=true

View File

@ -230,18 +230,18 @@ isEmpty(DESTDIR) {
bin.files = $$DESTDIR/YACReaderLibrary
}
server.path = $$DATADIR/YACReader
server.path = $$DATADIR/yacreader
server.files = ../release/server
icon.path = $$DATADIR/YACReader
icon.path = $$DATADIR/yacreader
icon.files = ../images/iconLibrary.png ../images/db.png ../images/coversPackage.png
desktop.path = $$DATADIR/applications
desktop.extra = desktop-file-edit --set-icon=$$DATADIR/YACReader/iconLibrary.png $$PWD/../YACReaderLibrary.desktop
desktop.extra = desktop-file-edit --set-icon=$$DATADIR/yacreader/iconLibrary.png $$PWD/../YACReaderLibrary.desktop
desktop.files = ../YACReaderLibrary.desktop
#TODO: icons should be located at /usr/share/icons and have the same basename as their application
translation.path = $$DATADIR/YACReader/languages
translation.path = $$DATADIR/yacreader/languages
translation.files = ../release/languages/yacreaderlibrary_*
manpage.path = $$DATADIR/man/man1

View File

@ -182,7 +182,7 @@ int main( int argc, char ** argv )
QTranslator translator;
QString sufix = QLocale::system().name();
#if defined Q_OS_UNIX && !defined Q_OS_MAC
translator.load(QString(DATADIR) +"/YACReader/languages/yacreaderlibrary_"+sufix);
translator.load(QString(DATADIR)+"/yacreader/languages/yacreaderlibrary_"+sufix);
#else
translator.load(QCoreApplication::applicationDirPath()+"/languages/yacreaderlibrary_"+sufix);
#endif
@ -190,7 +190,7 @@ int main( int argc, char ** argv )
QTranslator viewerTranslator;
#if defined Q_OS_UNIX && !defined Q_OS_MAC
viewerTranslator.load(QString(DATADIR)+"/YACReader/languages/yacreader_"+sufix);
viewerTranslator.load(QString(DATADIR)+"/yacreader/languages/yacreader_"+sufix);
#else
viewerTranslator.load(QCoreApplication::applicationDirPath()+"/languages/yacreader_"+sufix);
#endif

View File

@ -11,6 +11,7 @@
#include "static.h"
#include <QApplication>
StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
:HttpRequestHandler(parent)
{
@ -25,8 +26,8 @@ StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
#endif
{
#if defined Q_OS_UNIX && ! defined Q_OS_MAC
QFileInfo configFile(QString(DATADIR)+"/YACReader");
docroot=QFileInfo(QString(DATADIR)+"/YACReader",docroot).absoluteFilePath();
QFileInfo configFile(QString(DATADIR)+"/yacreader");
docroot=QFileInfo(QString(DATADIR)+"/yacreader",docroot).absoluteFilePath();
#else
QFileInfo configFile(QApplication::applicationDirPath());
docroot=QFileInfo(QApplication::applicationDirPath(),docroot).absoluteFilePath();
@ -220,7 +221,7 @@ QString StaticFileController::getDeviceAwareFileName(QString fileName, QString d
QString baseName = fi.baseName();
QString extension = fi.completeSuffix();
QString completeFileName = completeFileName = baseName+display+"."+extension;
QString completeFileName = baseName+display+"."+extension;
if(QFile(docroot+"/"+path+completeFileName).exists())
return completeFileName;
else

View File

@ -23,8 +23,8 @@ TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
#endif
{
#if defined Q_OS_UNIX && !defined Q_OS_MAC
QFileInfo configFile(QString(DATADIR)+"/YACReader");
templatePath=QFileInfo(QString(DATADIR)+"/YACReader",templatePath).absoluteFilePath();
QFileInfo configFile(QString(DATADIR)+"/yacreader");
templatePath=QFileInfo(QString(DATADIR)+"/yacreader",templatePath).absoluteFilePath();
#else
QFileInfo configFile(QApplication::applicationDirPath());
templatePath=QFileInfo(QApplication::applicationDirPath(),templatePath).absoluteFilePath();

View File

@ -58,7 +58,7 @@ void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
HttpSession session=Static::sessionStore->getSession(request,response,false);
if(!session.isNull() && session.contains("ySession"))
{
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().contains(library.cap(1).toInt()) )
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().contains(library.cap(1).toInt()) )
{
//listar el contenido del folder
if(folder.exactMatch(path))

View File

@ -27,7 +27,7 @@ QString Static::getConfigDir() {
}
// Search config file
#if defined Q_OS_UNIX && !defined Q_OS_MAC
QString binDir=(QString(DATADIR) + "/YACReader");
QString binDir=(QString(DATADIR)+"/yacreader");
#else
QString binDir=QCoreApplication::applicationDirPath();
#endif