Commit Graph

136 Commits

Author SHA1 Message Date
Carsten Haitzler f2e1116667 edje_cc - warn - fix free cb to be of right prototype
wrap by correctly typed func.
2018-11-09 11:44:00 +00:00
Mike Blumenkrantz 12f92b4bfb edje_cc: change .mo file write location to be relative to the .edj file
previously this would attempt to write the .mo file to the same directory
that the .po file was found in, which is invalid in cases such as distcheck
where the source directory is not writable

@fix

Differential Revision: https://phab.enlightenment.org/D6636
2018-08-08 14:42:05 +02:00
Mike Blumenkrantz 65b3eb27c2 Revert "edje_cc: temporarily disable aborting compile when namespace validation fails"
Summary:
This reverts commit 0dc492087e.

there are no longer any errors here so this should fail the build any time errors
are introduced

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6525
2018-07-06 11:09:51 -04:00
Mike Blumenkrantz 786210db6f edje_cc: add 'skip_namespace_validation' keyword
this pairs with the newly-added -N option to denote groups in edc files
which should not be checked for correct namespacing

the option is useful for cases such as music_control.edc,
where a group has been shipping for years with API signals like
"btn,clicked" which cannot be changed since they are used in an external
application and compatibility must be maintained

the documentation for this option explicitly states that it must only be used
inside an #ifdef SKIP_NAMESPACE_VALIDATION block, allowing this keyword to
be easily removed at a later point

ref T7072

@feature

Differential Revision: https://phab.enlightenment.org/D6388
2018-07-05 22:59:18 +02:00
Hermet Park 2663dceaf1 Revert "edje: code refactoring for readibility."
This reverts commit 7fb47fc064.

subsequential revert for previous one.

90a89d1ab2b5d23b29ad0f2680b77b5ba7f56b42.
2018-06-21 19:33:41 +09:00
Mike Blumenkrantz 0dc492087e edje_cc: temporarily disable aborting compile when namespace validation fails
Summary:
there are far too many issues here for me to fix them all, the authors of
these failures should be responsible for helping to clean this up

revert this patch once all issues are resolved

ref T6966
Depends on D6042

Reviewers: cedric, Hermet, stephenmhouston, devilhorns

Reviewed By: stephenmhouston

Subscribers: #committers

Tags: #efl

Maniphest Tasks: T6966

Differential Revision: https://phab.enlightenment.org/D6215
2018-06-15 12:27:19 -05:00
Mike Blumenkrantz 5e31eaf4a1 edje_cc: add option for verifying namespace usage
Summary:
when -N is passed, parts and program signals will be checked for
traditional namespacing based on the group name, causing compile failure
if inconsistency is detected

@feature

ref T6911

Reviewers: cedric, devilhorns

Reviewed By: cedric

Subscribers: #committers

Tags: #efl

Maniphest Tasks: T6911

Differential Revision: https://phab.enlightenment.org/D6036
2018-06-15 12:26:44 -05:00
Hermet Park 7fb47fc064 edje: code refactoring for readibility.
collection.part is too ambigious, since group has parts as well.
Normally we regard it as "name" (of group) instead of part.
2018-06-07 17:53:12 +09:00
Mike Blumenkrantz 334718a006 edje_cc: fixup edje_collections_lookup hash ids during collection pruning
Summary:
unused groups are pruned during this stage of edje_cc, and it becomes
necessary to update the values in this hash in order to maintain the
key:value pairing between the Edje_Part_Collection_Directory_Entry and
its corresponding Edje_Part_Collection so that lookups return consistent
results after pruning has completed

@fix

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: Hermet, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6041
2018-06-07 17:34:22 +09:00
Marcel Hollerbach 8c14de8541 edje_cc: do not keep the filedescriptor
we have a limited number of filedescriptors available, a theme can
consist out of a number of groups with scripts, keeping the fd for later
use is going above the maximum number of open files, thus use the path
of the file, not the fd to access the file.

fix  T6922

Differential Revision: https://phab.enlightenment.org/D6159
2018-05-14 17:26:28 +02:00
Mike Blumenkrantz 3d9dcbd478 edje: add ability to reference images from other edje files
this uses the just-added "id" property to allow referencing images
by name from that theme. example:

=FILE1=
id: "myfile";
images.image: "someimage.png" COMP;

=FILE2=
requires: "myfile";
images.image: "someimage.png" EXTERNAL "myfile";

FILE2 will now load someimage.png from FILE1 at runtime if FILE1 is
currently opened in edje, and FILE1 will be kept open until FILE2 is
closed

