winecfg: Add /? parameter to print help and valid versions.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41559
Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Owen Rudge 2020-04-16 15:06:47 +01:00 committed by Alexandre Julliard
parent 90c0123533
commit 2f5a3fa16f
3 changed files with 25 additions and 0 deletions

View File

@ -484,6 +484,16 @@ BOOL set_winver_from_string(const char *version)
return FALSE;
}
void print_windows_versions(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
{
printf(" %10s %s\n", win_versions[i].szVersion, win_versions[i].szDescription);
}
}
static void on_winver_change(HWND dialog)
{
int selection = SendDlgItemMessageW(dialog, IDC_WINVER, CB_GETCURSEL, 0, 0);

View File

@ -202,6 +202,20 @@ ProcessCmdLine(LPSTR lpCmdLine)
return set_winver_from_string(&lpCmdLine[3]);
}
if (lpCmdLine[1] == '?')
{
printf("Usage: winecfg [options]\n\n");
printf("Options:\n");
printf(" [no option] Launch the graphical version of this program.\n");
printf(" /D Autodetect drives.\n");
printf(" /v version Set global Windows version to 'version'.\n");
printf(" /? Display this information and exit.\n\n");
printf("Valid versions for 'version':\n\n");
print_windows_versions();
return 0;
}
return -1;
}

View File

@ -91,6 +91,7 @@ INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
/* Windows version management */
BOOL set_winver_from_string(const char *version);
void print_windows_versions(void);
/* Drive management */
BOOL load_drives(void);