diff --git a/MSI/ZRCola/Main/Makefile b/MSI/ZRCola/Main/Makefile index e7e6012..3636d71 100644 --- a/MSI/ZRCola/Main/Makefile +++ b/MSI/ZRCola/Main/Makefile @@ -317,6 +317,7 @@ s$(MSIBUILD_LENGTH_ID) l0 Property Property ARPPRODUCTICON iconZRCola.ico ALLUSERS 1 +DISABLEADVTSHORTCUTS 1 INSTALLLEVEL 3 InstallMode Typical SecureCustomProperties OLDPRODUCTFOUND;NEWPRODUCTFOUND diff --git a/ZRCola/stdafx.h b/ZRCola/stdafx.h index 2dbbf38..b6360e2 100644 --- a/ZRCola/stdafx.h +++ b/ZRCola/stdafx.h @@ -35,3 +35,7 @@ #include #include + +#if defined(__WXMSW__) +#include +#endif diff --git a/ZRCola/zrcolaapp.cpp b/ZRCola/zrcolaapp.cpp index c445911..28d56c2 100644 --- a/ZRCola/zrcolaapp.cpp +++ b/ZRCola/zrcolaapp.cpp @@ -18,6 +18,9 @@ */ #include "stdafx.h" +#if defined(__WXMSW__) +#pragma comment(lib, "msi.lib") +#endif ////////////////////////////////////////////////////////////////////////// @@ -34,6 +37,14 @@ ZRColaApp::ZRColaApp() : wxApp() bool ZRColaApp::OnInit() { +#if defined(__WXMSW__) + // To compensate migration to non-advertised shortcut, do the Microsoft Installer's feature completeness check manually. + // If execution got this far in the first place (EXE and dependent DLLs are present and loadable). + // Furthermore, this increments program usage counter. + if (::MsiQueryFeatureState(_T(ZRCOLA_VERSION_GUID), _T("featZRCola")) != INSTALLSTATE_UNKNOWN) + ::MsiUseFeature(_T(ZRCOLA_VERSION_GUID), _T("featZRCola")); +#endif + wxConfigBase *cfgPrev = wxConfigBase::Set(new wxConfig(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR))); if (cfgPrev) wxDELETE(cfgPrev);