Command arguments: add recognize output file.
If command arguments contain path to file with ".edj" extension, this file will be used for store output binary file. Example: enventor --id /path/img --fd /path/fnt input.edc output.edj
This commit is contained in:
parent
a247010813
commit
59ec635813
|
@ -266,9 +266,9 @@ config_edc_path_set(const char *edc_path)
|
|||
}
|
||||
|
||||
void
|
||||
config_init(const char *edc_path, Eina_List *edc_img_path,
|
||||
Eina_List *edc_snd_path, Eina_List *edc_fnt_path,
|
||||
Eina_List *edc_dat_path)
|
||||
config_init(const char *edc_path, const char *edj_path,
|
||||
Eina_List *edc_img_path, Eina_List *edc_snd_path,
|
||||
Eina_List *edc_fnt_path, Eina_List *edc_dat_path)
|
||||
{
|
||||
Eina_Stringshare *s;
|
||||
eddc_init();
|
||||
|
@ -277,6 +277,8 @@ config_init(const char *edc_path, Eina_List *edc_img_path,
|
|||
g_cd = cd;
|
||||
|
||||
if (edc_path[0]) config_edc_path_set(edc_path);
|
||||
if (edj_path[0])
|
||||
eina_stringshare_replace(&cd->edj_path, edj_path);
|
||||
|
||||
if (edc_img_path)
|
||||
g_cd->edc_img_path_list = edc_img_path;
|
||||
|
|
|
@ -285,8 +285,9 @@ tools_set(Evas_Object *enventor)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
args_dispatch(int argc, char **argv, char *edc_path, Eina_List **img_path,
|
||||
Eina_List **snd_path, Eina_List **fnt_path, Eina_List **dat_path,
|
||||
args_dispatch(int argc, char **argv, char *edc_path, char *edj_path,
|
||||
Eina_List **img_path, Eina_List **snd_path,
|
||||
Eina_List **fnt_path, Eina_List **dat_path,
|
||||
Eina_Bool *template_new)
|
||||
{
|
||||
|
||||
|
@ -342,10 +343,18 @@ args_dispatch(int argc, char **argv, char *edc_path, Eina_List **img_path,
|
|||
};
|
||||
|
||||
//edc path
|
||||
if ((argc >= 2) && strstr(argv[1], ".edc"))
|
||||
int i = 0;
|
||||
for (; i < argc; i++)
|
||||
{
|
||||
sprintf(edc_path, "%s", argv[1]);
|
||||
default_edc = EINA_FALSE;
|
||||
if (strstr(argv[i], ".edc"))
|
||||
{
|
||||
sprintf(edc_path, "%s", argv[i]);
|
||||
default_edc = EINA_FALSE;
|
||||
}
|
||||
else if (strstr(argv[i], ".edj"))
|
||||
{
|
||||
sprintf(edj_path, "%s", argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if ((ecore_getopt_parse(&optdesc, values, argc, argv) < 0) || quit)
|
||||
|
@ -402,16 +411,17 @@ static Eina_Bool
|
|||
config_data_set(app_data *ad, int argc, char **argv)
|
||||
{
|
||||
char edc_path[PATH_MAX] = { 0, };
|
||||
char edj_path[PATH_MAX] = { 0, };
|
||||
Eina_List *img_path = NULL;
|
||||
Eina_List *snd_path = NULL;
|
||||
Eina_List *fnt_path = NULL;
|
||||
Eina_List *dat_path = NULL;
|
||||
Eina_Bool template_new = EINA_FALSE;
|
||||
|
||||
Eina_Bool default_edc = args_dispatch(argc, argv, edc_path, &img_path,
|
||||
&snd_path, &fnt_path, &dat_path,
|
||||
&template_new);
|
||||
config_init(edc_path, img_path, snd_path, fnt_path, dat_path);
|
||||
Eina_Bool default_edc = args_dispatch(argc, argv, edc_path, edj_path,
|
||||
&img_path, &snd_path, &fnt_path,
|
||||
&dat_path, &template_new);
|
||||
config_init(edc_path, edj_path, img_path, snd_path, fnt_path, dat_path);
|
||||
config_update_cb_set(config_update_cb, ad);
|
||||
ad->template_new = template_new;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define MAX_VIEW_SCALE 5.0
|
||||
#define MIN_VIEW_SCALE 0.5
|
||||
|
||||
void config_init(const char *edc_path, Eina_List *edc_img_path, Eina_List *edc_snd_path, Eina_List *edc_fnt_path, Eina_List *edc_dat_path);
|
||||
void config_init(const char *edc_path, const char *edj_path, Eina_List *edc_img_path, Eina_List *edc_snd_path, Eina_List *edc_fnt_path, Eina_List *edc_dat_path);
|
||||
void config_term(void);
|
||||
const char *config_edc_path_get(void);
|
||||
const char *config_edj_path_get(void);
|
||||
|
|
Loading…
Reference in New Issue