From 3b7e08a64f398f8b2dad4b91baa89e2b2bc356ab Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 10 Nov 2009 10:22:16 +0000 Subject: [PATCH] Patch level :10.0 setup Files correlati : Ricompilazione Demo : [ ] Commento : prova a riconoscere la versione di windows su cui sta installando ed eventualmente (win2000, win2003 termserv) usa come icona sul desktop quella a 256 colori git-svn-id: svn://10.65.10.50/trunk@19597 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- setup/Setup.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup/Setup.cpp b/setup/Setup.cpp index 788087812..e8942840a 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -282,7 +282,7 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co strPath += "/res/"; //se non trova l'icona del reseller prende quella standard in res } - const int nPos = strIcon.Len()-4; + const int nPos = strIcon.Len() - 4; switch (uInstallationType) { case it_server: strIcon.insert(nPos, "Srv"); break; @@ -291,6 +291,16 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co } strPath << strIcon; + + //controlla se è in un sistema windows che richiede icone a 256 colori (win2000, win2003 termserv) + int nVersion = 0; + GetWinVer(NULL, 0, &nVersion); + if (nVersion == W2K || nVersion == W2003) + { + const int nPosCol = strIcon.Len() - 4; + strIcon.insert(nPosCol, "_256"); + } + psl->SetIconLocation(strPath, 0); // Query IShellLink for the IPersistFile interface for saving the