mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[RAPPS] now /INSTALL option use PkgName instead of software name
currently, PkgName is the name of ini file in DB (without suffix)
This commit is contained in:
parent
da8810ab88
commit
a4ac3c84b2
|
@ -530,7 +530,7 @@ int CAvailableApps::GetSelectedCount()
|
||||||
return m_SelectedList.GetCount();
|
return m_SelectedList.GetCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
CAvailableApplicationInfo* CAvailableApps::FindInfo(const ATL::CStringW& szAppName) const
|
CAvailableApplicationInfo* CAvailableApps::FindAppByPkgName(const ATL::CStringW& szPkgName) const
|
||||||
{
|
{
|
||||||
if (m_InfoList.IsEmpty())
|
if (m_InfoList.IsEmpty())
|
||||||
{
|
{
|
||||||
|
@ -543,7 +543,7 @@ CAvailableApplicationInfo* CAvailableApps::FindInfo(const ATL::CStringW& szAppNa
|
||||||
while (CurrentListPosition != NULL)
|
while (CurrentListPosition != NULL)
|
||||||
{
|
{
|
||||||
info = m_InfoList.GetNext(CurrentListPosition);
|
info = m_InfoList.GetNext(CurrentListPosition);
|
||||||
if (info->m_szName.CompareNoCase(szAppName) == 0)
|
if (info->m_szPkgName.CompareNoCase(szPkgName) == 0)
|
||||||
{
|
{
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -551,12 +551,12 @@ CAvailableApplicationInfo* CAvailableApps::FindInfo(const ATL::CStringW& szAppNa
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATL::CSimpleArray<CAvailableApplicationInfo> CAvailableApps::FindInfoList(const ATL::CSimpleArray<ATL::CStringW> &arrAppsNames) const
|
ATL::CSimpleArray<CAvailableApplicationInfo> CAvailableApps::FindAppsByPkgNameList(const ATL::CSimpleArray<ATL::CStringW> &PkgNameList) const
|
||||||
{
|
{
|
||||||
ATL::CSimpleArray<CAvailableApplicationInfo> result;
|
ATL::CSimpleArray<CAvailableApplicationInfo> result;
|
||||||
for (INT i = 0; i < arrAppsNames.GetSize(); ++i)
|
for (INT i = 0; i < PkgNameList.GetSize(); ++i)
|
||||||
{
|
{
|
||||||
CAvailableApplicationInfo* Info = FindInfo(arrAppsNames[i]);
|
CAvailableApplicationInfo* Info = FindAppByPkgName(PkgNameList[i]);
|
||||||
if (Info)
|
if (Info)
|
||||||
{
|
{
|
||||||
result.Add(*Info);
|
result.Add(*Info);
|
||||||
|
|
|
@ -125,8 +125,8 @@ public:
|
||||||
VOID RemoveAllSelected();
|
VOID RemoveAllSelected();
|
||||||
int GetSelectedCount();
|
int GetSelectedCount();
|
||||||
|
|
||||||
CAvailableApplicationInfo* FindInfo(const ATL::CStringW& szAppName) const;
|
CAvailableApplicationInfo* FindAppByPkgName(const ATL::CStringW& szPkgName) const;
|
||||||
ATL::CSimpleArray<CAvailableApplicationInfo> FindInfoList(const ATL::CSimpleArray<ATL::CStringW> &arrAppsNames) const;
|
ATL::CSimpleArray<CAvailableApplicationInfo> FindAppsByPkgNameList(const ATL::CSimpleArray<ATL::CStringW> &arrAppsNames) const;
|
||||||
//ATL::CSimpleArray<CAvailableApplicationInfo> GetSelected() const;
|
//ATL::CSimpleArray<CAvailableApplicationInfo> GetSelected() const;
|
||||||
|
|
||||||
const ATL::CStringW& GetFolderPath() const;
|
const ATL::CStringW& GetFolderPath() const;
|
||||||
|
|
|
@ -22,13 +22,12 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: use DB filenames as names because they're shorter
|
ATL::CSimpleArray<ATL::CStringW> PkgNameList;
|
||||||
ATL::CSimpleArray<ATL::CStringW> arrNames;
|
|
||||||
if (!StrCmpIW(argv[1], CMD_KEY_INSTALL))
|
if (!StrCmpIW(argv[1], CMD_KEY_INSTALL))
|
||||||
{
|
{
|
||||||
for (INT i = 2; i < argc; ++i)
|
for (INT i = 2; i < argc; ++i)
|
||||||
{
|
{
|
||||||
arrNames.Add(argv[i]);
|
PkgNameList.Add(argv[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -43,12 +42,12 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine)
|
||||||
INFCONTEXT Context;
|
INFCONTEXT Context;
|
||||||
if (SetupFindFirstLineW(InfHandle, L"RAPPS", L"Install", &Context))
|
if (SetupFindFirstLineW(InfHandle, L"RAPPS", L"Install", &Context))
|
||||||
{
|
{
|
||||||
WCHAR szName[MAX_PATH];
|
WCHAR szPkgName[MAX_PATH];
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (SetupGetStringFieldW(&Context, 1, szName, _countof(szName), NULL))
|
if (SetupGetStringFieldW(&Context, 1, szPkgName, _countof(szPkgName), NULL))
|
||||||
{
|
{
|
||||||
arrNames.Add(szName);
|
PkgNameList.Add(szPkgName);
|
||||||
}
|
}
|
||||||
} while (SetupFindNextLine(&Context, &Context));
|
} while (SetupFindNextLine(&Context, &Context));
|
||||||
}
|
}
|
||||||
|
@ -63,7 +62,7 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine)
|
||||||
apps.UpdateAppsDB();
|
apps.UpdateAppsDB();
|
||||||
apps.Enum(ENUM_ALL_AVAILABLE, NULL, NULL);
|
apps.Enum(ENUM_ALL_AVAILABLE, NULL, NULL);
|
||||||
|
|
||||||
ATL::CSimpleArray<CAvailableApplicationInfo> arrAppInfo = apps.FindInfoList(arrNames);
|
ATL::CSimpleArray<CAvailableApplicationInfo> arrAppInfo = apps.FindAppsByPkgNameList(PkgNameList);
|
||||||
if (arrAppInfo.GetSize() > 0)
|
if (arrAppInfo.GetSize() > 0)
|
||||||
{
|
{
|
||||||
DownloadListOfApplications(arrAppInfo, TRUE);
|
DownloadListOfApplications(arrAppInfo, TRUE);
|
||||||
|
|
Loading…
Reference in a new issue