mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Use lowercase packagename when installing on linux/unix for easier packaging
This commit is contained in:
parent
197660b46e
commit
cb3c889abf
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user