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:
parent
606687c224
commit
04ce519fc4
@ -90,6 +90,7 @@ class CampoSetup : public wxApp
|
||||
CampoFrame* m_pMainFrame;
|
||||
wxLocale m_locale;
|
||||
wxString m_strSetupPath;
|
||||
bool m_bLurchWasRunning;
|
||||
|
||||
CampoWizard* m_pWizard;
|
||||
|
||||
@ -118,6 +119,7 @@ protected:
|
||||
bool CreateAutostartMode(const LurchMode iSrvAutostartMode, const wxString& strPath);
|
||||
bool StopLurch() const;
|
||||
bool StartLurch(const wxString& strPrgLocPath) const;
|
||||
bool LurchWasRunning() const { return m_bLurchWasRunning; }
|
||||
|
||||
//metodi di interfaccia con il registry di Windows
|
||||
wxString ReadRootRegistryKey(const wxString strKey) const;
|
||||
@ -350,20 +352,21 @@ bool CampoSetup::StopLurch() const
|
||||
bool CampoSetup::StartLurch(const wxString& strPrgLocPath) const
|
||||
{
|
||||
const wxString strValue = ReadLocalMachineRegistryKey("SYSTEM\\CurrentControlSet\\Services\\Lurch\\Parameters\\Application");
|
||||
bool ok = false;
|
||||
if (!strValue.IsEmpty())
|
||||
{
|
||||
wxString strExecService = GetFolderPath(CSIDL_SYSTEM);
|
||||
strExecService += "\\NET START Lurch";
|
||||
wxExecute(strExecService, wxEXEC_SYNC);
|
||||
ok = wxExecute(strExecService, wxEXEC_SYNC) > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString strPath = strPrgLocPath;
|
||||
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)
|
||||
@ -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
|
||||
{
|
||||
//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;
|
||||
wxArrayString asFilesList;
|
||||
size_t uFilesToCopy;
|
||||
@ -522,6 +519,7 @@ bool CampoSetup::UnzipModule(const wxString& strPrgLocPath, const wxString& strS
|
||||
}
|
||||
|
||||
//Adesso puo' far ripartire il server di chiavi
|
||||
const bool bLurch = strModule == "sr" && LurchWasRunning();
|
||||
if (bLurch)
|
||||
StartLurch(strPrgLocPath);
|
||||
|
||||
@ -1397,7 +1395,8 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
}
|
||||
|
||||
//controllo di eventuali Campo o servers attivi e conseguente interruzione dell'installazione
|
||||
if (LurchRunning())
|
||||
m_bLurchWasRunning = LurchRunning();
|
||||
if (m_bLurchWasRunning)
|
||||
{
|
||||
wxString msg;
|
||||
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 |
@ -679,12 +679,22 @@ static wxString CampoDecode(const wxString& data)
|
||||
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
|
||||
int FindReseller()
|
||||
{
|
||||
wxString strWorkingDir = wxFileName::GetCwd();
|
||||
strWorkingDir << "/oem.ini";
|
||||
CampoIniFile iniOemMain(strWorkingDir, "MAIN");
|
||||
CampoIniFile iniOemMain(FindOemIniPath(), "MAIN");
|
||||
const int nOem = iniOemMain.GetInt("OEM");
|
||||
return nOem;
|
||||
}
|
||||
@ -703,11 +713,11 @@ static void ReadOemIni()
|
||||
oem = 0;
|
||||
|
||||
//trovato il numero del reseller legge il paragrafo corrispondente in oem.ini
|
||||
wxString strWorkingDir = wxFileName::GetCwd();
|
||||
strWorkingDir << "/oem.ini";
|
||||
const wxString strOemIniPath = FindOemIniPath();
|
||||
|
||||
wxString strParagraph;
|
||||
strParagraph << "OEM_" << oem;
|
||||
CampoIniFile iniOem(strWorkingDir, strParagraph);
|
||||
CampoIniFile iniOem(strOemIniPath, strParagraph);
|
||||
|
||||
//raccatta le informazioni dal paragrafo corretto del produttore
|
||||
//prima quelle crittate
|
||||
|
Loading…
x
Reference in New Issue
Block a user