ReactOS 0.4.16-dev-1946-g52006dd
appinfo.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Classes for working with available applications
5 * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
6 * Copyright 2020 He Yang (1160386205@qq.com)
7 * Copyright 2021-2023 Mark Jansen <mark.jansen@reactos.org>
8 */
9
10#include "rapps.h"
11#include "appview.h"
12
13static inline AppsCategories
15{
16 if (Category <= ENUM_LASTCATEGORY)
17 return Category;
18 return ENUM_CAT_OTHER; // Treat future categories we don't know as Other
19}
20
22 : szIdentifier(Identifier), iCategory(Category)
23{
24}
25
27{
28}
29
31 CConfigParser *Parser,
32 const CStringW &PkgName,
33 AppsCategories Category,
34 const CPathW &BasePath)
35 : CAppInfo(PkgName, ClampAvailableCategory(Category)), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
36{
39 m_Parser->GetString(L"URLDownload", m_szUrlDownload);
40 m_Parser->GetString(L"Description", szComments);
41
42 CPathW IconPath = BasePath;
43 IconPath += L"icons";
44
46 if (m_Parser->GetString(L"Icon", IconName))
47 {
49 }
50 else
51 {
52 // inifile.ico
53 IconPath += (szIdentifier + L".ico");
54 }
55
57 {
59 }
60
61 INT iSizeBytes;
62
63 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
64 {
67 }
68
69 m_Parser->GetString(L"URLSite", m_szUrlSite);
70}
71
73{
74 delete m_Parser;
75}
76
77VOID
79{
80 RichEdit->SetText(szDisplayName, CFE_BOLD);
81 InsertVersionInfo(RichEdit);
83 InsertLanguageInfo(RichEdit);
84
90}
91
92int
94{
95 int nLeft = 0, nRight = 0;
96
97 while (true)
98 {
99 CStringW leftPart = left.Tokenize(L".", nLeft);
100 CStringW rightPart = right.Tokenize(L".", nRight);
101
102 if (leftPart.IsEmpty() && rightPart.IsEmpty())
103 return 0;
104 if (leftPart.IsEmpty())
105 return -1;
106 if (rightPart.IsEmpty())
107 return 1;
108
109 int leftVal, rightVal;
110
111 if (!StrToIntExW(leftPart, STIF_DEFAULT, &leftVal))
112 leftVal = 0;
113 if (!StrToIntExW(rightPart, STIF_DEFAULT, &rightVal))
114 rightVal = 0;
115
116 if (leftVal > rightVal)
117 return 1;
118 if (rightVal < leftVal)
119 return -1;
120 }
121}
122
123VOID
125{
126 CStringW szRegName;
127 m_Parser->GetString(DB_REGNAME, szRegName);
128
130 if (bIsInstalled)
131 {
132 CStringW szInstalledVersion;
133 CStringW szNameVersion = szDisplayName + L" " + szDisplayVersion;
134 BOOL bHasInstalledVersion = ::GetInstalledVersion(&szInstalledVersion, szRegName) ||
135 ::GetInstalledVersion(&szInstalledVersion, szDisplayName) ||
136 ::GetInstalledVersion(&szInstalledVersion, szNameVersion);
137
138 if (bHasInstalledVersion)
139 {
140 BOOL bHasUpdate = CompareVersion(szInstalledVersion, szDisplayVersion) < 0;
141 if (bHasUpdate)
142 {
144 RichEdit->LoadAndInsertText(IDS_AINFO_VERSION, szInstalledVersion, 0);
145 }
146 else
147 {
149 }
150 }
151 else
152 {
154 }
155 }
156 else
157 {
159 }
160
162}
163
166{
167 INT IntBuffer;
168 m_Parser->GetInt(L"LicenseType", IntBuffer);
169 CStringW szLicenseString;
170 m_Parser->GetString(L"License", szLicenseString);
171 LicenseType licenseType;
172
173 if (IsKnownLicenseType(IntBuffer))
174 licenseType = static_cast<LicenseType>(IntBuffer);
175 else
176 licenseType = LICENSE_NONE;
177
178 if (licenseType == LICENSE_NONE || licenseType == LICENSE_FREEWARE)
179 {
180 if (szLicenseString.CompareNoCase(L"Freeware") == 0)
181 {
182 licenseType = LICENSE_FREEWARE;
183 szLicenseString = L""; // Don't display as "Freeware (Freeware)"
184 }
185 }
186
187 CStringW szLicense;
188 switch (licenseType)
189 {
191 szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
192 break;
193 case LICENSE_FREEWARE:
194 szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
195 break;
196 case LICENSE_TRIAL:
197 szLicense.LoadStringW(IDS_LICENSE_TRIAL);
198 break;
199 default:
200 return szLicenseString;
201 }
202
203 if (!szLicenseString.IsEmpty())
204 szLicense += L" (" + szLicenseString + L")";
205 return szLicense;
206}
207
208VOID
210{
212 {
214 }
215
216 if (m_LanguageLCIDs.GetSize() == 0)
217 {
218 return;
219 }
220
221 const INT nTranslations = m_LanguageLCIDs.GetSize();
222 CStringW szLangInfo;
223 CStringW szLoadedTextAvailability;
224 CStringW szLoadedAInfoText;
225
226 szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
227
230 {
231 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
232 if (nTranslations > 1)
233 {
236 szLangInfo.Format(buf, nTranslations - 1);
237 }
238 else
239 {
240 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
241 szLangInfo = L" (" + szLangInfo + L")";
242 }
243 }
244 else if (m_LanguageLCIDs.Find(lcEnglish) >= 0)
245 {
246 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
247 if (nTranslations > 1)
248 {
251 szLangInfo.Format(buf, nTranslations - 1);
252 }
253 else
254 {
255 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
256 szLangInfo = L" (" + szLangInfo + L")";
257 }
258 }
259 else
260 {
261 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
262 }
263
264 RichEdit->InsertText(szLoadedAInfoText, CFE_BOLD);
265 RichEdit->InsertText(szLoadedTextAvailability, NULL);
266 RichEdit->InsertText(szLangInfo, CFE_ITALIC);
267}
268
269VOID
271{
272 m_LanguagesLoaded = true;
273
274 CStringW szBuffer;
275 if (!m_Parser->GetString(L"Languages", szBuffer))
276 {
277 return;
278 }
279
280 // Parse parameter string
281 int iIndex = 0;
282 while (true)
283 {
284 CStringW szLocale = szBuffer.Tokenize(L"|", iIndex);
285 if (szLocale.IsEmpty())
286 break;
287
288 szLocale = L"0x" + szLocale;
289
290 INT iLCID;
291 if (StrToIntExW(szLocale, STIF_SUPPORT_HEX, &iLCID))
292 {
293 m_LanguageLCIDs.Add(static_cast<LCID>(iLCID));
294 }
295 }
296}
297
298BOOL
300{
302}
303
304BOOL
306{
307 return FALSE;
308}
309
310BOOL
312{
314 return !Path.IsEmpty();
315}
316
317#define MAX_SCRNSHOT_NUM 16
318BOOL
320{
322 {
323 static_assert(MAX_SCRNSHOT_NUM < 10000, "MAX_SCRNSHOT_NUM is too big");
324 for (int i = 0; i < MAX_SCRNSHOT_NUM; i++)
325 {
326 CStringW ScrnshotField;
327 ScrnshotField.Format(L"Screenshot%d", i + 1);
328 CStringW ScrnshotLocation;
329 if (!m_Parser->GetString(ScrnshotField, ScrnshotLocation))
330 {
331 // We stop at the first screenshot not found,
332 // so screenshots _have_ to be consecutive
333 break;
334 }
335
336 if (PathIsURLW(ScrnshotLocation.GetString()))
337 {
338 m_szScrnshotLocation.Add(ScrnshotLocation);
339 }
340 }
341 m_ScrnshotRetrieved = true;
342 }
343
344 if (m_szScrnshotLocation.GetSize() > 0)
345 {
347 }
348
349 return !Path.IsEmpty();
350}
351
352VOID
354{
355 Url = m_szUrlDownload;
356 m_Parser->GetString(L"SHA1", Sha1);
357 INT iSizeBytes;
358
359 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
360 {
361 SizeInBytes = (ULONG)iSizeBytes;
362 }
363 else
364 {
365 SizeInBytes = 0;
366 }
367}
368
369VOID
371{
372 License = LicenseString();
373 Size = m_szSize;
374 UrlSite = m_szUrlSite;
375 UrlDownload = m_szUrlDownload;
376}
377
378static InstallerType
380{
381 if (Installer.CompareNoCase(L"Inno") == 0)
382 return INSTALLER_INNO;
383 if (Installer.CompareNoCase(L"NSIS") == 0)
384 return INSTALLER_NSIS;
385 return INSTALLER_UNKNOWN;
386}
387
390{
393 if (str.CompareNoCase(DB_INSTALLER_GENERATE) == 0)
394 {
395 return INSTALLER_GENERATE;
396 }
397 else if (str.CompareNoCase(DB_INSTALLER_EXEINZIP) == 0)
398 {
399 if (NestedType)
400 {
404 if (it != INSTALLER_UNKNOWN)
405 return it;
406 }
407 return INSTALLER_EXEINZIP;
408 }
409 return INSTALLER_UNKNOWN;
410}
411
414{
416 m_Parser->GetString(DB_SILENTARGS, SilentParameters);
417 return it;
418}
419
420BOOL
422{
423 ATLASSERT(FALSE && "Should not be called");
424 return FALSE;
425}
426
428 HKEY Key,
429 const CStringW &KeyName,
430 AppsCategories Category, UINT KeyInfo)
431 : CAppInfo(KeyName, Category), m_hKey(Key), m_KeyInfo(KeyInfo)
432{
433 if (GetApplicationRegString(L"DisplayName", szDisplayName))
434 {
438 }
439}
440
442{
443}
444
445VOID
447 CAppRichEdit *RichEdit,
448 UINT StringID,
449 const CStringW &String,
450 DWORD TextFlags)
451{
452 CStringW Tmp;
454 {
455 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
456 }
457}
458
459VOID
461{
462 RichEdit->SetText(szDisplayName, CFE_BOLD);
463 RichEdit->InsertText(L"\n", 0);
464
466 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
467 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
468 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
470 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
471 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
472 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
473 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
474 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
476
478 {
480 }
481
483 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
484 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
485
487 {
489 }
490
493}
494
495VOID
497{
498 DWORD dwInstallTimeStamp;
499 SYSTEMTIME InstallLocalTime;
500 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
501 {
502 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
503 // Check if we have 8 characters to parse the datetime.
504 // Maybe other formats exist as well?
506 if (m_szInstallDate.GetLength() == 8)
507 {
508 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
509 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
510 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
511 }
512 }
513 // It might be a DWORD (Unix timestamp). try again.
514 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
515 {
516 FILETIME InstallFileTime;
517 SYSTEMTIME InstallSystemTime;
518
519 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
520 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
521
522 // convert to localtime
523 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
524 }
525
526 // convert to readable date string
527 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
528
530 LOCALE_USER_DEFAULT, // use default locale for current user
531 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
533}
534
535VOID
537{
538 DWORD dwWindowsInstaller = 0;
539 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
540 {
541 // MSI has the same info in Uninstall / modify, so manually build it
543 }
544 else
545 {
547 }
548 DWORD dwNoModify = 0;
549 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
550 {
551 CStringW Tmp;
552 if (GetApplicationRegString(L"NoModify", Tmp))
553 {
554 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
555 }
556 else
557 {
558 dwNoModify = 0;
559 }
560 }
561 if (!dwNoModify)
562 {
563 if (dwWindowsInstaller)
564 {
566 }
567 else
568 {
570 }
571 }
572}
573
574BOOL
576{
577 return !szDisplayName.IsEmpty();
578}
579
580BOOL
582{
584 {
586 }
587
588 return !m_szModifyString.IsEmpty();
589}
590
591BOOL
593{
595 return !Path.IsEmpty();
596}
597
598BOOL
600{
601 return FALSE;
602}
603
604VOID
606{
607 ATLASSERT(FALSE && "Should not be called");
608}
609
610VOID
612{
613 ATLASSERT(FALSE && "Should not be called");
614}
615
618{
619 CRegKey reg;
621 {
622 return INSTALLER_GENERATE;
623 }
624 return INSTALLER_UNKNOWN;
625}
626
627BOOL
629{
631 {
632 return UninstallGenerated(*this, Flags);
633 }
634
635 BOOL bModify = Flags & UCF_MODIFY;
637 {
639 }
640
642 if ((Flags & (UCF_MODIFY | UCF_SILENT)) == UCF_SILENT)
643 {
644 DWORD msi = 0;
645 msi = GetApplicationRegDword(L"WindowsInstaller", &msi) && msi;
646 if (msi)
647 {
648 cmd += L" /qn";
649 }
650 else
651 {
652 CStringW silentcmd;
653 if (GetApplicationRegString(L"QuietUninstallString", silentcmd) && !silentcmd.IsEmpty())
654 {
655 cmd = silentcmd;
656 }
657 }
658 }
659
660 BOOL bSuccess = StartProcess(cmd, TRUE);
661
662 if (bSuccess && !bModify)
663 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
664
665 return bSuccess;
666}
667
668BOOL
670{
671 ULONG nChars = 0;
672 // Get the size
673 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
674 {
675 String.Empty();
676 return FALSE;
677 }
678
679 LPWSTR Buffer = String.GetBuffer(nChars);
680 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
681 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
682 nChars--;
683 String.ReleaseBuffer(nChars);
684
685 if (lResult != ERROR_SUCCESS)
686 {
687 String.Empty();
688 return FALSE;
689 }
690
691 if (String.Find('%') >= 0)
692 {
693 CStringW Tmp;
695 if (dwLen > 0)
696 {
697 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
698 Tmp.ReleaseBuffer(dwLen - 1);
699 if (bSuccess)
700 {
701 String = Tmp;
702 }
703 else
704 {
705 String.Empty();
706 return FALSE;
707 }
708 }
709 }
710
711 return TRUE;
712}
713
714BOOL
716{
717 DWORD dwSize = sizeof(DWORD), dwType;
718 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
719 dwType != REG_DWORD)
720 {
721 return FALSE;
722 }
723
724 return TRUE;
725}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
PRTL_UNICODE_STRING_BUFFER Path
static AppsCategories ClampAvailableCategory(AppsCategories Category)
Definition: appinfo.cpp:14
#define MAX_SCRNSHOT_NUM
Definition: appinfo.cpp:317
int CompareVersion(const CStringW &left, const CStringW &right)
Definition: appinfo.cpp:93
static InstallerType GetInstallerTypeFromString(const CStringW &Installer)
Definition: appinfo.cpp:379
LicenseType
Definition: appinfo.h:8
@ LICENSE_NONE
Definition: appinfo.h:9
@ LICENSE_OPENSOURCE
Definition: appinfo.h:10
@ LICENSE_TRIAL
Definition: appinfo.h:12
@ LICENSE_FREEWARE
Definition: appinfo.h:11
#define DB_SILENTARGS
Definition: appinfo.h:100
#define GENERATE_ARPSUBKEY
Definition: appinfo.h:103
#define DB_EXEINZIPSECTION
Definition: appinfo.h:105
#define DB_REGNAME
Definition: appinfo.h:94
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:18
#define DB_INSTALLER
Definition: appinfo.h:95
#define DB_INSTALLER_EXEINZIP
Definition: appinfo.h:97
UninstallCommandFlags
Definition: appinfo.h:73
@ UCF_SILENT
Definition: appinfo.h:75
@ UCF_SAMEPROCESS
Definition: appinfo.h:77
@ UCF_MODIFY
Definition: appinfo.h:76
InstallerType
Definition: appinfo.h:82
@ INSTALLER_NSIS
Definition: appinfo.h:88
@ INSTALLER_UNKNOWN
Definition: appinfo.h:83
@ INSTALLER_EXEINZIP
Definition: appinfo.h:84
@ INSTALLER_INNO
Definition: appinfo.h:87
@ INSTALLER_GENERATE
Definition: appinfo.h:85
#define DB_INSTALLER_GENERATE
Definition: appinfo.h:96
BOOL UninstallGenerated(CInstalledApplicationInfo &AppInfo, UninstallCommandFlags Flags)
Definition: geninst.cpp:842
AppsCategories
Definition: appinfo.h:24
@ ENUM_LASTCATEGORY
Definition: appinfo.h:43
@ ENUM_CAT_OTHER
Definition: appinfo.h:41
@ Identifier
Definition: asmpp.cpp:95
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:319
BOOL StartProcess(const CStringW &Path, BOOL Wait)
Definition: misc.cpp:176
BOOL GetInstalledVersion(CStringW *pszVersion, const CStringW &szRegName)
Definition: misc.cpp:372
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:435
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:177
#define IDS_INFO_INSTALLSRC
Definition: resource.h:165
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:205
#define IDS_AINFO_SIZE
Definition: resource.h:173
#define IDS_INFO_REGOWNER
Definition: resource.h:158
#define IDS_INFO_VERSION
Definition: resource.h:152
#define IDS_LICENSE_TRIAL
Definition: resource.h:216
#define IDS_AINFO_VERSION
Definition: resource.h:171
#define IDS_LICENSE_FREEWARE
Definition: resource.h:215
#define IDS_INFO_HELPLINK
Definition: resource.h:155
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:223
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:222
#define IDS_INFO_INSTALLDATE
Definition: resource.h:168
#define IDS_AINFO_PACKAGE_NAME
Definition: resource.h:182
#define IDS_INFO_HELPPHONE
Definition: resource.h:156
#define IDS_AINFO_LICENSE
Definition: resource.h:175
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:207
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:220
#define IDS_INFO_INSTLOCATION
Definition: resource.h:164
#define IDS_INFO_COMMENTS
Definition: resource.h:163
#define IDS_AINFO_LANGUAGES
Definition: resource.h:178
#define IDS_INFO_UPDATEINFO
Definition: resource.h:161
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:172
#define IDS_AINFO_URLSITE
Definition: resource.h:174
#define IDS_INFO_CONTACT
Definition: resource.h:160
#define IDS_INFO_MODIFYPATH
Definition: resource.h:167
#define IDS_INFO_UNINSTALLSTR
Definition: resource.h:166
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:214
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:224
#define IDS_INFO_PRODUCTID
Definition: resource.h:159
#define IDS_INFO_README
Definition: resource.h:157
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:176
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:219
#define IDS_INFO_PUBLISHER
Definition: resource.h:154
#define IDS_STATUS_INSTALLED
Definition: resource.h:204
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:221
#define IDS_INFO_INFOABOUT
Definition: resource.h:162
LONG QueryStringValue(LPCTSTR pszValueName, LPTSTR pszValue, ULONG *pnChars) noexcept
Definition: atlbase.h:1240
int GetSize() const
Definition: atlsimpcoll.h:104
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58
int Find(const T &t) const
Definition: atlsimpcoll.h:82
bool IsEmpty() const noexcept
Definition: atlsimpstr.h:394
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
int GetLength() const noexcept
Definition: atlsimpstr.h:362
void Empty() noexcept
Definition: atlsimpstr.h:253
int CompareNoCase(_In_z_ PCXSTR psz) const
Definition: cstringt.h:743
CStringT Left(int nCount) const
Definition: cstringt.h:776
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
CStringT & Trim()
Definition: cstringt.h:1046
CStringT Tokenize(_In_z_ PCXSTR pszTokens, _Inout_ int &iStart) const
Definition: cstringt.h:947
CStringT Mid(int iFirst, int nCount) const
Definition: cstringt.h:748
Definition: bufpool.h:45
CStringW szComments
Definition: appinfo.h:123
CStringW szDisplayIcon
Definition: appinfo.h:120
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:21
CStringW szDisplayName
Definition: appinfo.h:121
CStringW szDisplayVersion
Definition: appinfo.h:122
virtual ~CAppInfo()
Definition: appinfo.cpp:26
const CStringW szIdentifier
Definition: appinfo.h:117
VOID InsertTextWithString(UINT StringID, const CStringW &Text, DWORD TextFlags)
Definition: appview.cpp:310
VOID LoadAndInsertText(UINT uStringID, const CStringW &szText, DWORD TextFlags)
Definition: appview.cpp:286
CAvailableApplicationInfo(CConfigParser *Parser, const CStringW &PkgName, AppsCategories Category, const CPathW &BasePath)
Definition: appinfo.cpp:30
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:155
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:370
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:319
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:353
virtual InstallerType GetInstallerInfo(CStringW &SilentParameters) const override
Definition: appinfo.cpp:413
virtual BOOL CanModify() override
Definition: appinfo.cpp:305
virtual BOOL Valid() const override
Definition: appinfo.cpp:299
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:421
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:209
CConfigParser * m_Parser
Definition: appinfo.h:149
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:311
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:150
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:78
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:124
virtual InstallerType GetInstallerType(bool NestedType=false) const override
Definition: appinfo.cpp:389
BOOL GetString(const CStringW &KeyName, CStringW &ResultString)
BOOL GetInt(const CStringW &KeyName, INT &iResult)
UINT GetSectionString(LPCWSTR Section, LPCWSTR Name, CStringW &Result)
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:460
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:599
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:715
virtual InstallerType GetInstallerType(bool NestedType=false) const override
Definition: appinfo.cpp:617
CStringW m_szUninstallString
Definition: appinfo.h:204
virtual BOOL Valid() const override
Definition: appinfo.cpp:575
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:592
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:669
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:446
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:611
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, UINT KeyInfo)
Definition: appinfo.cpp:427
virtual BOOL CanModify() override
Definition: appinfo.cpp:581
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:628
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:605
VOID InsertText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:77
VOID SetText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:91
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LPCTSTR IconName
Definition: desktop.c:53
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
Definition: timezone.c:377
LCID WINAPI GetUserDefaultLCID(void)
Definition: locale.c:1216
BOOL WINAPI PathIsURLW(const WCHAR *path)
Definition: path.c:3238
BOOL WINAPI PathFileExistsW(const WCHAR *path)
Definition: path.c:2607
BOOL WINAPI StrToIntExW(const WCHAR *str, DWORD flags, INT *ret)
Definition: string.c:972
static const WCHAR IconPath[]
Definition: install.c:51
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2394
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble right
Definition: glext.h:10859
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLint left
Definition: glext.h:7726
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int reg
Definition: i386-dis.c:1290
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:989
#define ZeroMemory
Definition: minwinbase.h:31
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
UINT WINAPI nested(MSIHANDLE hinst)
Definition: custom.c:565
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1026
#define DWORD
Definition: nt_native.h:44
#define LOCALE_USER_DEFAULT
#define UNICODE_NULL
#define SORT_DEFAULT
#define MAKELCID(lgid, srtid)
long LONG
Definition: pedump.c:60
#define STIF_SUPPORT_HEX
Definition: shlwapi.h:1059
#define STIF_DEFAULT
Definition: shlwapi.h:1058
#define CFE_BOLD
Definition: richedit.h:406
#define CFE_ITALIC
Definition: richedit.h:407
#define CFE_LINK
Definition: richedit.h:411
#define CFM_LINK
Definition: richedit.h:337
const WCHAR * str
#define REG_DWORD
Definition: sdbapi.c:615
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_ENGLISH
Definition: nls.h:52
#define SUBLANG_DEFAULT
Definition: nls.h:168
DWORD LCID
Definition: nls.h:13
#define false
Definition: stdbool.h:37
Definition: ftp_var.h:139
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2705
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2439
#define EVENTLOG_SUCCESS
Definition: winnt_old.h:3056
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WCHAR * LPWSTR
Definition: xmlstorage.h:184