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
|
GenericName=Yet Another Comic Reader
|
||||||
Comment=Yet Another Comic Reader
|
Comment=Yet Another Comic Reader
|
||||||
Exec=YACReader %f
|
Exec=YACReader %f
|
||||||
Icon=/home/herr_k/builds/yacreader/yacreader/YACReader/test/share/YACReader/icon.png
|
Icon=/usr/share/yacreader/icon.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
|
@ -80,22 +80,22 @@ isEmpty(DESTDIR) {
|
|||||||
bin.files = $$DESTDIR/YACReader
|
bin.files = $$DESTDIR/YACReader
|
||||||
}
|
}
|
||||||
|
|
||||||
docs.path = $$DATADIR/doc/YACReader
|
docs.path = $$DATADIR/doc/yacreader
|
||||||
|
|
||||||
#rename docs for better packageability
|
#rename docs for better packageability
|
||||||
docs.extra = cp ../CHANGELOG.txt ../changelog; cp ../README.txt ../README
|
docs.extra = cp ../CHANGELOG.txt ../changelog; cp ../README.txt ../README
|
||||||
docs.files = ../README ../changelog
|
docs.files = ../README ../changelog
|
||||||
|
|
||||||
icon.path = $$DATADIR/YACReader
|
icon.path = $$DATADIR/yacreader
|
||||||
icon.files = ../images/icon.png
|
icon.files = ../images/icon.png
|
||||||
|
|
||||||
desktop.path = $$DATADIR/applications
|
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
|
desktop.files = ../YACReader.desktop
|
||||||
|
|
||||||
#TODO: icons should be located at /usr/share/icons and have the same basename as their application
|
#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_*
|
translation.files = ../release/languages/yacreader_*
|
||||||
|
|
||||||
manpage.path = $$DATADIR/man/man1
|
manpage.path = $$DATADIR/man/man1
|
||||||
|
@ -129,7 +129,7 @@ int main(int argc, char * argv[])
|
|||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
QString sufix = QLocale::system().name();
|
QString sufix = QLocale::system().name();
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#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
|
#else
|
||||||
translator.load(QCoreApplication::applicationDirPath()+"/languages/yacreader_"+sufix);
|
translator.load(QCoreApplication::applicationDirPath()+"/languages/yacreader_"+sufix);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,7 +3,7 @@ Name=YACReader Library
|
|||||||
GenericName=Yet Another Comic Reader
|
GenericName=Yet Another Comic Reader
|
||||||
Comment=Yet Another Comic Reader
|
Comment=Yet Another Comic Reader
|
||||||
Exec=YACReaderLibrary %f
|
Exec=YACReaderLibrary %f
|
||||||
Icon=/usr/share/YACReader/iconLibrary.png
|
Icon=/usr/share/yacreader/iconLibrary.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
|
@ -230,18 +230,18 @@ isEmpty(DESTDIR) {
|
|||||||
bin.files = $$DESTDIR/YACReaderLibrary
|
bin.files = $$DESTDIR/YACReaderLibrary
|
||||||
}
|
}
|
||||||
|
|
||||||
server.path = $$DATADIR/YACReader
|
server.path = $$DATADIR/yacreader
|
||||||
server.files = ../release/server
|
server.files = ../release/server
|
||||||
|
|
||||||
icon.path = $$DATADIR/YACReader
|
icon.path = $$DATADIR/yacreader
|
||||||
icon.files = ../images/iconLibrary.png ../images/db.png ../images/coversPackage.png
|
icon.files = ../images/iconLibrary.png ../images/db.png ../images/coversPackage.png
|
||||||
|
|
||||||
desktop.path = $$DATADIR/applications
|
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
|
desktop.files = ../YACReaderLibrary.desktop
|
||||||
#TODO: icons should be located at /usr/share/icons and have the same basename as their application
|
#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_*
|
translation.files = ../release/languages/yacreaderlibrary_*
|
||||||
|
|
||||||
manpage.path = $$DATADIR/man/man1
|
manpage.path = $$DATADIR/man/man1
|
||||||
|
@ -182,7 +182,7 @@ int main( int argc, char ** argv )
|
|||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
QString sufix = QLocale::system().name();
|
QString sufix = QLocale::system().name();
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#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
|
#else
|
||||||
translator.load(QCoreApplication::applicationDirPath()+"/languages/yacreaderlibrary_"+sufix);
|
translator.load(QCoreApplication::applicationDirPath()+"/languages/yacreaderlibrary_"+sufix);
|
||||||
#endif
|
#endif
|
||||||
@ -190,7 +190,7 @@ int main( int argc, char ** argv )
|
|||||||
|
|
||||||
QTranslator viewerTranslator;
|
QTranslator viewerTranslator;
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#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
|
#else
|
||||||
viewerTranslator.load(QCoreApplication::applicationDirPath()+"/languages/yacreader_"+sufix);
|
viewerTranslator.load(QCoreApplication::applicationDirPath()+"/languages/yacreader_"+sufix);
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "static.h"
|
#include "static.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
|
||||||
StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
|
StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
|
||||||
:HttpRequestHandler(parent)
|
:HttpRequestHandler(parent)
|
||||||
{
|
{
|
||||||
@ -25,8 +26,8 @@ StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined Q_OS_UNIX && ! defined Q_OS_MAC
|
#if defined Q_OS_UNIX && ! defined Q_OS_MAC
|
||||||
QFileInfo configFile(QString(DATADIR)+"/YACReader");
|
QFileInfo configFile(QString(DATADIR)+"/yacreader");
|
||||||
docroot=QFileInfo(QString(DATADIR)+"/YACReader",docroot).absoluteFilePath();
|
docroot=QFileInfo(QString(DATADIR)+"/yacreader",docroot).absoluteFilePath();
|
||||||
#else
|
#else
|
||||||
QFileInfo configFile(QApplication::applicationDirPath());
|
QFileInfo configFile(QApplication::applicationDirPath());
|
||||||
docroot=QFileInfo(QApplication::applicationDirPath(),docroot).absoluteFilePath();
|
docroot=QFileInfo(QApplication::applicationDirPath(),docroot).absoluteFilePath();
|
||||||
@ -220,7 +221,7 @@ QString StaticFileController::getDeviceAwareFileName(QString fileName, QString d
|
|||||||
QString baseName = fi.baseName();
|
QString baseName = fi.baseName();
|
||||||
QString extension = fi.completeSuffix();
|
QString extension = fi.completeSuffix();
|
||||||
|
|
||||||
QString completeFileName = completeFileName = baseName+display+"."+extension;
|
QString completeFileName = baseName+display+"."+extension;
|
||||||
if(QFile(docroot+"/"+path+completeFileName).exists())
|
if(QFile(docroot+"/"+path+completeFileName).exists())
|
||||||
return completeFileName;
|
return completeFileName;
|
||||||
else
|
else
|
||||||
|
@ -23,8 +23,8 @@ TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
QFileInfo configFile(QString(DATADIR)+"/YACReader");
|
QFileInfo configFile(QString(DATADIR)+"/yacreader");
|
||||||
templatePath=QFileInfo(QString(DATADIR)+"/YACReader",templatePath).absoluteFilePath();
|
templatePath=QFileInfo(QString(DATADIR)+"/yacreader",templatePath).absoluteFilePath();
|
||||||
#else
|
#else
|
||||||
QFileInfo configFile(QApplication::applicationDirPath());
|
QFileInfo configFile(QApplication::applicationDirPath());
|
||||||
templatePath=QFileInfo(QApplication::applicationDirPath(),templatePath).absoluteFilePath();
|
templatePath=QFileInfo(QApplication::applicationDirPath(),templatePath).absoluteFilePath();
|
||||||
|
@ -58,7 +58,7 @@ void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
|
|||||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||||
if(!session.isNull() && session.contains("ySession"))
|
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
|
//listar el contenido del folder
|
||||||
if(folder.exactMatch(path))
|
if(folder.exactMatch(path))
|
||||||
|
@ -27,7 +27,7 @@ QString Static::getConfigDir() {
|
|||||||
}
|
}
|
||||||
// Search config file
|
// Search config file
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
QString binDir=(QString(DATADIR) + "/YACReader");
|
QString binDir=(QString(DATADIR)+"/yacreader");
|
||||||
#else
|
#else
|
||||||
QString binDir=QCoreApplication::applicationDirPath();
|
QString binDir=QCoreApplication::applicationDirPath();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user