[RAPPS] Don't download database at startup if appwiz mode (#6319)

Providing quick access of Control
Panel "Add/Remove Programs".
JIRA issue: CORE-19419
- Don't download the database if
  bAppwizMode in ParseCmdAndExecute
  function.
- Add CAppDB::GetAvailableCount method.
- Add CMainWindow::CheckAvailable method.
- Use CMainWindow::CheckAvailable in
  some cases of TVN_SELCHANGED handling.
This commit is contained in:
Katayama Hirofumi MZ 2024-01-10 11:36:30 +09:00 committed by GitHub
parent d3ae8258c2
commit e694e24720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 30 deletions

View file

@ -222,27 +222,22 @@ ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
{
INT argc;
LPWSTR *argv = CommandLineToArgvW(lpCmdLine, &argc);
BOOL bAppwizMode = FALSE;
if (!argv)
{
return FALSE;
}
CStringW Directory;
GetStorageDirectory(Directory);
CAppDB db(Directory);
if (argc > 1 && MatchCmdOption(argv[1], CMD_KEY_APPWIZ))
BOOL bAppwizMode = (argc > 1 && MatchCmdOption(argv[1], CMD_KEY_APPWIZ));
if (!bAppwizMode)
{
bAppwizMode = TRUE;
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
db.RemoveCached();
db.UpdateAvailable();
}
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
{
db.RemoveCached();
}
db.UpdateAvailable();
db.UpdateInstalled();
if (argc == 1 || bAppwizMode) // RAPPS is launched without options or APPWIZ mode is requested