Find engine shared library file properly 78/46578/1 accepted/tizen/mobile/20150822.064721 accepted/tizen/tv/20150822.065320 accepted/tizen/wearable/20150822.065834 submit/tizen/20150822.041009
authorSemun Lee <sm79.lee@samsung.com>
Sat, 22 Aug 2015 04:07:27 +0000 (13:07 +0900)
committerSemun Lee <sm79.lee@samsung.com>
Sat, 22 Aug 2015 04:07:27 +0000 (13:07 +0900)
In the engine so file may not be in /usr/lib.
Let the ld find the so file with LD_LIBRARY_PATH

Change-Id: I1090cd96f26306c8b4b6e04e2a6fcd054b901c12
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
src/engine.c [changed mode: 0755->0644]
src/module.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 3dcdb11..42e141b
@@ -55,8 +55,6 @@ struct ug_engine *ug_engine_load()
 {
        void *handle;
        struct ug_engine *engine;
-       char engine_file[PATH_MAX];
-       enum ug_engine_type type = UG_ENGINE_EFL;
        int (*engine_init)(struct ug_engine_ops *ops);
 
        engine = calloc(1, sizeof(struct ug_engine));
@@ -66,18 +64,7 @@ struct ug_engine *ug_engine_load()
                return NULL;
        }
 
-       if (type == UG_ENGINE_EFL) { /* UG_ENGINE_EFL is default*/
-               if (snprintf(engine_file, PATH_MAX, "/usr/lib/libui-gadget-1-efl-engine.so") < 0){
-                       goto engine_free;
-               }
-               else if (file_exist(engine_file) < 0) {
-                       goto engine_free;
-               }
-       }
-       else
-               goto engine_free;
-
-       handle = dlopen(engine_file, RTLD_LAZY);
+       handle = dlopen("libui-gadget-1-efl-engine.so", RTLD_LAZY);
        if (!handle) {
                _ERR("dlopen failed: %s", dlerror());
                goto engine_free;
old mode 100755 (executable)
new mode 100644 (file)