diff --git a/tdelfeditor/tdelfeditor.cpp b/tdelfeditor/tdelfeditor.cpp index 14de9d973..0b4cdae30 100644 --- a/tdelfeditor/tdelfeditor.cpp +++ b/tdelfeditor/tdelfeditor.cpp @@ -62,6 +62,17 @@ typedef enum { PARAM_ICON_SIZE = 3, PARAM_RESOURCE_FILE = 4, PARAM_ICON_FILE = 4, + + PARAM_EXECUTABLE_NAME = 3, + PARAM_DESCRIPTION = 4, + PARAM_LICENSE = 5, + PARAM_COPYRIGHT = 6, + PARAM_AUTHORS = 7, + PARAM_PRODUCT = 8, + PARAM_ORGANIZATION = 9, + PARAM_VERSION = 10, + PARAM_DATETIME = 11, + PARAM_NOTES = 12, } eParams; typedef struct { @@ -71,13 +82,14 @@ typedef struct { } IconOptions; IconOptions elficon_options = { - "acefgrstv", + "acefgmrstv", { {"add-icon", 0, 0, 'a'}, {"clear-icons", 0, 0, 'c'}, {"set-empty-uuid", 0, 0, 'e'}, {"find-icon", 0, 0, 'f'}, {"get-uuid", 0, 0, 'g'}, + {"write-metadata", 0, 0, 'm'}, {"retrieve-icon", 0, 0, 'r'}, {"set-uuid", 0, 0, 's'}, {"tde-autoadd-icon", 0, 0, 't'}, @@ -90,6 +102,7 @@ IconOptions elficon_options = { N_("set an empty icon UUID for the ELF file"), N_("find an ELF icon in the file by closest size"), N_("get the icon UUID for the file"), + N_("write metadata information to the ELF file"), N_("retrieve an icon from the ELF file"), N_("set the icon UUID for the ELF file"), N_("automatically add the appropriate TDE icon to the ELF file"), @@ -135,6 +148,7 @@ typedef enum { MODE_SET_EMPTY_UUID, MODE_GET_UUID, MODE_FIND_ICON, + MODE_SET_METADATA, MODE_LAUNCH_GUI } eMode; @@ -192,6 +206,10 @@ int handle_arguments(int argc, char **argv, eMode *mode) *mode = MODE_GET_UUID; required_params = 3; break; + case 'm': + *mode = MODE_SET_METADATA; + required_params = 13; + break; case 'r': *mode = MODE_RETRIEVE_ICON; required_params = 5; @@ -220,6 +238,8 @@ print_icon_usage: fprintf(stderr, _("usage: %s [-t] elf-file-name icon-name\n"), argv[PARAM_PROGNAME]); fprintf(stderr, _("usage: %s [-c|-e|-g] elf-file-name\n"), argv[PARAM_PROGNAME]); fprintf(stderr, _("usage: %s [-s] elf-file-name uuid\n"), argv[PARAM_PROGNAME]); + fprintf(stderr, _("usage: %s [-s] elf-file-name uuid\n"), argv[PARAM_PROGNAME]); + fprintf(stderr, _("usage: %s [-m] elf-file-name \"executable name\" \"description\" \"license\" \"copyright\" \"authors\" \"product\" \"organization\" \"version\" \"datetime\" \"notes\"\n"), argv[PARAM_PROGNAME]); fprintf(stderr, _("If -t is set the TDEDIRS environment variable must include your TDE installation prefix\n")); fprintf(stderr, _("for example: TDEDIRS=/opt/trinity ./tdelfeditor -t ./konqueror konqueror\n")); for(i=0;i