ReactOS 0.4.16-dev-2206-gc56950d
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{
301 CStringW szBuffer;
302 if (m_Parser->GetString(DB_NTVER, szBuffer))
303 {
304 LPWSTR start = szBuffer.GetString();
305 LPWSTR p;
306 ULONG MinNTVer = wcstoul(start, &p, 0);
307 if (p > start)
308 {
309 ULONG NTVersion = GetNTVersion();
310 // Treat as range if we have '-', otherwise treat it as XXX+
311 ULONG MaxNTVer = (*p == '-') ? wcstoul(++p, NULL, 0) : UINT_MAX;
312 // Handle the XXX- case (That version or lower)
313 if (MaxNTVer == 0)
314 {
315 MaxNTVer = MinNTVer;
316 MinNTVer = 0;
317 }
318
319 return NTVersion >= MinNTVer && NTVersion <= MaxNTVer;
320 }
321 }
322 return true;
323}
324
325BOOL
327{
329}
330
331BOOL
333{
334 return FALSE;
335}
336
337BOOL
339{
341 return !Path.IsEmpty();
342}
343
344#define MAX_SCRNSHOT_NUM 16
345BOOL
347{
349 {
350 static_assert(MAX_SCRNSHOT_NUM < 10000, "MAX_SCRNSHOT_NUM is too big");
351 for (int i = 0; i < MAX_SCRNSHOT_NUM; i++)
352 {
353 CStringW ScrnshotField;
354 ScrnshotField.Format(L"Screenshot%d", i + 1);
355 CStringW ScrnshotLocation;
356 if (!m_Parser->GetString(ScrnshotField, ScrnshotLocation))
357 {
358 // We stop at the first screenshot not found,
359 // so screenshots _have_ to be consecutive
360 break;
361 }
362
363 if (PathIsURLW(ScrnshotLocation.GetString()))
364 {
365 m_szScrnshotLocation.Add(ScrnshotLocation);
366 }
367 }
368 m_ScrnshotRetrieved = true;
369 }
370
371 if (m_szScrnshotLocation.GetSize() > 0)
372 {
374 }
375
376 return !Path.IsEmpty();
377}
378
379VOID
381{
382 Url = m_szUrlDownload;
383 m_Parser->GetString(L"SHA1", Sha1);
384 INT iSizeBytes;
385
386 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
387 {
388 SizeInBytes = (ULONG)iSizeBytes;
389 }
390 else
391 {
392 SizeInBytes = 0;
393 }
394}
395
396VOID
398{
399 License = LicenseString();
400 Size = m_szSize;
401 UrlSite = m_szUrlSite;
402 UrlDownload = m_szUrlDownload;
403}
404
405static InstallerType
407{
408 if (Installer.CompareNoCase(L"Inno") == 0)
409 return INSTALLER_INNO;
410 if (Installer.CompareNoCase(L"NSIS") == 0)
411 return INSTALLER_NSIS;
412 return INSTALLER_UNKNOWN;
413}
414
417{
420 if (str.CompareNoCase(DB_INSTALLER_GENERATE) == 0)
421 {
422 return INSTALLER_GENERATE;
423 }
424 else if (str.CompareNoCase(DB_INSTALLER_EXEINZIP) == 0)
425 {
426 if (NestedType)
427 {
431 if (it != INSTALLER_UNKNOWN)
432 return it;
433 }
434 return INSTALLER_EXEINZIP;
435 }
436 return INSTALLER_UNKNOWN;
437}
438
441{
443 m_Parser->GetString(DB_SILENTARGS, SilentParameters);
444 return it;
445}
446
447BOOL
449{
450 ATLASSERT(FALSE && "Should not be called");
451 return FALSE;
452}
453
455 HKEY Key,
456 const CStringW &KeyName,
457 AppsCategories Category, UINT KeyInfo)
458 : CAppInfo(KeyName, Category), m_hKey(Key), m_KeyInfo(KeyInfo)
459{
460 if (GetApplicationRegString(L"DisplayName", szDisplayName))
461 {
465 }
466}
467
469{
470}
471
472VOID
474 CAppRichEdit *RichEdit,
475 UINT StringID,
476 const CStringW &String,
477 DWORD TextFlags)
478{
479 CStringW Tmp;
481 {
482 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
483 }
484}
485
486VOID
488{
489 RichEdit->SetText(szDisplayName, CFE_BOLD);
490 RichEdit->InsertText(L"\n", 0);
491
493 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
494 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
495 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
497 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
498 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
499 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
500 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
501 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
503
505 {
507 }
508
510 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
511 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
512
514 {
516 }
517
520}
521
522VOID
524{
525 DWORD dwInstallTimeStamp;
526 SYSTEMTIME InstallLocalTime;
527 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
528 {
529 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
530 // Check if we have 8 characters to parse the datetime.
531 // Maybe other formats exist as well?
533 if (m_szInstallDate.GetLength() == 8)
534 {
535 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
536 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
537 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
538 }
539 }
540 // It might be a DWORD (Unix timestamp). try again.
541 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
542 {
543 FILETIME InstallFileTime;
544 SYSTEMTIME InstallSystemTime;
545
546 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
547 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
548
549 // convert to localtime
550 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
551 }
552
553 // convert to readable date string
554 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
555
557 LOCALE_USER_DEFAULT, // use default locale for current user
558 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
560}
561
562VOID
564{
565 DWORD dwWindowsInstaller = 0;
566 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
567 {
568 // MSI has the same info in Uninstall / modify, so manually build it
570 }
571 else
572 {
574 }
575 DWORD dwNoModify = 0;
576 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
577 {
578 CStringW Tmp;
579 if (GetApplicationRegString(L"NoModify", Tmp))
580 {
581 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
582 }
583 else
584 {
585 dwNoModify = 0;
586 }
587 }
588 if (!dwNoModify)
589 {
590 if (dwWindowsInstaller)
591 {
593 }
594 else
595 {
597 }
598 }
599}
600
601BOOL
603{
604 return !szDisplayName.IsEmpty();
605}
606
607BOOL
609{
611 {
613 }
614
615 return !m_szModifyString.IsEmpty();
616}
617
618BOOL
620{
622 return !Path.IsEmpty();
623}
624
625BOOL
627{
628 return FALSE;
629}
630
631VOID
633{
634 ATLASSERT(FALSE && "Should not be called");
635}
636
637VOID
639{
640 ATLASSERT(FALSE && "Should not be called");
641}
642
645{
646 CRegKey reg;
648 {
649 return INSTALLER_GENERATE;
650 }
651 return INSTALLER_UNKNOWN;
652}
653
654BOOL
656{
658 {
659 return UninstallGenerated(*this, Flags);
660 }
661
662 BOOL bModify = Flags & UCF_MODIFY;
664 {
666 }
667
669 if ((Flags & (UCF_MODIFY | UCF_SILENT)) == UCF_SILENT)
670 {
671 DWORD msi = 0;
672 msi = GetApplicationRegDword(L"WindowsInstaller", &msi) && msi;
673 if (msi)
674 {
675 cmd += L" /qn";
676 }
677 else
678 {
679 CStringW silentcmd;
680 if (GetApplicationRegString(L"QuietUninstallString", silentcmd) && !silentcmd.IsEmpty())
681 {
682 cmd = silentcmd;
683 }
684 }
685 }
686
687 BOOL bSuccess = StartProcess(cmd, TRUE);
688
689 if (bSuccess && !bModify)
690 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
691
692 return bSuccess;
693}
694
695BOOL
697{
698 ULONG nChars = 0;
699 // Get the size
700 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
701 {
702 String.Empty();
703 return FALSE;
704 }
705
706 LPWSTR Buffer = String.GetBuffer(nChars);
707 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
708 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
709 nChars--;
710 String.ReleaseBuffer(nChars);
711
712 if (lResult != ERROR_SUCCESS)
713 {
714 String.Empty();
715 return FALSE;
716 }
717
718 if (String.Find('%') >= 0)
719 {
720 CStringW Tmp;
722 if (dwLen > 0)
723 {
724 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
725 Tmp.ReleaseBuffer(dwLen - 1);
726 if (bSuccess)
727 {
728 String = Tmp;
729 }
730 else
731 {
732 String.Empty();
733 return FALSE;
734 }
735 }
736 }
737
738 return TRUE;
739}
740
741BOOL
743{
744 DWORD dwSize = sizeof(DWORD), dwType;
745 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
746 dwType != REG_DWORD)
747 {
748 return FALSE;
749 }
750
751 return TRUE;
752}
#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:344
int CompareVersion(const CStringW &left, const CStringW &right)
Definition: appinfo.cpp:93
static InstallerType GetInstallerTypeFromString(const CStringW &Installer)
Definition: appinfo.cpp:406
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:104
#define DB_EXEINZIPSECTION
Definition: appinfo.h:106
#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: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:445
#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:124
CStringW szDisplayIcon
Definition: appinfo.h:121
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:21
CStringW szDisplayName
Definition: appinfo.h:122
CStringW szDisplayVersion
Definition: appinfo.h:123
virtual ~CAppInfo()
Definition: appinfo.cpp:26
const CStringW szIdentifier
Definition: appinfo.h:118
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:299
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:156
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:397
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:346
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:380
virtual InstallerType GetInstallerInfo(CStringW &SilentParameters) const override
Definition: appinfo.cpp:440
virtual BOOL CanModify() override
Definition: appinfo.cpp:332
virtual BOOL Valid() const override
Definition: appinfo.cpp:326
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:448
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:209
CConfigParser * m_Parser
Definition: appinfo.h:150
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:338
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:151
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:416
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:487
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:626
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:742
virtual InstallerType GetInstallerType(bool NestedType=false) const override
Definition: appinfo.cpp:644
CStringW m_szUninstallString
Definition: appinfo.h:208
virtual BOOL Valid() const override
Definition: appinfo.cpp:602
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:619
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:696
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:473
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:638
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, UINT KeyInfo)
Definition: appinfo.cpp:454
virtual BOOL CanModify() override
Definition: appinfo.cpp:608
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:655
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:632
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:520
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
_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: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
#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
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:3064
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WCHAR * LPWSTR
Definition: xmlstorage.h:184