From 4e348ab5142c0422adb91b161db8b94e27ea1dd0 Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 16 Oct 2007 16:06:54 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@15715 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- setup/Setup.cpp | 15 ++++++++++++++- setup/wizard.cpp | 16 ++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/setup/Setup.cpp b/setup/Setup.cpp index 5f63464cb..217be3e1e 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -806,7 +806,20 @@ void CampoSetup::NormalSetup() if (bDesktopShortcut) { const wxFileName strExe(strPrgLocPath, wxT("ba0.exe")); - CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe, "Campo"); + wxString strLnk; + switch (uInstallationType) + { + case 1: + strLnk = "Campo (Server)"; + break; + case 2: + strLnk = "Campo (Client)"; + break; + default: + strLnk = "Campo"; + break; + } + CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe, strLnk); } diff --git a/setup/wizard.cpp b/setup/wizard.cpp index b9ca3b346..8d6c68281 100755 --- a/setup/wizard.cpp +++ b/setup/wizard.cpp @@ -357,13 +357,13 @@ CampoWizardPage3::CampoWizardPage3(wxWizard* parent) : CampoWizardPage(parent) asGroups.Add(strGroup); } int prechecked = -1; - for (unsigned int i = 0; i < asGroups.GetCount(); i++) + for (int i = 0; i < (int)asGroups.GetCount(); i++) { CampoIniFile iniCampoStp("C:\\campo.stp", asGroups[i]); wxString strPath = iniCampoStp.Get(strProgram); - //sono installazioni valide quelle che presentano la coppia di files campo.ini e campo.aut (senza.. - //..questi 2 soggetti il programma non parte) + //sono installazioni valide quelle che passano il vaglio della CheckPrgdir, metodo che testa l'integrita'.. + //..di una cartella programmi di campo if (CheckPrgDir(strPath)) { //controlla il tipo di installazione rilevata (Standalone,Server,Client) @@ -391,7 +391,15 @@ CampoWizardPage3::CampoWizardPage3(wxWizard* parent) : CampoWizardPage(parent) if (nType == 1 || nType == 2) prechecked = i; } - } //if(wxFileName::... + } //if(CheckPrgDir(strPath)... + else //se una installazione su campo.stp non e' buona cancella la voce da campo.stp stesso.. + //..per non fare casini in futuro + { + wxString strGroup = "/"; + strGroup += asGroups[i]; + iniCampoStp.DeleteGroup(strGroup); + } + } //for(unsigned int i=0... wxString strTitle, strBody;