Languages

Menu
Sites
Language
How to add custom edc file in shared library object.

Hi,

I am trying to create an open source lbrary for tizen. I need to create a custom layout for a layout that i am using.

Does anyone know how to share the edje file to the apps that would be using my .so file and how can i access that edje file from my library once included in the app.

Edited by: Anand Rudrakshi on 04 Nov, 2015

Responses

8 Replies
colin Rao

Hi,

Did you try it? I think you can create and edit the edc source file in the shared lib project, but can't access it in the including project. 

It's nice if you can share your sample app here, that's we can go on for more research on it. :)

Jean Yang

There is a topic talk about how to create a shared libray contains edj file.

https://developer.tizen.org/forums/native-application-development/i-would-like-create-shared-library

But it seems your mainly problem is how to acess the edj file already in the shared library. The key problem is how the project using the .so file knows where the edj file is put inside the library and take it as edj resource. Maybe need Samsung guys to answer it, because only they knows where the edj files put and if there is a standard path in the .so file Tizen program will defaultly access them when searching edj resource.

Jean Yang

If Tizen Program will not access some default path inside a .so file. Then Tizen platform should provide the APIs to load edj resource from the shared library file, something like load resource from DLL file.

Jeongsu Kim

I think you'd better add an api to get filepath of your edj file.

 

files in your package

yourlibrary.h
libyourlibrary.so
yourlibrary.edj

 

apis in your library

your_library_api();
your_library_api2();
your_library_set_edj_filepath(const char* filepath);  // <-- add this api
 

So distribute your edj file too and make developer place it and set it by api.

Anand Rudrakshi

@Jeongsu Kim

I have some query regarding your solution.

1) Can one app access .edje file which were built by other application? I am not sure about this.

2) How will it copy the edje file in its directory. While packaging the app?

3) An alternate way would be to ask the app using my .so file to add the .edje file in its shared data folder and i can always get the shared data folder path through the api "app_get_shared_data_path()"

Jeongsu Kim

1) edj file is a just file. any app can access it if it has proper permission.
2) app developer who use your library should place the edje file to res/edje directory
3) shared/data is created when app is installed. it's better to use "shared/res" directory instead of "shared/data"
 in this case, app developer should place the edje file to specific shared/res directory.
 I think this idea is good too.

Jeongsu Kim

I want to fix 2) above.

2) app developer can place it anyware. it shouldn't be placed in res/edje directory.
 directories under res/, shared/res and some other directories(I don't remember others anyway) are packed into TPK file.
 

Carsten Haitzler

from the ui toolkit's point of view, the edj file can be anywhere on the filesystem. the issue is finding it. one way might be to do dlinfo() on a symbol in the .so and use the path from that to find the library where the .so is - and place the edj in the same dir. :) there is a whole complex eina_prefix() api that can handle relocation of binaries and share dlibraries as long as the libsor binaries follow a fairly common linux fhs standard. the problem is this may not work well with the tizen app dir tree which doesn't follow fhs layout. i have never tried.