1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Script: Refine depends tools. v5.0.124

1. Never auto install tools now, user should do it.
2. Support --help and --version for SRS.
3. Install tools for cygwin64.
This commit is contained in:
winlin 2023-01-01 13:17:48 +08:00
parent 72f8ed4916
commit e690c93bcf
6 changed files with 59 additions and 286 deletions

View file

@ -2111,7 +2111,7 @@ srs_error_t SrsConfig::parse_argv(int& i, char** argv)
case '?':
case 'h':
show_help = true;
break;
return err;
case 't':
show_help = false;
test_conf = true;
@ -2124,7 +2124,7 @@ srs_error_t SrsConfig::parse_argv(int& i, char** argv)
case 'V':
show_help = false;
show_version = true;
break;
return err;
case 'g':
case 'G':
show_help = false;
@ -2141,6 +2141,8 @@ srs_error_t SrsConfig::parse_argv(int& i, char** argv)
continue;
}
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "-c requires params");
case '-':
continue;
default:
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "invalid option: \"%c\", read help: %s -h",
*(p - 1), argv[0]);
@ -2156,8 +2158,8 @@ void SrsConfig::print_help(char** argv)
"%s, %s, %s, created by %sand %s\n\n"
"Usage: %s <-h?vVgGe>|<[-t] -c filename>\n"
"Options:\n"
" -?, -h : Show this help and exit 0.\n"
" -v, -V : Show version and exit 0.\n"
" -?, -h, --help : Show this help and exit 0.\n"
" -v, -V, --version : Show version and exit 0.\n"
" -g, -G : Show server signature and exit 0.\n"
" -e : Use environment variable only, ignore config file.\n"
" -t : Test configuration file, exit with error code(0 for success).\n"

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 123
#define VERSION_REVISION 124
#endif