Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunto controllo del producer sul cd in modo da fare apparire/scomparire l'installatore della teleassistenza git-svn-id: svn://10.65.10.50/trunk@17714 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
898b546bc5
commit
265e661626
@ -491,3 +491,31 @@ bool UnzipFile(const char* strZipFile, const char* strDestDir)
|
|||||||
}
|
}
|
||||||
return files > 0;
|
return files > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// metodi per raccattare il producer del cd che si sta installando
|
||||||
|
//---------------------------------------------------------------------------------------
|
||||||
|
static const char* const encryption_key = "QSECOFR-";
|
||||||
|
|
||||||
|
//Ritorna in chiaro la stringa crittata che gli viene passata
|
||||||
|
static wxString CampoDecode(const wxString& data)
|
||||||
|
{
|
||||||
|
wxString tmp;
|
||||||
|
|
||||||
|
for (size_t i = 0; data[i]; i++)
|
||||||
|
tmp << wxChar(data[i] - (i < 8 ? encryption_key[i] : tmp[i - 8]));
|
||||||
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
//chiede se il producer del cd è AGA
|
||||||
|
bool IsAgaVersion(const wxString& strIniPath)
|
||||||
|
{
|
||||||
|
//prende l'install.ini del path che gli viene passato
|
||||||
|
CampoIniFile iniInstall(strIniPath, "Main");
|
||||||
|
const wxString strCriptedProducer = iniInstall.Get("Producer");
|
||||||
|
//adesso viene il bello!deve decrittarlo....ci vuole ENIGMA!
|
||||||
|
const wxString strProducer = CampoDecode(strCriptedProducer);
|
||||||
|
|
||||||
|
return strProducer.Find("AGA") > 0;
|
||||||
|
}
|
@ -28,21 +28,6 @@ public:
|
|||||||
|
|
||||||
CampoIniFile(const wxString strIniPath, wxString strGroup);
|
CampoIniFile(const wxString strIniPath, wxString strGroup);
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
class CampoIniFile : public wxFileConfig
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
public:
|
|
||||||
wxString Get(const wxString strVariable) const;
|
|
||||||
bool GetBool(const wxString strVariable) const;
|
|
||||||
int GetInt (const wxString strVariable) const;
|
|
||||||
bool Set(const wxString strVariable, const wxString strValue);
|
|
||||||
InstallationType GetInstallationType() const;
|
|
||||||
bool Set(const wxString strVariable, const int uValue);
|
|
||||||
|
|
||||||
CampoIniFile(const wxString strIniPath, wxString strValue);
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
//progind
|
//progind
|
||||||
class CampoProgressDialog : public wxProgressDialog
|
class CampoProgressDialog : public wxProgressDialog
|
||||||
@ -70,4 +55,8 @@ size_t ListNetworkDisks(wxArrayString& asList);
|
|||||||
size_t ListSharedDirectories(wxArrayString& asList);
|
size_t ListSharedDirectories(wxArrayString& asList);
|
||||||
bool IsSharedDirectory (const wxString& strDir);
|
bool IsSharedDirectory (const wxString& strDir);
|
||||||
|
|
||||||
|
|
||||||
|
//cerca il producer del cd
|
||||||
|
bool IsAgaVersion(const wxString& strIniPath = wxEmptyString);
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1271,7 +1271,7 @@ CampoWizardPage8::CampoWizardPage8(wxWizard* parent) : CampoWizardPage(parent)
|
|||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************************/
|
/**********************************************************************************************************/
|
||||||
// 9 pagina con la creazione icona sul desktop e lanciatore del lurch
|
// 9 pagina con la creazione icona sul desktop, lanciatore del lurch e installatore teleassistenza
|
||||||
/**********************************************************************************************************/
|
/**********************************************************************************************************/
|
||||||
class CampoWizardPage9 : public CampoWizardPage
|
class CampoWizardPage9 : public CampoWizardPage
|
||||||
{
|
{
|
||||||
@ -1325,13 +1325,20 @@ bool CampoWizardPage9::ForwardValidate()
|
|||||||
|
|
||||||
CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
|
CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
|
||||||
{
|
{
|
||||||
|
//l'installatore della teleassistenza ci va solo nella versione AGA;quindi controlla il producer nell'install.ini...
|
||||||
|
//..che c'è appena sopra di lui in program
|
||||||
|
const bool bIsAgaVersion = IsAgaVersion("../install.ini");
|
||||||
|
|
||||||
wxString strTitle = wxT("Collegamenti e Teleassistenza");
|
wxString strTitle = wxT("Collegamenti e Teleassistenza");
|
||||||
wxString strBody;
|
wxString strBody;
|
||||||
strBody += wxT("<p>E' possibile creare l'icona di APPNAME sul desktop.</p>");
|
strBody += wxT("<p>E' possibile creare l'icona di APPNAME sul desktop.</p>");
|
||||||
strBody += wxT("<p>E' possibile installare il programma di teleassistenza. E' il software che consente");
|
if (bIsAgaVersion)
|
||||||
strBody += wxT(" ai tecnici dell'assistenza di controllare il computer su cui si installa APPNAME in caso di problemi gravi.");
|
{
|
||||||
strBody += wxT(" Se la casella risulta NON spuntata in automatico il programma di teleassistenza e' gia' presente");
|
strBody += wxT("<p>E' possibile installare il programma di teleassistenza. E' il software che consente");
|
||||||
strBody += wxT(" sul computer e non deve essere reinstallato.</p>");
|
strBody += wxT(" ai tecnici dell'assistenza di controllare il computer su cui si installa APPNAME in caso di problemi gravi.");
|
||||||
|
strBody += wxT(" Se la casella risulta NON spuntata in automatico il programma di teleassistenza e' gia' presente");
|
||||||
|
strBody += wxT(" sul computer e non deve essere reinstallato.</p>");
|
||||||
|
}
|
||||||
|
|
||||||
SetHTMLText(strTitle, strBody);
|
SetHTMLText(strTitle, strBody);
|
||||||
|
|
||||||
@ -1342,6 +1349,8 @@ CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
|
|||||||
|
|
||||||
wxCheckBox* pTeleass = new wxCheckBox(this, 902, wxT("Installare il programma di teleassistenza"));
|
wxCheckBox* pTeleass = new wxCheckBox(this, 902, wxT("Installare il programma di teleassistenza"));
|
||||||
GetSizer()->Add(pTeleass, 0, wxALL, 0);
|
GetSizer()->Add(pTeleass, 0, wxALL, 0);
|
||||||
|
if (!bIsAgaVersion)
|
||||||
|
pTeleass->Hide();
|
||||||
|
|
||||||
//wxCheckBox* pLink = new wxCheckBox(this, 1002, wxT("Associare i file .caz al programma"));
|
//wxCheckBox* pLink = new wxCheckBox(this, 1002, wxT("Associare i file .caz al programma"));
|
||||||
//pLink->SetValue(true);
|
//pLink->SetValue(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user