fix-help-data-dir
authorGaudenz Steinlin <gaudenz@debian.org>
Thu, 22 Dec 2016 07:55:05 +0000 (07:55 +0000)
committerGaudenz Steinlin <gaudenz@debian.org>
Thu, 22 Dec 2016 07:55:05 +0000 (07:55 +0000)
Gbp-Pq: Name fix-help-data-dir.patch

src/mapper_config.h.in
src/mapper_resource.cpp

index 9f3ff3e403c10de1e0bd59312a9c849fa335eb6e..4c78d73d52b6749ec3cd9a9f6b10f628e494183b 100644 (file)
@@ -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
index c7e9d0c951a4bf976885c39c12e1c77b56339ffe..7e97c9c876ff33ca59c30010d47ef19559caa049 100644 (file)
@@ -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