summarylogtreecommitdiffstats
path: root/Use-usr-share-for-resource-files-bin-folder-is-for-b.patch
blob: 001f9ca87aae87d68b7a65c7082e1c8de8e4342f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From 3ccc5276eefd927c6e999b22fb6cc997b79fc8a4 Mon Sep 17 00:00:00 2001
From: Anatol Pomozov <anatol.pomozov@gmail.com>
Date: Mon, 14 Dec 2015 09:05:10 -0800
Subject: [PATCH] Use /usr/share for resource files bin folder is for 
 binaries.

---
 DSView/CMakeLists.txt       | 30 +++++++++++++++---------------
 DSView/pv/devicemanager.cpp |  5 +++++
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/DSView/CMakeLists.txt b/DSView/CMakeLists.txt
index c5703c6..eb8bbc0 100644
--- a/DSView/CMakeLists.txt
+++ b/DSView/CMakeLists.txt
@@ -352,21 +352,21 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "/usr/local/lib")
 
 # Install the executable.
 install(TARGETS ${PROJECT_NAME} DESTINATION bin/)
-install(FILES res/DSLogic.fw DESTINATION bin/res/)
-install(FILES res/DSLogic33.bin DESTINATION bin/res/)
-install(FILES res/DSLogic50.bin DESTINATION bin/res/)
-install(FILES res/DSLogicPro.fw DESTINATION bin/res/)
-install(FILES res/DSLogicPro.bin DESTINATION bin/res/)
-install(FILES res/DSCope.fw DESTINATION bin/res/)
-install(FILES res/DSCope.bin DESTINATION bin/res/)
-install(FILES res/DSLogic0.dsc DESTINATION bin/res/)
-install(FILES res/DSLogic0.def.dsc DESTINATION bin/res/)
-install(FILES res/DSLogic1.dsc DESTINATION bin/res/)
-install(FILES res/DSLogic1.def.dsc DESTINATION bin/res/)
-install(FILES res/DSLogic2.dsc DESTINATION bin/res/)
-install(FILES res/DSLogic2.def.dsc DESTINATION bin/res/)
-install(FILES res/DSCope1.dsc DESTINATION bin/res/)
-install(FILES res/DSCope1.def.dsc DESTINATION bin/res/)
+install(FILES res/DSLogic.fw DESTINATION share/dsview/)
+install(FILES res/DSLogic33.bin DESTINATION share/dsview/)
+install(FILES res/DSLogic50.bin DESTINATION share/dsview/)
+install(FILES res/DSLogicPro.fw DESTINATION share/dsview/)
+install(FILES res/DSLogicPro.bin DESTINATION share/dsview/)
+install(FILES res/DSCope.fw DESTINATION share/dsview/)
+install(FILES res/DSCope.bin DESTINATION share/dsview/)
+install(FILES res/DSLogic0.dsc DESTINATION share/dsview/)
+install(FILES res/DSLogic0.def.dsc DESTINATION share/dsview/)
+install(FILES res/DSLogic1.dsc DESTINATION share/dsview/)
+install(FILES res/DSLogic1.def.dsc DESTINATION share/dsview/)
+install(FILES res/DSLogic2.dsc DESTINATION share/dsview/)
+install(FILES res/DSLogic2.def.dsc DESTINATION share/dsview/)
+install(FILES res/DSCope1.dsc DESTINATION share/dsview/)
+install(FILES res/DSCope1.def.dsc DESTINATION share/dsview/)
 
 #===============================================================================
 #= Packaging (handled by CPack)
diff --git a/DSView/pv/devicemanager.cpp b/DSView/pv/devicemanager.cpp
index 066af64..d6406d9 100644
--- a/DSView/pv/devicemanager.cpp
+++ b/DSView/pv/devicemanager.cpp
@@ -103,12 +103,17 @@ std::list<boost::shared_ptr<device::DevInst> > DeviceManager::driver_scan(
 
     // Check If DSL hardware driver
     if (strncmp(driver->name, "virtual", 7)) {
+	/*
         QDir dir(QCoreApplication::applicationDirPath());
         if (!dir.cd("res"))
             return driver_devices;
         QString str = dir.absolutePath() + "/";
         QString str_utf8 = QString::fromLocal8Bit(str.toLocal8Bit());
         strcpy(config_path, str_utf8.toUtf8().data());
+	*/
+	// dirty
+	// maybe use  QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
+	strcpy(config_path, "/usr/share/dsview/");
     }
 
 	// Do the scan
-- 
2.6.4