ReactOS 0.4.17-dev-243-g1369312
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
123bool
125{
126 LPCWSTR pszKeyName = NULL;
127 CStringW szRegName;
128 m_Parser->GetString(DB_REGNAME, szRegName);
129 if (::GetInstalledVersion(NULL, szRegName))
130 pszKeyName = szRegName.GetString();
132 pszKeyName = szDisplayName.GetString();
133
134 if (pszKeyName && pOutKeyName)
135 *pOutKeyName = pszKeyName;
136 return pszKeyName != NULL;
137}
138
139VOID
141{
142 CStringW szRegName;
143 m_Parser->GetString(DB_REGNAME, szRegName);
144
146 if (bIsInstalled)
147 {
148 CStringW szInstalledVersion;
149 CStringW szNameVersion = szDisplayName + L" " + szDisplayVersion;
150 BOOL bHasInstalledVersion = ::GetInstalledVersion(&szInstalledVersion, szRegName) ||
151 ::GetInstalledVersion(&szInstalledVersion, szDisplayName) ||
152 ::GetInstalledVersion(&szInstalledVersion, szNameVersion);
153
154 if (bHasInstalledVersion)
155 {
156 BOOL bHasUpdate = CompareVersion(szInstalledVersion, szDisplayVersion) < 0;
157 if (bHasUpdate)
158 {
160 RichEdit->LoadAndInsertText(IDS_AINFO_VERSION, szInstalledVersion, 0);
161 }
162 else
163 {
165 }
166 }
167 else
168 {
170 }
171 }
172 else
173 {
175 }
176
178}
179
182{
183 INT IntBuffer;
184 m_Parser->GetInt(L"LicenseType", IntBuffer);
185 CStringW szLicenseString;
186 m_Parser->GetString(L"License", szLicenseString);
187 LicenseType licenseType;
188
189 if (IsKnownLicenseType(IntBuffer))
190 licenseType = static_cast<LicenseType>(IntBuffer);
191 else
192 licenseType = LICENSE_NONE;
193
194 if (licenseType == LICENSE_NONE || licenseType == LICENSE_FREEWARE)
195 {
196 if (szLicenseString.CompareNoCase(L"Freeware") == 0)
197 {
198 licenseType = LICENSE_FREEWARE;
199 szLicenseString = L""; // Don't display as "Freeware (Freeware)"
200 }
201 }
202
203 CStringW szLicense;
204 switch (licenseType)
205 {
207 szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
208 break;
209 case LICENSE_FREEWARE:
210 szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
211 break;
212 case LICENSE_TRIAL:
213 szLicense.LoadStringW(IDS_LICENSE_TRIAL);
214 break;
215 default:
216 return szLicenseString;
217 }
218
219 if (!szLicenseString.IsEmpty())
220 szLicense += L" (" + szLicenseString + L")";
221 return szLicense;
222}
223
224VOID
226{
228 {
230 }
231
232 if (m_LanguageLCIDs.GetSize() == 0)
233 {
234 return;
235 }
236
237 const INT nTranslations = m_LanguageLCIDs.GetSize();
238 CStringW szLangInfo;
239 CStringW szLoadedTextAvailability;
240 CStringW szLoadedAInfoText;
241
242 szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
243
246 {
247 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
248 if (nTranslations > 1)
249 {
252 szLangInfo.Format(buf, nTranslations - 1);
253 }
254 else
255 {
256 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
257 szLangInfo = L" (" + szLangInfo + L")";
258 }
259 }
260 else if (m_LanguageLCIDs.Find(lcEnglish) >= 0)
261 {
262 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
263 if (nTranslations > 1)
264 {
267 szLangInfo.Format(buf, nTranslations - 1);
268 }
269 else
270 {
271 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
272 szLangInfo = L" (" + szLangInfo + L")";
273 }
274 }
275 else
276 {
277 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
278 }
279
280 RichEdit->InsertText(szLoadedAInfoText, CFE_BOLD);
281 RichEdit->InsertText(szLoadedTextAvailability, NULL);
282 RichEdit->InsertText(szLangInfo, CFE_ITALIC);
283}
284
285VOID
287{
288 m_LanguagesLoaded = true;
289
290 CStringW szBuffer;
291 if (!m_Parser->GetString(L"Languages", szBuffer))
292 {
293 return;
294 }
295
296 // Parse parameter string
297 int iIndex = 0;
298 while (true)
299 {
300 CStringW szLocale = szBuffer.Tokenize(L"|", iIndex);
301 if (szLocale.IsEmpty())
302 break;
303
304 szLocale = L"0x" + szLocale;
305
306 INT iLCID;
307 if (StrToIntExW(szLocale, STIF_SUPPORT_HEX, &iLCID))
308 {
309 m_LanguageLCIDs.Add(static_cast<LCID>(iLCID));
310 }
311 }
312}
313
314bool
316{
317 CStringW szBuffer;
318 if (m_Parser->GetString(DB_NTVER, szBuffer))
319 {
320 LPWSTR start = szBuffer.GetString();
321 LPWSTR p;
322 ULONG MinNTVer = wcstoul(start, &p, 0);
323 if (p > start)
324 {
325 ULONG NTVersion = GetNTVersion();
326 // Treat as range if we have '-', otherwise treat it as XXX+
327 ULONG MaxNTVer = (*p == '-') ? wcstoul(++p, NULL, 0) : UINT_MAX;
328 // Handle the XXX- case (That version or lower)
329 if (MaxNTVer == 0)
330 {
331 MaxNTVer = MinNTVer;
332 MinNTVer = 0;
333 }
334
335 return NTVersion >= MinNTVer && NTVersion <= MaxNTVer;
336 }
337 }
338 return true;
339}
340
341BOOL
343{
345}
346
347BOOL
349{
350 return FALSE;
351}
352
353BOOL
355{
357 return !Path.IsEmpty();
358}
359
360#define MAX_SCRNSHOT_NUM 16
361BOOL
363{
365 {
366 static_assert(MAX_SCRNSHOT_NUM < 10000, "MAX_SCRNSHOT_NUM is too big");
367 for (int i = 0; i < MAX_SCRNSHOT_NUM; i++)
368 {
369 CStringW ScrnshotField;
370 ScrnshotField.Format(L"Screenshot%d", i + 1);
371 CStringW ScrnshotLocation;
372 if (!m_Parser->GetString(ScrnshotField, ScrnshotLocation))
373 {
374 // We stop at the first screenshot not found,
375 // so screenshots _have_ to be consecutive
376 break;
377 }
378
379 if (PathIsURLW(ScrnshotLocation.GetString()))
380 {
381 m_szScrnshotLocation.Add(ScrnshotLocation);
382 }
383 }
384 m_ScrnshotRetrieved = true;
385 }
386
387 if (m_szScrnshotLocation.GetSize() > 0)
388 {
390 }
391
392 return !Path.IsEmpty();
393}
394
395VOID
397{
398 Url = m_szUrlDownload;
399 m_Parser->GetString(L"SHA1", Sha1);
400 INT iSizeBytes;
401
402 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
403 {
404 SizeInBytes = (ULONG)iSizeBytes;
405 }
406 else
407 {
408 SizeInBytes = 0;
409 }
410}
411
412VOID
414{
415 License = LicenseString();
416 Size = m_szSize;
417 UrlSite = m_szUrlSite;
418 UrlDownload = m_szUrlDownload;
419}
420
421static InstallerType
423{
424 if (Installer.CompareNoCase(L"Inno") == 0)
425 return INSTALLER_INNO;
426 if (Installer.CompareNoCase(L"NSIS") == 0)
427 return INSTALLER_NSIS;
428 return INSTALLER_UNKNOWN;
429}
430
433{
436 if (str.CompareNoCase(DB_INSTALLER_GENERATE) == 0)
437 {
438 return INSTALLER_GENERATE;
439 }
440 else if (str.CompareNoCase(DB_INSTALLER_EXEINZIP) == 0)
441 {
442 if (NestedType)
443 {
447 if (it != INSTALLER_UNKNOWN)
448 return it;
449 }
450 return INSTALLER_EXEINZIP;
451 }
452 return INSTALLER_UNKNOWN;
453}
454
457{
459 m_Parser->GetString(DB_SILENTARGS, SilentParameters);
460 return it;
461}
462
463BOOL
465{
466 ATLASSERT(FALSE && "Should not be called");
467 return FALSE;
468}
469
471 HKEY Key,
472 const CStringW &KeyName,
473 AppsCategories Category, UINT KeyInfo)
474 : CAppInfo(KeyName, Category), m_hKey(Key), m_KeyInfo(KeyInfo)
475{
476 if (GetApplicationRegString(L"DisplayName", szDisplayName))
477 {
481 }
482}
483
485{
486}
487
488VOID
490 CAppRichEdit *RichEdit,
491 UINT StringID,
492 const CStringW &String,
493 DWORD TextFlags)
494{
495 CStringW Tmp;
497 {
498 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
499 }
500}
501
502VOID
504{
505 RichEdit->SetText(szDisplayName, CFE_BOLD);
506 RichEdit->InsertText(L"\n", 0);
507
509 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
510 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
511 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
513 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
514 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
515 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
516 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
517 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
519
521 {
523 }
524
526 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
527 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
528
530 {
532 }
533
536}
537
538VOID
540{
541 DWORD dwInstallTimeStamp;
542 SYSTEMTIME InstallLocalTime;
543 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
544 {
545 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
546 // Check if we have 8 characters to parse the datetime.
547 // Maybe other formats exist as well?
549 if (m_szInstallDate.GetLength() == 8)
550 {
551 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
552 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
553 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
554 }
555 }
556 // It might be a DWORD (Unix timestamp). try again.
557 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
558 {
559 FILETIME InstallFileTime;
560 SYSTEMTIME InstallSystemTime;
561
562 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
563 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
564
565 // convert to localtime
566 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
567 }
568
569 // convert to readable date string
570 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
571
573 LOCALE_USER_DEFAULT, // use default locale for current user
574 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
576}
577
578VOID
580{
581 DWORD dwWindowsInstaller = 0;
582 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
583 {
584 // MSI has the same info in Uninstall / modify, so manually build it
586 }
587 else
588 {
590 }
591 DWORD dwNoModify = 0;
592 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
593 {
594 CStringW Tmp;
595 if (GetApplicationRegString(L"NoModify", Tmp))
596 {
597 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
598 }
599 else
600 {
601 dwNoModify = 0;
602 }
603 }
604 if (!dwNoModify)
605 {
606 if (dwWindowsInstaller)
607 {
609 }
610 else
611 {
613 }
614 }
615}
616
617BOOL
619{
620 return !szDisplayName.IsEmpty();
621}
622
623BOOL
625{
627 {
629 }
630
631 return !m_szModifyString.IsEmpty();
632}
633
634BOOL
636{
638 return !Path.IsEmpty();
639}
640
641BOOL
643{
644 return FALSE;
645}
646
647VOID
649{
650 ATLASSERT(FALSE && "Should not be called");
651}
652
653VOID
655{
656 ATLASSERT(FALSE && "Should not be called");
657}
658
661{
662 CRegKey reg;
664 {
665 return INSTALLER_GENERATE;
666 }
667 return INSTALLER_UNKNOWN;
668}
669
670BOOL
672{
674 {
675 return UninstallGenerated(*this, Flags);
676 }
677
678 BOOL bModify = Flags & UCF_MODIFY;
680 {
682 }
683
685 if ((Flags & (UCF_MODIFY | UCF_SILENT)) == UCF_SILENT)
686 {
687 DWORD msi = 0;
688 msi = GetApplicationRegDword(L"WindowsInstaller", &msi) && msi;
689 if (msi)
690 {
691 cmd += L" /qn";
692 }
693 else
694 {
695 CStringW silentcmd;
696 if (GetApplicationRegString(L"QuietUninstallString", silentcmd) && !silentcmd.IsEmpty())
697 {
698 cmd = silentcmd;
699 }
700 }
701 }
702
703 BOOL bSuccess = StartProcess(cmd, TRUE);
704
705 if (bSuccess && !bModify)
706 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
707
708 return bSuccess;
709}
710
711BOOL
713{
714 ULONG nChars = 0;
715 // Get the size
716 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
717 {
718 String.Empty();
719 return FALSE;
720 }
721
722 LPWSTR Buffer = String.GetBuffer(nChars);
723 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
724 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
725 nChars--;
726 String.ReleaseBuffer(nChars);
727
728 if (lResult != ERROR_SUCCESS)
729 {
730 String.Empty();
731 return FALSE;
732 }
733
734 if (String.Find('%') >= 0)
735 {
736 CStringW Tmp;
738 if (dwLen > 0)
739 {
740 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
741 Tmp.ReleaseBuffer(dwLen - 1);
742 if (bSuccess)
743 {
744 String = Tmp;
745 }
746 else
747 {
748 String.Empty();
749 return FALSE;
750 }
751 }
752 }
753
754 return TRUE;
755}
756
757BOOL
759{
760 DWORD dwSize = sizeof(DWORD), dwType;
761 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
762 dwType != REG_DWORD)
763 {
764 return FALSE;
765 }
766
767 return TRUE;
768}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
PRTL_UNICODE_STRING_BUFFER Path
#define GetNTVersion()
Definition: apitest.h:17
static AppsCategories ClampAvailableCategory(AppsCategories Category)
Definition: appinfo.cpp:14
#define MAX_SCRNSHOT_NUM
Definition: appinfo.cpp:360
int CompareVersion(const CStringW &left, const CStringW &right)
Definition: appinfo.cpp:93
static InstallerType GetInstallerTypeFromString(const CStringW &Installer)
Definition: appinfo.cpp:422
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:105
#define DB_EXEINZIPSECTION
Definition: appinfo.h:107
#define DB_REGNAME
Definition: appinfo.h:94
#define DB_NTVER
Definition: appinfo.h:101
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:323
BOOL StartProcess(const CStringW &Path, BOOL Wait)
Definition: misc.cpp:203
BOOL GetInstalledVersion(CStringW *pszVersion, const CStringW &szRegName)
Definition: misc.cpp:376
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:449
#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:125
CStringW szDisplayIcon
Definition: appinfo.h:122
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:21
CStringW szDisplayName
Definition: appinfo.h:123
CStringW szDisplayVersion
Definition: appinfo.h:124
virtual ~CAppInfo()
Definition: appinfo.cpp:26
const CStringW szIdentifier
Definition: appinfo.h:119
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
bool IsCompatible() const
Definition: appinfo.cpp:315
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:157
bool IsInstalled(CStringW *pOutKeyName=NULL) const
Definition: appinfo.cpp:124
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:413
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:362
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:396
virtual InstallerType GetInstallerInfo(CStringW &SilentParameters) const override
Definition: appinfo.cpp:456
virtual BOOL CanModify() override
Definition: appinfo.cpp:348
virtual BOOL Valid() const override
Definition: appinfo.cpp:342
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:464
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:225
CConfigParser * m_Parser
Definition: appinfo.h:151
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:354
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:152
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:78
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:140
virtual InstallerType GetInstallerType(bool NestedType=false) const override
Definition: appinfo.cpp:432
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:503
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:642
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:758
virtual InstallerType GetInstallerType(bool NestedType=false) const override
Definition: appinfo.cpp:660
CStringW m_szUninstallString
Definition: appinfo.h:211
virtual BOOL Valid() const override
Definition: appinfo.cpp:618
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:635
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:712
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:489
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:654
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, UINT KeyInfo)
Definition: appinfo.cpp:470
virtual BOOL CanModify() override
Definition: appinfo.cpp:624
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:671
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:648
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:492
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:183
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
_ACRTIMP __msvcrt_ulong __cdecl wcstoul(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2912
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2747
#define UINT_MAX
Definition: limits.h:27
#define false
Definition: stdbool.h:25
static const WCHAR IconPath[]
Definition: install.c:51
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2524
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
GLdouble GLdouble right
Definition: glext.h:10859
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLint left
Definition: glext.h:7726
GLfloat GLfloat p
Definition: glext.h:8902
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:1001
#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
#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
Definition: ftp_var.h:139
const uint16_t * LPCWSTR
Definition: typedefs.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
uint16_t * LPWSTR
Definition: typedefs.h:56
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:3074
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170