Patch level :10.0 cd 284

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :fatto funzionare il riavvio server di chiavi!!! ridimensionato il logo orrendo di tassan


git-svn-id: svn://10.65.10.50/trunk@18743 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2009-04-21 09:21:08 +00:00
parent 606687c224
commit 04ce519fc4
3 changed files with 25 additions and 16 deletions

View File

@ -90,6 +90,7 @@ class CampoSetup : public wxApp
CampoFrame* m_pMainFrame; CampoFrame* m_pMainFrame;
wxLocale m_locale; wxLocale m_locale;
wxString m_strSetupPath; wxString m_strSetupPath;
bool m_bLurchWasRunning;
CampoWizard* m_pWizard; CampoWizard* m_pWizard;
@ -118,6 +119,7 @@ protected:
bool CreateAutostartMode(const LurchMode iSrvAutostartMode, const wxString& strPath); bool CreateAutostartMode(const LurchMode iSrvAutostartMode, const wxString& strPath);
bool StopLurch() const; bool StopLurch() const;
bool StartLurch(const wxString& strPrgLocPath) const; bool StartLurch(const wxString& strPrgLocPath) const;
bool LurchWasRunning() const { return m_bLurchWasRunning; }
//metodi di interfaccia con il registry di Windows //metodi di interfaccia con il registry di Windows
wxString ReadRootRegistryKey(const wxString strKey) const; wxString ReadRootRegistryKey(const wxString strKey) const;
@ -350,20 +352,21 @@ bool CampoSetup::StopLurch() const
bool CampoSetup::StartLurch(const wxString& strPrgLocPath) const bool CampoSetup::StartLurch(const wxString& strPrgLocPath) const
{ {
const wxString strValue = ReadLocalMachineRegistryKey("SYSTEM\\CurrentControlSet\\Services\\Lurch\\Parameters\\Application"); const wxString strValue = ReadLocalMachineRegistryKey("SYSTEM\\CurrentControlSet\\Services\\Lurch\\Parameters\\Application");
bool ok = false;
if (!strValue.IsEmpty()) if (!strValue.IsEmpty())
{ {
wxString strExecService = GetFolderPath(CSIDL_SYSTEM); wxString strExecService = GetFolderPath(CSIDL_SYSTEM);
strExecService += "\\NET START Lurch"; strExecService += "\\NET START Lurch";
wxExecute(strExecService, wxEXEC_SYNC); ok = wxExecute(strExecService, wxEXEC_SYNC) > 0;
} }
else else
{ {
wxString strPath = strPrgLocPath; wxString strPath = strPrgLocPath;
strPath += "/servers/lurch.exe"; strPath += "/servers/lurch.exe";
wxExecute(strPath, wxEXEC_ASYNC); ok = wxExecute(strPath, wxEXEC_ASYNC) > 0;
} }
return true; return ok;
} }
bool CampoSetup::CreateAutostartMode(const LurchMode iSrvAutostartMode, const wxString& strPath) bool CampoSetup::CreateAutostartMode(const LurchMode iSrvAutostartMode, const wxString& strPath)
@ -483,12 +486,6 @@ void CampoSetup::UpdateInstallIni(const wxString strSourcePath, const wxString s
bool CampoSetup::UnzipModule(const wxString& strPrgLocPath, const wxString& strSrc, const wxString& strModule) const bool CampoSetup::UnzipModule(const wxString& strPrgLocPath, const wxString& strSrc, const wxString& strModule) const
{ {
//Attenzione! Se c'e' il server di chiavi in funzione va fermato prima di procedere!!!!
const bool bLurch = strModule == "sr" && LurchRunning();
if (bLurch)
StopLurch();
bool ok = false; bool ok = false;
wxArrayString asFilesList; wxArrayString asFilesList;
size_t uFilesToCopy; size_t uFilesToCopy;
@ -522,6 +519,7 @@ bool CampoSetup::UnzipModule(const wxString& strPrgLocPath, const wxString& strS
} }
//Adesso puo' far ripartire il server di chiavi //Adesso puo' far ripartire il server di chiavi
const bool bLurch = strModule == "sr" && LurchWasRunning();
if (bLurch) if (bLurch)
StartLurch(strPrgLocPath); StartLurch(strPrgLocPath);
@ -1397,7 +1395,8 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
} }
//controllo di eventuali Campo o servers attivi e conseguente interruzione dell'installazione //controllo di eventuali Campo o servers attivi e conseguente interruzione dell'installazione
if (LurchRunning()) m_bLurchWasRunning = LurchRunning();
if (m_bLurchWasRunning)
{ {
wxString msg; wxString msg;
msg << "Per poter aggiornare/installare il programma " << PRODUCT msg << "Per poter aggiornare/installare il programma " << PRODUCT

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 387 KiB

View File

@ -679,12 +679,22 @@ static wxString CampoDecode(const wxString& data)
return tmp; return tmp;
} }
static wxString FindOemIniPath()
{
wxString strWorkingDir = wxFileName::GetCwd();
strWorkingDir.MakeLower();
if (!strWorkingDir.EndsWith("setup"))
strWorkingDir << "/setup";
strWorkingDir << "/oem.ini";
return strWorkingDir;
}
//trova il numero del reseller //trova il numero del reseller
int FindReseller() int FindReseller()
{ {
wxString strWorkingDir = wxFileName::GetCwd(); CampoIniFile iniOemMain(FindOemIniPath(), "MAIN");
strWorkingDir << "/oem.ini";
CampoIniFile iniOemMain(strWorkingDir, "MAIN");
const int nOem = iniOemMain.GetInt("OEM"); const int nOem = iniOemMain.GetInt("OEM");
return nOem; return nOem;
} }
@ -703,11 +713,11 @@ static void ReadOemIni()
oem = 0; oem = 0;
//trovato il numero del reseller legge il paragrafo corrispondente in oem.ini //trovato il numero del reseller legge il paragrafo corrispondente in oem.ini
wxString strWorkingDir = wxFileName::GetCwd(); const wxString strOemIniPath = FindOemIniPath();
strWorkingDir << "/oem.ini";
wxString strParagraph; wxString strParagraph;
strParagraph << "OEM_" << oem; strParagraph << "OEM_" << oem;
CampoIniFile iniOem(strWorkingDir, strParagraph); CampoIniFile iniOem(strOemIniPath, strParagraph);
//raccatta le informazioni dal paragrafo corretto del produttore //raccatta le informazioni dal paragrafo corretto del produttore
//prima quelle crittate //prima quelle crittate