diff --git a/core_info.c b/core_info.c index dd8559ae0d..7741759f3e 100644 --- a/core_info.c +++ b/core_info.c @@ -174,6 +174,12 @@ core_info_list_t *core_info_list_new(const char *modules_path) core_info[i].permissions_list = string_split(core_info[i].permissions, "|"); + if (config_get_string(core_info[i].data, "license", + &core_info[i].licenses) && + core_info[i].licenses) + core_info[i].licenses_list = + string_split(core_info[i].licenses, "|"); + if (config_get_string(core_info[i].data, "notes", &core_info[i].notes) && core_info[i].notes) @@ -213,12 +219,14 @@ void core_info_list_free(core_info_list_t *core_info_list) free(info->supported_extensions); free(info->authors); free(info->permissions); + free(info->licenses); free(info->notes); if (info->supported_extensions_list) string_list_free(info->supported_extensions_list); string_list_free(info->authors_list); string_list_free(info->note_list); string_list_free(info->permissions_list); + string_list_free(info->licenses_list); config_file_free(info->data); for (j = 0; j < info->firmware_count; j++) diff --git a/core_info.h b/core_info.h index a0d8472567..3a330ff8d3 100644 --- a/core_info.h +++ b/core_info.h @@ -45,11 +45,13 @@ typedef struct char *supported_extensions; char *authors; char *permissions; + char *licenses; char *notes; struct string_list *note_list; struct string_list *supported_extensions_list; struct string_list *authors_list; struct string_list *permissions_list; + struct string_list *licenses_list; core_info_firmware_t *firmware; size_t firmware_count; diff --git a/frontend/menu/menu_entries.c b/frontend/menu/menu_entries.c index 6939ea2516..063539397f 100644 --- a/frontend/menu/menu_entries.c +++ b/frontend/menu/menu_entries.c @@ -284,6 +284,15 @@ int menu_entries_push_list(menu_handle_t *menu, MENU_SETTINGS_CORE_INFO_NONE, 0); } + if (info->licenses_list) + { + strlcpy(tmp, "License(s): ", sizeof(tmp)); + string_list_join_concat(tmp, sizeof(tmp), + info->licenses_list, ", "); + file_list_push(list, tmp, "", + MENU_SETTINGS_CORE_INFO_NONE, 0); + } + if (info->supported_extensions_list) { strlcpy(tmp, "Supported extensions: ", sizeof(tmp));