@feature
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz 30378f26fa edje: reformat bin/ c files
a lot of this was unreadable due to mixed tabs/spaces or just random
formatting
2018-02-28 16:02:37 -05:00
Mike Blumenkrantz 645c573efb edje: EDJE_IMAGE_SOURCE_TYPE_EXTERNAL -> EDJE_IMAGE_SOURCE_TYPE_USER
no functional changes, just a confusing define rename
2018-02-28 16:02:37 -05:00
Mike Blumenkrantz 1876151597 edje_cc: simplify thread tracking for exiting on signal 2018-01-26 14:21:02 -05:00
Mike Blumenkrantz 789c2892a3 edje_cc: make -thread option
this option was broken due to immediately triggering EMFILE errors
during thread initialization and then attempting to exit while threads
were still ongoing

some work is still needed to make this an improvement over the current
default of not using threads

@fix
2018-01-26 14:10:31 -05:00
Andy Williams d234458dfc Fix and simpligy windows behaviour.
Author: Vincent Torri
2017-12-31 16:08:31 +00:00
Jean-Philippe Andre ec1acca74d evas vg: Add FIXME and fix strbuf use
This is the result of a really quick review of the new VG code. Most of
it was moved around, but this merge includes the following:
 - Move logic from edje to evas
 - Create static lib for common VG handling
 - Add file_set() API
 - Add a basic VG cache in evas side
 - Add savers modules, implement loaders and savers.
2017-10-27 14:58:38 +09:00
subhransu mohanty d5c8822107 edje: use the file_set api from vg canvas to load and parse svg file. 2017-10-27 14:58:38 +09:00
Youngbok Shin 5a24f1404a edje_cc: fix a memory leak issue when edje_cc writes images
Summary:
If there is no given pathes for image files as parameter of edje_cc,
"img_dirs" will be NULL. Then, a local variable "load_err" is always
EVAS_LOAD_ERROR_NONE. Because of this, the "if" condition just after
EINA_LIST_FOREACH() will fail. It causes memory leak from "iw".
@fix

Test Plan: N/A

Reviewers: raster, cedric, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D5285

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 11:55:06 -07:00
Jean-Philippe Andre b433592b03 edje: Fix warning message
efl_version is a top-level value

@fix
2017-08-22 11:50:31 +09:00
Amitesh Singh 4b4564c857 edje_cc out: fix div by 0 correctly 2017-07-24 09:50:05 +09:00
Carsten Haitzler 83a249baa1 edje_cc out - fix theoretical div by 0
fixes CID 1371125
2017-07-23 19:48:16 +09:00
Carsten Haitzler d62f7d72e6 edje_cc out ... fix theoretical div by zero...
if files size was 0... which would basically make a lot fail before...
it could be a divide by zero. fix and just assume minimum size of 1.

fix CID 1371127
2017-07-23 19:46:17 +09:00
Carsten Haitzler a91d0b2ea4 edje_cc out ... check more iui list element ptrs to help coverity
fix CID 1374482 ... and others i hope.
2017-07-23 19:36:41 +09:00
Carsten Haitzler 4df92f88d0 edje_cc out - double check list element ptr to make coverity happy
fix CID 1374483
2017-07-23 19:33:58 +09:00
Youngbok Shin 0735f6aa61 edje: support legacy Textblock calculation logic for 1.18 edje file
Summary:
From EFL 1.19, Edje Textblock calculation logic was fixed according to
Edje documents. But, it broke old edje files which ignored text.min
option for minimum width. Even if the old edje files were wrong,
we need to support them as discussed from T5548.

Also, this patch will change default efl_version to 1.18 from 1.19.
So, without efl_version property, edje file will run on the legacy logic.

Fixes T5548

Test Plan: Turn on/off presentation mode in Enlightenment.

Reviewers: herdsman, cedric, jpeg, zmike, raster

Subscribers: stefan_schmidt

Maniphest Tasks: T5548

Differential Revision: https://phab.enlightenment.org/D4967

Adjusted by @jpeg
2017-07-04 14:13:13 +09:00
Jean Guyomarc'h 9ba17f6902 edje: better error message when a po file does not exist 2017-03-09 23:16:16 +01:00
Carsten Haitzler 5b4c032fb5 edje_cc - fix potential divide by 0 in info output if file size is 0
this will realistically never happen in a sane case... but its
theoretically possible. fixes CID 1366923
2017-02-08 21:19:39 +09:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Vyacheslav Reutskiy c3733a213b edje_cc: remove 'inherit_only' groups from result edj file
The 'inherit_only' groups are helpers and no sense to save it to edj
file.

@fix
2017-02-01 15:02:46 +02:00
Mykyta Biliavskyi 66af7d1928 edje_cc: delete unused image sets from edj file.
Delete Edje_Image_Directory_Set instance from edj file in case if image
set isn't used inside any part. This commit apply behaviour from unused
images to the unused image sets.

@fix T5109
2017-01-19 09:54:53 +02:00
Mykyta Biliavskyi 5fb595e714 Edje_cc: update images.set.image names when write edj file.
There are few image formats that converted into *.png on data writing
stage (*.svg, *.tgv). After converting image, this image entry name
changes by <name>.<vector format ext>.png. This make possible save
vector images into edj file.
Because images set could contain vector images too - after save on
disk set image entry name wasn't updated. And still have original name:
<name>.<vector format ext>. This commit update image set entries
name accordingly to the global pool of images.

