From: Gaudenz Steinlin Date: Thu, 22 Dec 2016 07:55:05 +0000 (+0000) Subject: fix-help-data-dir X-Git-Tag: archive/raspbian/0.8.1.1-1+rpi1^2^2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9799579a89e6a0418ae14e8a4783b0e9c5eb7ccb;p=openorienteering-mapper.git fix-help-data-dir Gbp-Pq: Name fix-help-data-dir.patch --- diff --git a/src/mapper_config.h.in b/src/mapper_config.h.in index 9f3ff3e..4c78d73 100644 --- a/src/mapper_config.h.in +++ b/src/mapper_config.h.in @@ -26,6 +26,8 @@ #define APP_NAME qApp->translate("Global", QT_TRANSLATE_NOOP("Global", "OpenOrienteering Mapper")) #define APP_VERSION "@Mapper_VERSION_DISPLAY@" #define MAPPER_HELP_NAMESPACE "@Mapper_HELP_NAMESPACE@" +#define MAPPER_DATA_DESTINATION "@MAPPER_DATA_DESTINATION@" +#define MAPPER_LIBRARY_DESTINATION "@MAPPER_LIBRARY_DESTINATION@" #cmakedefine Mapper_BUILD_PROJ #cmakedefine Mapper_TRANSLATIONS_EMBEDDED diff --git a/src/mapper_resource.cpp b/src/mapper_resource.cpp index c7e9d0c..7e97c9c 100644 --- a/src/mapper_resource.cpp +++ b/src/mapper_resource.cpp @@ -122,8 +122,8 @@ QStringList MapperResource::getLocations(MapperResource::RESOURCE_TYPE resource_ #endif #if defined(MAPPER_PACKAGE_NAME) - // Linux: program in xxx/bin, resources in xxx/bin/../share/PACKAGE_NAME - QString linux_dir(app_dir.absoluteFilePath(QLatin1String("../share/") + QString::fromUtf8(MAPPER_PACKAGE_NAME) + resource_path)); + // Linux: resources in MAPPER_DATA_DESTINATION + QString linux_dir(app_dir.absoluteFilePath(QString::fromUtf8(MAPPER_DATA_DESTINATION) + resource_path)); addIfExists(locations, linux_dir); #endif @@ -175,8 +175,9 @@ QStringList MapperResource::getProgramLocations(MapperResource::RESOURCE_TYPE re QDir app_dir(QCoreApplication::applicationDirPath()); #if defined(Mapper_PACKAGE_ASSISTANT) and defined(MAPPER_PACKAGE_NAME) - // Linux: extra binaries in xxx/bin/../share/PACKAGE_NAME/bin - addIfExists(locations, app_dir.absoluteFilePath(QLatin1String("../lib/") + QString::fromUtf8(MAPPER_PACKAGE_NAME) + QLatin1String("/bin/") + program_name)); + // Linux: extra binaries in MAPPER_LIBRARY_DESTINATION/bin + addIfExists(locations, app_dir.absoluteFilePath(QString::fromUtf8(MAPPER_LIBRARY_DESTINATION) + QLatin1String("/bin/") + program_name)); + #endif // Find the program which is in the same directory as Mapper