summaryrefslogtreecommitdiffstats
path: root/src/config.cpp
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2017-10-24 14:09:38 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-01 11:04:49 +0000
commit11a7e61c482d46b63da1b90ea4f341460f71b48b (patch)
tree496436b8eaca885e98527bf0041aba6e3b7addee /src/config.cpp
parent08b73681b0ea6206fc6dc96575ac3e8d6006bc70 (diff)
Layer configuration file is included in widget
Layer configuration file (layers.json) is placed in target when installation of windowmanager. Bug-AGL: SPEC-991 Change-Id: Ia614ec400c185ec7db4379c66321363a68e5e0da Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp
index d5a549a..53e014d 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -15,12 +15,20 @@
*/
#include "config.hpp"
+#include "hmi-debug.h"
namespace wm {
config::config() : cfg() {
// Supply default values for these...
- this->cfg["layers.json"] = getenv("LAYERS_JSON") ?: "/etc/windowmanager/layers.json";
+ char const *path_layers_json = getenv("AFM_APP_INSTALL_DIR");
+
+ if (!path_layers_json) {
+ HMI_ERROR("wm", "AFM_APP_INSTALL_DIR is not defined");
+ }
+ else {
+ this->cfg["layers.json"] = std::string(path_layers_json) + std::string("/etc/layers.json");
+ }
}
} // namespace wm