@fix
2016-12-29 16:14:23 +02:00
Carsten Haitzler 4b18b472ba edje_cc - fix warning about freeing a const char ptr
yes - the type is const char * for edje runtime (the library) but in
edje_cc we strdup these strings and yes - assign them to a const char *
thus the warning and the need to cast. it's specific co edje_cc only
and so this is correct.
2016-12-28 19:01:38 +09:00
Vyacheslav Reutskiy f12a08ab15 edje_cc: add svg file name '.png' if it use as image
This path add notify for user in case when svg use in image section. It
need for clear understanding why vertor image scale like bitmap. And
add to file name new extension '.png'
2016-12-22 18:16:48 +02:00
Vyacheslav Reutskiy 715a66ed11 edje_cc: calculate and save the parts count in "edje/file" 2016-12-22 18:00:17 +02:00
Carsten Haitzler 14aca77bfc fix edje_cc segv when compiling bling bling theme
accessed parts out of range for the part table. check part count first
before checking. fixes segv. @fix

blinblng: http://enform.haxlab.org/files/blingbling_e21.tgz
2016-10-15 11:28:01 +09:00
Youngbok Shin ceb63bb202 edje_cc: don't warn when image attributes are missing in inherit_only group
Summary:
The inherit_only groups could be used for template of other groups.
So, even if it has image part, it dose not need to have image attributes.
@fix

Test Plan: N/A

Reviewers: cedric, conr2d, jpeg, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D4322
2016-09-28 16:02:12 +09:00
Carsten Haitzler f4606d54eb Revert "edje edje_cc_out: use strncpy()."
This reverts commit 6de3b2c5d3.

just dismiss in coverity if the code is not actually wrong
2016-09-22 08:30:37 +09:00
Hermet Park 6de3b2c5d3 edje edje_cc_out: use strncpy().
This change is not much meaningful but avoids an annoying coverity detection.
2016-09-21 15:19:19 +09:00
Jee-Yong Um 1d2be3fc4c edje_cc: add lookup for inherited after program
Summary:
"after" program inherited from inherit_only group does not have original
program lookup, but _edje_program_copy() doesn't consider this case.
When it fails to copy program lookup, new program lookup should be appeded.

@fix

Test Plan: make attached program and run

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4253
2016-09-01 20:08:56 +09:00
Carsten Haitzler b1d9cf8d8d edje cc mo encoding leak - ensure data is freed when setting up encoding
this should fix CID 1306604
2016-07-08 18:53:11 +09:00
Subhransu Mohanty 9be9da17bf edje/svg: added _edje_svg_node_free() function
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4143
2016-07-07 16:29:21 +09:00
Shuhrat Dehkanov 9c69afd535 Fix 'maybe used uninitialized' warning
Summary:
    bin/edje/edje_cc_out.c: In function ‘data_write_images’:
    bin/edje/edje_cc_out.c:1164:7: warning: ‘f’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        if (!f) return EINA_FALSE;
           ^
    bin/edje/edje_cc_out.c:1154:15: note: ‘f’ was declared here
        Eina_File *f;
                   ^

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D4101
2016-06-27 16:19:43 +09:00
Subhransu Mohanty de7809a868 edje/svg: add few error message reagrding parsing and storing of svg file.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4077

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:12:23 -07:00
Subhransu Mohanty 5eca781a3b edje_cc_out : fix possible buffer overrun
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4044
2016-06-16 15:28:08 +09:00
Cedric BAIL ba0aac6909 edje: make svg support a beta feature of edje_cc.
Should we do the same with Canvas3D part ?
2016-06-13 10:58:34 -07:00
Carsten Haitzler 3f426ca519 edje cc - remove debug printf i missed. :(
oops. i removed the others but not this one. yes i did git diff etc.
2016-06-13 15:22:11 +09:00
Carsten Haitzler 2845f5eff0 edje_cc - limit embryo_cc instances in bg to something sensible
so compiling current efl theme seems to spawn 178 instances of
embryo_cc in the background (then collect results). this is a bit
excessive and may be a source of issues. this may be causing T3874
perhaps due to embryo_cc's not launching (fork failing or something
else) and we don't check if fork fails. so try limit to 8 embryo_cc's
in the bg which is more reasonable than the currently "unlimited"
which leads to 178 currently...

i hope this fixes T3874

@fix
2016-06-13 14:18:03 +09:00
Subhransu Mohanty 62c0a4ef08 edje: add new svg part to edc
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, cedric, Hermet

Differential Revision: https://phab.enlightenment.org/D3894

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 11:35:33 -07:00
Tom Hacohen 6dcc2e6cc4 Edje cc out: Make list removal slightly more efficient. 2016-05-20 16:24:06 +01:00