55 const char *version,
const char *license,
56 enum modpack_type
type,
const char *subtype,
63 if (modpack_type_is_valid(
type)) {
64 type_str =
_(modpack_type_name(
type));
70 if (license != NULL) {
74 lic_str =
Q_(
"?license:Unknown");
78 if (inst_str == NULL) {
79 inst_str =
_(
"Not installed");
86 log_normal(
_(
"Type=\"%s\" / \"%s\""), type_str, subtype);
97int main(
int argc,
char *argv[])
106 if (ui_options != -1) {
109 for (i = 1; i <= ui_options; i++) {
112 _(
"This modpack installer does not support any specific options\n\n"));
115 fc_fprintf(stderr,
_(
"Report bugs at %s\n"), BUG_URL);
119 log_error(
_(
"Unknown option '--' '%s'"), argv[i]);
125 if (ui_options != -1) {
130 log_normal(
_(
"Freeciv modpack installer (command line version)"));
135 if (rev_ver != NULL) {
148 if (errmsg == NULL) {
151 log_error(
_(
"Modpack install failed: %s"), errmsg);
const char * download_modpack(const char *URL, const struct fcmp_params *fcmp, dl_msg_callback mcb, dl_pb_callback pbcb)
const char * download_modpack_list(const struct fcmp_params *fcmp, modpack_list_setup_cb cb, dl_msg_callback mcb)
bool is_option(const char *option_name, char *option)
void cmdline_option_values_free(void)
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
#define log_normal(message,...)
#define log_error(message,...)
void load_install_info_lists(struct fcmp_params *fcmp)
int main(int argc, char *argv[])
static void setup_modpack_list(const char *name, const char *URL, const char *version, const char *license, enum modpack_type type, const char *subtype, const char *notes)
static void msg_callback(const char *msg)
int fcmp_parse_cmdline(int argc, char *argv[])
const char * mpdb_installed_version(const char *name, enum modpack_type type)
const char * fc_git_revision(void)
const char * word_version(void)