Patch level :4.0 setup
Files correlati : Ricompilazione Demo : [ ] Commento :modalita' di esecuzione server git-svn-id: svn://10.65.10.50/trunk@15550 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									7877dfa8db
								
							
						
					
					
						commit
						30e2be72e4
					
				
							
								
								
									
										105
									
								
								setup/Setup.cpp
									
									
									
									
									
								
							
							
						
						
									
										105
									
								
								setup/Setup.cpp
									
									
									
									
									
								
							@ -154,10 +154,12 @@ bool WriteRootRegistryKey(const wxChar* strKey, const wxString& strValue)
 | 
			
		||||
  return ok;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CreateDesktopIcon(const wxFileName& strExeFile)
 | 
			
		||||
bool CreateIcon(unsigned int csidl, const wxFileName& strExeFile)
 | 
			
		||||
{
 | 
			
		||||
  //csidl = CSIDL_COMMON_DESKTOPDIRECTORY = desktop
 | 
			
		||||
  //csidl = CSIDL_COMMON_STARTUP = all users esecuzione automatica
 | 
			
		||||
  TCHAR szDesktopPath[MAX_PATH] = wxT("");
 | 
			
		||||
	HRESULT hres = ::SHGetFolderPath(NULL, CSIDL_COMMON_DESKTOPDIRECTORY, NULL, SHGFP_TYPE_CURRENT, szDesktopPath);
 | 
			
		||||
	HRESULT hres = ::SHGetFolderPath(NULL, csidl, NULL, SHGFP_TYPE_CURRENT, szDesktopPath);
 | 
			
		||||
 | 
			
		||||
  if (szDesktopPath[0] != '\0')
 | 
			
		||||
  {
 | 
			
		||||
@ -199,6 +201,11 @@ bool CreateDesktopIcon(const wxFileName& strExeFile)
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CreateLerchService()
 | 
			
		||||
{
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void AssociateExtension(const wxFileName& strExeFile, const wxChar* strExt)
 | 
			
		||||
{
 | 
			
		||||
  // Register icon and application
 | 
			
		||||
@ -238,6 +245,7 @@ class CampoWizard : public wxWizard
 | 
			
		||||
  bool _bInstUseDict;       //installa/usa server diction
 | 
			
		||||
  wxString _strSrvDict;     //server diction
 | 
			
		||||
  
 | 
			
		||||
  unsigned int _uSrvAutostartMode;  //tipologia di esecuzione dei server
 | 
			
		||||
  bool _bDesktopShortcut;   //crea il link sul desktop
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
@ -278,6 +286,9 @@ public:
 | 
			
		||||
  void SetSrvDict(const wxString& strSrvDict);
 | 
			
		||||
  const wxString& GetSrvDict() const;
 | 
			
		||||
 | 
			
		||||
  void SetSrvAutostartMode(const int uSrvAutostartMode);
 | 
			
		||||
  const int GetSrvAutostartMode() const;
 | 
			
		||||
 | 
			
		||||
  void SetDesktopShortcut(const bool bDesktopShortcut);
 | 
			
		||||
  const bool GetDesktopShortcut() const;
 | 
			
		||||
 | 
			
		||||
@ -1114,6 +1125,8 @@ CampoWizardPage6::CampoWizardPage6(wxWizard* parent) : CampoWizardPage(parent)
 | 
			
		||||
/**********************************************************************************************************/
 | 
			
		||||
class CampoWizardPage7 : public CampoWizardPage
 | 
			
		||||
{
 | 
			
		||||
  wxRadioBox* m_pRadioBox;
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
  DECLARE_EVENT_TABLE();
 | 
			
		||||
  virtual bool ForwardValidate();
 | 
			
		||||
@ -1146,9 +1159,14 @@ void CampoWizardPage7::OnDirPick(wxCommandEvent& e)
 | 
			
		||||
 | 
			
		||||
void CampoWizardPage7::OnSrvClick(wxCommandEvent& e)
 | 
			
		||||
{
 | 
			
		||||
  //nome del server
 | 
			
		||||
  wxWindow* pWnd = FindWindowById(e.GetId() + 1);
 | 
			
		||||
  if (pWnd)
 | 
			
		||||
    pWnd->Enable(e.IsChecked());
 | 
			
		||||
  //tipo installazione server
 | 
			
		||||
  pWnd = FindWindowById(709);
 | 
			
		||||
  if (pWnd)
 | 
			
		||||
    pWnd->Enable(GetBool(705) || GetBool(707));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CampoWizardPage7::ForwardValidate()
 | 
			
		||||
@ -1193,6 +1211,14 @@ bool CampoWizardPage7::ForwardValidate()
 | 
			
		||||
  else
 | 
			
		||||
    GetWizard().SetSrvDict("");
 | 
			
		||||
 | 
			
		||||
  //..e loro modalita' di esecuzione
 | 
			
		||||
  if (bInstAuth || bInstDict)
 | 
			
		||||
  {
 | 
			
		||||
    GetWizard().SetSrvAutostartMode(m_pRadioBox->GetSelection());
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
    GetWizard().SetSrvAutostartMode(-1);
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1210,6 +1236,10 @@ CampoWizardPage7::CampoWizardPage7(wxWizard* parent) : CampoWizardPage(parent)
 | 
			
		||||
  strBody += wxT("Viene di default proposto il computer su cui si sta eseguendo l'installazione di APPNAME (localhost).</p>");
 | 
			
		||||
  strBody += wxT("<p><b>Gestore dizionari:</b> e' il software che permette di utilizzare APPNAME in lingue diverse dall'italiano. ");
 | 
			
		||||
  strBody += wxT("Per l'installazione di questo software viene di default proposto il computer su cui si sta eseguendo l'installazione di APPNAME (localhost).</p>");
 | 
			
		||||
  strBody += wxT("<p><b>Modalita' di esecuzione programmi di gestione</b><br>");
 | 
			
		||||
  strBody += wxT("<u>Come servizi:</u> i programmi di gestione vengono eseguiti come servizi di Windows; questa e' la modalita' consigliata ed e' obbligatoria in caso di installazione con Windows 2003<br>");
 | 
			
		||||
  strBody += wxT("<u>Nel menu esecuzione automatica:</u> i programmi di gestione vengono eseguiti automaticamente al primo accesso di un utente al server di APPNAME; usare questa modalita' solo nell'impossibilita' di utilizzare la precedente</p>");
 | 
			
		||||
 | 
			
		||||
  SetHTMLText(strTitle, strBody);
 | 
			
		||||
 | 
			
		||||
  //griglia per sistemare i campi
 | 
			
		||||
@ -1259,6 +1289,20 @@ CampoWizardPage7::CampoWizardPage7(wxWizard* parent) : CampoWizardPage(parent)
 | 
			
		||||
  wxTextCtrl* tcDiction = new wxTextCtrl(this, 708, "localhost", wxDefaultPosition, wxSize(96,-1));
 | 
			
		||||
  tcDiction->Disable();
 | 
			
		||||
  gbsSizer->Add(tcDiction, wxGBPosition(3, 2));
 | 
			
		||||
 | 
			
		||||
  //quinta riga della griglia
 | 
			
		||||
  //radiobutton con i tipi di installazione
 | 
			
		||||
  wxArrayString asInstType;
 | 
			
		||||
  asInstType.Add("Come servizi (consigliato)");
 | 
			
		||||
  asInstType.Add("Nel menu esecuzione automatica");
 | 
			
		||||
 | 
			
		||||
  m_pRadioBox = new wxRadioBox(this, 709, "Modalita' di esecuzione gestori", wxDefaultPosition, 
 | 
			
		||||
                             wxDefaultSize, asInstType, 0, wxRA_SPECIFY_COLS);
 | 
			
		||||
  //setta il default a "come servizio"
 | 
			
		||||
  m_pRadioBox->SetSelection(0);
 | 
			
		||||
  m_pRadioBox->Disable();
 | 
			
		||||
  gbsSizer->Add(m_pRadioBox, wxGBPosition(4, 1));
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1362,7 +1406,7 @@ bool CampoWizardPage8::ForwardValidate()
 | 
			
		||||
    GetWizard().SetInstUseAuth(bUseAuth);
 | 
			
		||||
    const wxString strSrvAuth = Get(808);
 | 
			
		||||
    if (strSrvAuth.IsEmpty())
 | 
			
		||||
      return ErrorBox("Specificare il server gestore delle autorizzazioni!");
 | 
			
		||||
      return ErrorBox("Specificare il computer gestore delle autorizzazioni!");
 | 
			
		||||
    GetWizard().SetSrvAuth(strSrvAuth);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
@ -1374,7 +1418,7 @@ bool CampoWizardPage8::ForwardValidate()
 | 
			
		||||
    GetWizard().SetInstUseDict(bUseDict);
 | 
			
		||||
    const wxString strSrvDict = Get(810);
 | 
			
		||||
    if (strSrvDict.IsEmpty())
 | 
			
		||||
      return ErrorBox("Specificare il server gestore dei dizionari!");
 | 
			
		||||
      return ErrorBox("Specificare il computer gestore dei dizionari!");
 | 
			
		||||
    GetWizard().SetSrvDict(strSrvDict);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
@ -1392,6 +1436,11 @@ CampoWizardPage8::CampoWizardPage8(wxWizard* parent) : CampoWizardPage(parent)
 | 
			
		||||
  strBody += wxT("E' la cartella di programmi condivisa dal server precedentemente installato.</p>");
 | 
			
		||||
  strBody += wxT("<p>Digitare nel campo <b>'Cartella remota dati da utilizzare'</b> il percorso completo della cartella di rete dove sono i dati. ");
 | 
			
		||||
  strBody += wxT("E' la cartella dei dati condivisa dal server precedentemente installato.</p>");
 | 
			
		||||
  strBody += wxT("<p><b>Gestore autorizzazioni:</b> e' il computer gestore di una chiave di protezione hardware multiutenza condivisa in rete. ");
 | 
			
		||||
  strBody += wxT("Generalmente e' il computer che agente da server di APPNAME e su cui <u>deve essere montata la chiave di protezione multiutenza.</u></p>");
 | 
			
		||||
  strBody += wxT("<p><b>Gestore dizionari:</b> e' il computer gestore dei dizionari di APPNAME in lingue diverse dall'italiano. ");
 | 
			
		||||
  strBody += wxT("Generalmente e' il computer che agente da server di APPNAME.</p>");
 | 
			
		||||
 
 | 
			
		||||
  SetHTMLText(strTitle, strBody);
 | 
			
		||||
 | 
			
		||||
  //griglia per sistemare i campi
 | 
			
		||||
@ -1458,7 +1507,7 @@ CampoWizardPage8::CampoWizardPage8(wxWizard* parent) : CampoWizardPage(parent)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************************************************/
 | 
			
		||||
//    9   pagina con la creazione icona sul desktop
 | 
			
		||||
//    9   pagina con la creazione icona sul desktop e lanciatore del lerch
 | 
			
		||||
/**********************************************************************************************************/
 | 
			
		||||
class CampoWizardPage9 : public CampoWizardPage
 | 
			
		||||
{
 | 
			
		||||
@ -1486,8 +1535,8 @@ CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
 | 
			
		||||
{
 | 
			
		||||
  wxString strTitle = wxT("Collegamenti");
 | 
			
		||||
  wxString strBody;
 | 
			
		||||
  strBody += wxT("E' possibile creare l'icona di APPNAME sul desktop ");
 | 
			
		||||
  //strBody += wxT("ed associare l'estensione <b>.caz<b> al programma.");
 | 
			
		||||
  strBody += wxT("<p>E' possibile creare l'icona di APPNAME sul desktop </p>");
 | 
			
		||||
 | 
			
		||||
  SetHTMLText(strTitle, strBody);
 | 
			
		||||
 | 
			
		||||
  wxCheckBox* pIcon = new wxCheckBox(this, 901, wxT("Creare l'icona sul desktop"));
 | 
			
		||||
@ -1513,6 +1562,7 @@ class CampoWizardPage10 : public CampoWizardPage
 | 
			
		||||
  wxString _strDataPath;
 | 
			
		||||
  wxString _strSrvAuth;
 | 
			
		||||
  wxString _strSrvDict;
 | 
			
		||||
  unsigned int _uSrvAutostartMode;
 | 
			
		||||
  bool _bInstDemoData;
 | 
			
		||||
  bool _bDesktopShortcut;
 | 
			
		||||
 | 
			
		||||
@ -1536,6 +1586,7 @@ bool CampoWizardPage10::TransferDataToWindow()
 | 
			
		||||
    _strDataPath = cw.GetDataPath();
 | 
			
		||||
    _strSrvAuth = cw.GetSrvAuth();
 | 
			
		||||
    _strSrvDict = cw.GetSrvDict();
 | 
			
		||||
    _uSrvAutostartMode = cw.GetSrvAutostartMode();
 | 
			
		||||
    break;
 | 
			
		||||
  case 2: //client
 | 
			
		||||
    _strInstallType = "Client";
 | 
			
		||||
@ -1592,7 +1643,7 @@ bool CampoWizardPage10::TransferDataToWindow()
 | 
			
		||||
    strBody += wxT("<p>Cartella dati da creare:  ");
 | 
			
		||||
    strBody += wxT(Bold(_strDataPath) + "</p>");
 | 
			
		||||
  }
 | 
			
		||||
  //installazione servers
 | 
			
		||||
  //installazione servers...
 | 
			
		||||
  if (!_strSrvAuth.IsEmpty())
 | 
			
		||||
  {
 | 
			
		||||
    strBody += wxT("<p>Computer gestore delle autorizzazioni:  ");
 | 
			
		||||
@ -1603,12 +1654,22 @@ bool CampoWizardPage10::TransferDataToWindow()
 | 
			
		||||
    strBody += wxT("<p>Computer gestore dei dizionari:  ");
 | 
			
		||||
    strBody += wxT(Bold(_strSrvDict) + "</p>");
 | 
			
		||||
  }
 | 
			
		||||
  //...e loro modalita' di lancio (solo installazione server!)
 | 
			
		||||
  if (_uInstallType == 1 && _uSrvAutostartMode >= 0)
 | 
			
		||||
  {
 | 
			
		||||
    strBody += wxT("<p>Modalita' di esecuzione dei programmi di gestione:  ");
 | 
			
		||||
    if (_uSrvAutostartMode == 0)
 | 
			
		||||
      strBody += wxT(Bold("Come servizi") + "</p>");
 | 
			
		||||
    else
 | 
			
		||||
      strBody += wxT(Bold("Nel menu esecuzione automatica") + "</p>");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  //installazione dati demo (solo in postazione singola)
 | 
			
		||||
  if (_uInstallType == 0 && _bInstDemoData)
 | 
			
		||||
    strBody += wxT("<p>Installazione area dati dimostrativa</p>");
 | 
			
		||||
 | 
			
		||||
  if (_bDesktopShortcut)
 | 
			
		||||
    strBody += wxT("<p>Creazione dellicona sul desktop</p>");
 | 
			
		||||
    strBody += wxT("<p>Creazione dell' icona sul desktop</p>");
 | 
			
		||||
 | 
			
		||||
  SetHTMLText(strTitle, strBody);
 | 
			
		||||
 | 
			
		||||
@ -1783,6 +1844,16 @@ const wxString& CampoWizard::GetSrvDict() const
 | 
			
		||||
  return _strSrvDict;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CampoWizard::SetSrvAutostartMode(const int uSrvAutostartMode)
 | 
			
		||||
{
 | 
			
		||||
  _uSrvAutostartMode = uSrvAutostartMode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const int CampoWizard::GetSrvAutostartMode() const
 | 
			
		||||
{
 | 
			
		||||
  return _uSrvAutostartMode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CampoWizard::SetInstDemoData(const bool bInstDemoData)
 | 
			
		||||
{
 | 
			
		||||
  _bInstDemoData = bInstDemoData;
 | 
			
		||||
@ -1936,7 +2007,21 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
 | 
			
		||||
    const wxFileName strExe(strDest, wxT("ba0.exe"));
 | 
			
		||||
    const bool bDesktopShortcut = pWizard->GetDesktopShortcut();
 | 
			
		||||
    if (bDesktopShortcut)
 | 
			
		||||
      CreateDesktopIcon(strExe);
 | 
			
		||||
      CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe);
 | 
			
		||||
    
 | 
			
		||||
    //solo se installa campo server
 | 
			
		||||
    const unsigned int uInstallationType = pWizard->GetInstallationType();
 | 
			
		||||
    //se sta installando campo in postazione server e deve installare un gestore di servizi
 | 
			
		||||
    if (uInstallationType == 1)
 | 
			
		||||
    {
 | 
			
		||||
      const bool bInstallLerch = pWizard->GetInstUseAuth() | pWizard->GetInstUseDict();
 | 
			
		||||
      if (bInstallLerch)
 | 
			
		||||
      {
 | 
			
		||||
        CreateLerchService();
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    //questo e' un esempio di associazione automatica di estensione file
 | 
			
		||||
    //if (pWizard->GetBool(bAssocExtension))
 | 
			
		||||
    //  AssociateExtension(strExe, wxT(".caz"));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user