Good. Just one thing, please follow the template.
@feature not in title but in the body, and Fixes T1027 instead of what you've written there. https://phab.enlightenment.org/w/git_practices/ :) Makes things easier. Especially for scripts, but also for humans. -- Tom. On 03/03/14 11:41, Cedric BAIL wrote: > cedric pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=92a24dea79bc2ffe215bbc8f3d2ad467bb7e6f62 > > commit 92a24dea79bc2ffe215bbc8f3d2ad467bb7e6f62 > Author: Cedric Bail <[email protected]> > Date: Mon Mar 3 08:39:53 2014 -0300 > > edje: @feature to include license in edje file. > > This will close T1027. > --- > src/bin/edje/edje_cc.c | 8 +++++++ > src/bin/edje/edje_cc.h | 1 + > src/bin/edje/edje_cc_out.c | 53 > +++++++++++++++++++++++++++++++++++++++++++--- > 3 files changed, 59 insertions(+), 3 deletions(-) > > diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c > index d714355..5c62fb6 100644 > --- a/src/bin/edje/edje_cc.c > +++ b/src/bin/edje/edje_cc.c > @@ -21,6 +21,7 @@ char *file_in = NULL; > char *tmp_dir = NULL; > char *file_out = NULL; > char *watchfile = NULL; > +char *license = NULL; > > static const char *progname = NULL; > > @@ -90,6 +91,7 @@ main_help(void) > "-sd sound/directory Add a directory to look in for relative > path sounds samples\n" > "-dd data/directory Add a directory to look in for relative > path data.file entries\n" > "-td temp/directory Directory to store temporary files\n" > + "-l license Specify the license of a theme\n" > "-v Verbose output\n" > "-no-lossy Do NOT allow images to be lossy\n" > "-no-comp Do NOT allow images to be stored with > lossless compression\n" > @@ -194,6 +196,12 @@ main(int argc, char **argv) > if (!tmp_dir) > tmp_dir = argv[i]; > } > + else if ((!strcmp(argv[i], "-l") || !strcmp(argv[i], "--license")) > && (i < (argc - 1))) > + { > + i++; > + if (!license) > + license = argv[i]; > + } > else if ((!strcmp(argv[i], "-min-quality")) && (i < (argc - 1))) > { > i++; > diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h > index 3d9973d..10d2a4b 100644 > --- a/src/bin/edje/edje_cc.h > +++ b/src/bin/edje/edje_cc.h > @@ -227,6 +227,7 @@ extern char *file_in; > extern char *tmp_dir; > extern char *file_out; > extern char *watchfile; > +extern char *license; > extern int no_lossy; > extern int no_comp; > extern int no_raw; > diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c > index e30b596..e269ecc 100644 > --- a/src/bin/edje/edje_cc_out.c > +++ b/src/bin/edje/edje_cc_out.c > @@ -1345,16 +1345,13 @@ data_scripts_exe_del_cb(void *data EINA_UNUSED, int > evtype EINA_UNUSED, void *ev > } > if (threads) > { > - pending_threads++; > ecore_thread_run(data_thread_script, data_thread_script_end, NULL, > sc); > } > else > { > - pending_threads++; > data_thread_script(sc, NULL); > data_thread_script_end(sc, NULL); > } > - pending_threads--; > if (pending_threads <= 0) ecore_main_loop_quit(); > return ECORE_CALLBACK_CANCEL; > } > @@ -1644,6 +1641,45 @@ data_thread_source_end(void *data EINA_UNUSED, > Ecore_Thread *thread EINA_UNUSED) > } > > static void > +data_thread_license(void *data, Ecore_Thread *thread EINA_UNUSED) > +{ > + Eet_File *ef = data; > + Eina_File *f; > + void *m; > + int bytes; > + > + f = eina_file_open(license, 0); > + if (!f) return ; > + > + m = eina_file_map_all(f, EINA_FILE_WILLNEED); > + if (!m) goto on_error; > + > + bytes = eet_write(ef, "edje/license", m, eina_file_size_get(f), > compress_mode); > + if ((bytes <= 0) || eina_file_map_faulted(f, m)) > + { > + ERR("Unable to write license part \"%s\".", license); > + } > + else > + { > + INF("Wrote %9i bytes (%4iKb) for \"%s\" license entry compress: > [real: %2.1f%%]", > + bytes, (bytes + 512) / 1024, license, > + 100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f)))); > + } > + > + eina_file_map_free(f, m); > + > + on_error: > + eina_file_close(f); > +} > + > +static void > +data_thread_license_end(void *data EINA_UNUSED, Ecore_Thread *thread > EINA_UNUSED) > +{ > + pending_threads--; > + if (pending_threads <= 0) ecore_main_loop_quit(); > +} > + > +static void > data_thread_fontmap(void *data, Ecore_Thread *thread EINA_UNUSED) > { > Eet_File *ef = data; > @@ -1721,6 +1757,17 @@ data_write(void) > INF("fonts: %3.5f", ecore_time_get() - t); t = ecore_time_get(); > data_write_sounds(ef, &sound_num); > INF("sounds: %3.5f", ecore_time_get() - t); t = ecore_time_get(); > + if (license) > + { > + pending_threads++; > + if (threads) > + ecore_thread_run(data_thread_license, data_thread_license_end, > NULL, ef); > + else > + { > + data_thread_license(ef, NULL); > + data_thread_license_end(ef, NULL); > + } > + } > pending_threads--; > if (pending_threads > 0) ecore_main_loop_begin(); > INF("THREADS: %3.5f", ecore_time_get() - t); > ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
