Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@15666 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e0bb357fbe
commit
23ea364688
@ -7,15 +7,20 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
wxString GetWindowsProgramDirectory()
|
||||||
|
{
|
||||||
|
//scelta della directory di installazione di default
|
||||||
|
#ifdef WIN32
|
||||||
|
TCHAR strFolder[MAX_PATH];
|
||||||
|
::SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, strFolder);
|
||||||
|
return strFolder;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
wxString GetDefaultDestination()
|
wxString GetDefaultDestination()
|
||||||
{
|
{
|
||||||
wxString strDest;
|
wxString strDest;
|
||||||
//scelta della directory di installazione di default
|
strDest = GetWindowsProgramDirectory();
|
||||||
#ifdef WIN32
|
|
||||||
TCHAR strFolder[MAX_PATH];
|
|
||||||
::SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, strFolder);
|
|
||||||
strDest = strFolder;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (strDest.IsEmpty())
|
if (strDest.IsEmpty())
|
||||||
{
|
{
|
||||||
|
@ -24,4 +24,6 @@ bool WarningBox(const wxString str);
|
|||||||
void CheckAndMakeDir(const wxString& strDir, const wxString& strMsg);
|
void CheckAndMakeDir(const wxString& strDir, const wxString& strMsg);
|
||||||
bool UnzipFile(const char* strZipFile, const char* strDestdir);
|
bool UnzipFile(const char* strZipFile, const char* strDestdir);
|
||||||
|
|
||||||
|
wxString GetWindowsProgramDirectory();
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -29,7 +29,7 @@ public:
|
|||||||
wxString Get(wxWindowID id) const;
|
wxString Get(wxWindowID id) const;
|
||||||
bool GetBool(wxWindowID id) const;
|
bool GetBool(wxWindowID id) const;
|
||||||
bool Set(wxWindowID id, const wxString& str);
|
bool Set(wxWindowID id, const wxString& str);
|
||||||
bool Set(wxWindowID id, const bool bul);
|
bool Set(wxWindowID id, bool bOk);
|
||||||
int GetSelection(wxWindowID id) const;
|
int GetSelection(wxWindowID id) const;
|
||||||
|
|
||||||
CampoWizardPage(wxWizard* parent);
|
CampoWizardPage(wxWizard* parent);
|
||||||
@ -1220,28 +1220,85 @@ public:
|
|||||||
|
|
||||||
bool CampoWizardPage9::TransferDataToWindow()
|
bool CampoWizardPage9::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
return Set(901, GetWizard().GetDesktopShortcut());
|
//setta il checkbox del link
|
||||||
|
Set(901, GetWizard().GetDesktopShortcut());
|
||||||
|
|
||||||
|
//controlla se il programma di teleassistenza e' gia' installato sul computer e decide se spuntare o meno..
|
||||||
|
//..il checkbox
|
||||||
|
bool bChkTeleass = true;
|
||||||
|
const wxString strWinProgDir = GetWindowsProgramDirectory();
|
||||||
|
wxString strUVNCDir = strWinProgDir + "/UltraVNC";
|
||||||
|
wxDir dirUVNCDir(strUVNCDir);
|
||||||
|
if (dirUVNCDir.Exists(strUVNCDir))
|
||||||
|
{
|
||||||
|
wxFileName fnFileToCheck(strUVNCDir, "winvnc");
|
||||||
|
fnFileToCheck.SetExt("exe");
|
||||||
|
if (fnFileToCheck.FileExists())
|
||||||
|
{
|
||||||
|
//controlla pure la versione...non si sa mai che ce ne sia una nuova!
|
||||||
|
//intanto controlla la data di creazione di quello su harddisk...
|
||||||
|
wxDateTime dtCreateInstalled;
|
||||||
|
fnFileToCheck.GetTimes(NULL, NULL, &dtCreateInstalled);
|
||||||
|
|
||||||
|
//..poi controlla la data del programma di installazione sul cd...
|
||||||
|
wxString strPathCD("../../teleassistenza/UltraVNC-101-Setup.exe");
|
||||||
|
wxDir dirDirCD(strPathCD);
|
||||||
|
if (dirDirCD.Exists(strPathCD))
|
||||||
|
{
|
||||||
|
wxFileName fnFileOnCD(strPathCD, "winvnc.exe");
|
||||||
|
if (fnFileOnCD.FileExists())
|
||||||
|
{
|
||||||
|
wxDateTime dtCreateCD;
|
||||||
|
fnFileOnCD.GetTimes(NULL, NULL, &dtCreateCD);
|
||||||
|
|
||||||
|
//se quello su CD e' piu' nuovo propone di installare la teleassistenza
|
||||||
|
if (dtCreateInstalled >= dtCreateCD)
|
||||||
|
bChkTeleass = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Set(902, bChkTeleass);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CampoWizardPage9::ForwardValidate()
|
bool CampoWizardPage9::ForwardValidate()
|
||||||
{
|
{
|
||||||
|
//link sul desktop
|
||||||
const bool bDesktopShortcut = GetBool(901);
|
const bool bDesktopShortcut = GetBool(901);
|
||||||
GetWizard().SetDesktopShortcut(bDesktopShortcut);
|
GetWizard().SetDesktopShortcut(bDesktopShortcut);
|
||||||
|
|
||||||
|
//installazione programma teleassistenza
|
||||||
|
const bool bInstallTeleass = GetBool(902);
|
||||||
|
if (bInstallTeleass)
|
||||||
|
{
|
||||||
|
wxString strPath("../../teleassistenza/UltraVNC-101-Setup.exe");
|
||||||
|
wxExecute(strPath, wxEXEC_SYNC);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
|
CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
|
||||||
{
|
{
|
||||||
wxString strTitle = wxT("Collegamenti");
|
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");
|
||||||
|
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);
|
||||||
|
|
||||||
wxCheckBox* pIcon = new wxCheckBox(this, 901, wxT("Creare l'icona sul desktop"));
|
wxCheckBox* pIcon = new wxCheckBox(this, 901, wxT("Creare l'icona sul desktop"));
|
||||||
GetSizer()->Add(pIcon, 0, wxALL, 0);
|
GetSizer()->Add(pIcon, 0, wxALL, 0);
|
||||||
|
|
||||||
GetSizer()->AddSpacer(5);
|
GetSizer()->AddSpacer(10);
|
||||||
|
|
||||||
|
wxCheckBox* pTeleass = new wxCheckBox(this, 902, wxT("Installare il programma di teleassistenza"));
|
||||||
|
GetSizer()->Add(pTeleass, 0, wxALL, 0);
|
||||||
|
|
||||||
//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);
|
||||||
@ -1455,6 +1512,7 @@ void CampoWizard::Set(wxWindowID id, const wxString str)
|
|||||||
pWnd->SetLabel(str);
|
pWnd->SetLabel(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//lunga litania di metodi per gettare e settare i valori tra le pagine
|
//lunga litania di metodi per gettare e settare i valori tra le pagine
|
||||||
void CampoWizard::SetDestinationPath(const wxString& path)
|
void CampoWizard::SetDestinationPath(const wxString& path)
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,8 @@ public:
|
|||||||
int GetSelection(wxWindowID id) const;
|
int GetSelection(wxWindowID id) const;
|
||||||
bool GetBool(wxWindowID id) const;
|
bool GetBool(wxWindowID id) const;
|
||||||
void Set(wxWindowID id, const wxString str);
|
void Set(wxWindowID id, const wxString str);
|
||||||
|
void SetBool(wxWindowID id, bool bOk);
|
||||||
|
|
||||||
//metodi per il passaggio tra le finestre dei parametri di installazione!
|
//metodi per il passaggio tra le finestre dei parametri di installazione!
|
||||||
void SetDestinationPath(const wxString& strPath);
|
void SetDestinationPath(const wxString& strPath);
|
||||||
const wxString& GetDestinationPath() const;
|
const wxString& GetDestinationPath() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user