Edje Compiler
The Edje Compiler is in charge of creating your Edje interface files, by compiling your EDC code, and compressing it alongside the images and fonts into a single ready-to-use file.
The compiler will normally be included inside your distribution's edje package under the edje_cc (compiler) name alongside the decompiler, named edje_decc.
Using the Compiler
Example file structure
Usually you will want different folders for images and code snippets, since complex interfaces often use a big number of images and small files.
theme/ theme/main.edc theme/images theme/images/button.png theme/edcs theme/edcs/button.edc theme/fonts theme/fonts/Vera.ttf
Example command
Assuming we want to compile the main.edc and that we located inside "theme" on the example file structure, the command would look like this:
edje_cc -id images -fd fonts main.edc theme.edj
Which in generic terms minds:
edje_cc [OPTIONS] input_file.edc [output_file.edj]
This will create a file named theme.edj inside the "theme" folder, all you have to do now is load it into your program?.
Compiler Options
We can also use the compiler to override some of the settings in our [Edje Data Collection | EDC]] file.
edje_cc -h
| -id directory | Add a directory to look in for relative path images |
| -fd directory | Add a directory to look in for relative path fonts |
| -no-lossy | Do NOT allow images to be lossy |
| -no-comp | Do NOT allow images to be stored with lossless compression |
| -no-raw | Do NOT allow images to be stored with zero compression (raw) |
| -min-quality VAL | Do NOT allow lossy images with quality < VAL (0-100) |
| -max-quality VAL | Do NOT allow lossy images with quality > VAL (0-100) |
| -Ddefine_val=to | CPP style define to define input macro definitions to the .edc source |
De-compilation
One of the greatest sources of knowledge will be other's people source code, to access it, you will need to decompile the Edje binary file:
edje_decc theme.edj
Unless a exception is triggered, this will generate the original theme's file structure with sources, images and fonts, alongside a "build.sh" file (which you should control before running) with the correct build command.
