diff --git a/setup/Setup.cpp b/setup/Setup.cpp index e8942840a..c4b046e15 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -1227,7 +1227,21 @@ void CampoSetup::NormalSetup() { const wxString strSetupCDPath = strPrgCDPath + "/setup"; const wxString strSetupLocPath = strPrgLocPath + "/setup"; + //Procedura di salvataggio del corrente OEM (reseller) del prg già installato; in questo modo anche.. + //..mandando un CD AGA (che generalmente funziona!) ad un cliente di un distributore non AGA, il reseller.. + //..a video non cambia. Per cambiare reseller si dovrà intervenire a mano sull'oem.ini cambiando il valore.. + //..di OEM dopo l'installazione + const wxString strOemLocPath = strSetupLocPath + "/oem.ini"; + CampoIniFile CampoIniOem(strOemLocPath, "MAIN"); + const int nOldOem = CampoIniOem.GetInt("OEM"); + //svuota proprio la directory setup in modo da non coservare files indesiderati + EmptyOutDir(strOemLocPath); + //copia la directory setup da CD a locale CopyDir(strSetupCDPath, strSetupLocPath); + //rimette a posto la candela...cioè, il reseller + CampoIniOem.Set("OEM", nOldOem); + //..Fine dell'aggiornamento della cartella setup + UnzipModule(strPrgLocPath, strPrgCDPath, "sy"); UnzipModule(strPrgLocPath, strPrgCDPath, "sr"); } @@ -1418,6 +1432,9 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e)) m_bLurchWasRunning = LurchRunning(); if (m_bLurchWasRunning) { + //cazzone + const unsigned short sCazzoni = ServerLoggedUsers("127.0.0.1"); + //fine cazzone wxString msg; msg << "Per poter aggiornare/installare il programma " << PRODUCT << " deve temporaneamente essere disattivato il gestore delle licenze!\n" diff --git a/setup/gestione_lurch_by_setup.doc b/setup/gestione_lurch_by_setup.doc index 19bd0a3b5..c805b914b 100755 Binary files a/setup/gestione_lurch_by_setup.doc and b/setup/gestione_lurch_by_setup.doc differ diff --git a/setup/key.cpp b/setup/key.cpp index 0ae353b8b..a8aa7bc79 100755 --- a/setup/key.cpp +++ b/setup/key.cpp @@ -211,7 +211,7 @@ static unsigned short InquireSocketNumber(wxSocketClient& sc, const wxString& st //metodo per sapere dal server di chiave quanti sono gli utonti connessi;non funziona finchè ai servers non.. //..viene aggiunto il metodo NumberActiveUsers (è qui come segnaposto futuro) -unsigned short InquireActiveUsers(const wxString& strSrvName) +unsigned short ServerLoggedUsers(const wxString& strSrvName) { unsigned short nUtonti = 0; wxIPV4address ip; @@ -220,8 +220,8 @@ unsigned short InquireActiveUsers(const wxString& strSrvName) wxSocketClient& sc = m_bordello.Zoccola(ip); if (sc.IsConnected() || sc.Connect(ip)) //il computer remoto risponde { - // quanti utonti sono appesi? - nUtonti = InquireSocketNumber(sc, "NumberActiveUsers()"); + // quante licenze sono loggate al momento (utonti connessi) + nUtonti = InquireSocketNumber(sc, "DongleLoggedLicenses"); } } return nUtonti; diff --git a/setup/key.h b/setup/key.h index 79001a88d..60ebc661f 100755 --- a/setup/key.h +++ b/setup/key.h @@ -8,6 +8,7 @@ void EncodeEutronPassword(char* str); unsigned short EutronLogin(int& year); unsigned short ServerLogin(int& year, wxString& strSrvName); +unsigned short ServerLoggedUsers(const wxString& strSrvName); bool DictionaryLogin(const wxString& strSrvName); #endif \ No newline at end of file diff --git a/setup/utils.cpp b/setup/utils.cpp index e91454638..b19cccc36 100755 --- a/setup/utils.cpp +++ b/setup/utils.cpp @@ -420,7 +420,7 @@ wxString CampoIniFile::Get(const wxString strVariable) const { wxString strOutString; char* buffer = strOutString.GetWriteBuf(256); - GetPrivateProfileString(m_strGroup, strVariable, "", buffer, 256, m_strIniName); + ::GetPrivateProfileString(m_strGroup, strVariable, "", buffer, 256, m_strIniName); strOutString.UngetWriteBuf(); //sblocca la memoria senno' la stringa resta per sempre!!! return strOutString; @@ -439,14 +439,14 @@ int CampoIniFile::GetInt(const wxString strVariable) const bool CampoIniFile::Set(const wxString strVariable, const wxString strValue) { - return WritePrivateProfileString(m_strGroup, strVariable, strValue, m_strIniName) != 0; + return ::WritePrivateProfileString(m_strGroup, strVariable, strValue, m_strIniName) != 0; } bool CampoIniFile::Set(const wxString strVariable, const int uValue) { wxString strValue; strValue << uValue; - return WritePrivateProfileString(m_strGroup, strVariable, strValue, m_strIniName) != 0; + return ::WritePrivateProfileString(m_strGroup, strVariable, strValue, m_strIniName) != 0; } //costruttore