mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
57b775ef6e
With a single database line added to applications distributed as zip/cab allows rapps.exe to act as an installer that automatically extracts the files and creates a startmenu shortcut. It can also uninstall the extracted files (and optionally other files and registry entries created by the application).
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <atlcoll.h>
|
|
#include <atlpath.h>
|
|
|
|
#include "appinfo.h"
|
|
|
|
class CAppDB
|
|
{
|
|
private:
|
|
CPathW m_BasePath;
|
|
CAtlList<CAppInfo *> m_Available;
|
|
CAtlList<CAppInfo *> m_Installed;
|
|
|
|
BOOL
|
|
EnumerateFiles();
|
|
|
|
static CInstalledApplicationInfo *
|
|
EnumerateRegistry(CAtlList<CAppInfo *> *List, LPCWSTR Name);
|
|
static CInstalledApplicationInfo *
|
|
CreateInstalledAppByRegistryKey(LPCWSTR KeyName, HKEY hKeyParent, UINT KeyIndex);
|
|
|
|
public:
|
|
CAppDB(const CStringW &path);
|
|
|
|
VOID
|
|
GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const;
|
|
CAvailableApplicationInfo *
|
|
FindAvailableByPackageName(const CStringW &name);
|
|
CAppInfo *
|
|
FindByPackageName(const CStringW &name) { return FindAvailableByPackageName(name); }
|
|
|
|
VOID
|
|
UpdateAvailable();
|
|
VOID
|
|
UpdateInstalled();
|
|
VOID
|
|
RemoveCached();
|
|
|
|
static DWORD
|
|
RemoveInstalledAppFromRegistry(const CAppInfo *Info);
|
|
|
|
static CInstalledApplicationInfo *
|
|
CreateInstalledAppByRegistryKey(LPCWSTR Name);
|
|
static CInstalledApplicationInfo *
|
|
CreateInstalledAppInstance(LPCWSTR KeyName, BOOL User, REGSAM WowSam);
|
|
static HKEY
|
|
EnumInstalledRootKey(UINT Index, REGSAM &RegSam);
|
|
|
|
size_t GetAvailableCount() const
|
|
{
|
|
return m_Available.GetCount();
|
|
}
|
|
};
|