diff --git a/setup/Setup.cpp b/setup/Setup.cpp index c3c106803..45481cf4b 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -520,9 +520,7 @@ bool CampoSetup::UnzipModule(const wxString& strPrgLocPath, const wxString& strS //ordina le patch per numero crescente ma mette davanti a tutte il pacco (sysinst1) asFilesList.Sort(PatchCompare); for (size_t i = 0; i < uFilesToCopy; i++) - { UnzipFile(asFilesList[i] , strPrgLocPath); - } //aggiorna l'install.ini in base al numero di patch e versione dell'ultimo file zip di sistema //ci vuole un giro allucinogeno per trasformare il .zip in .ini e togliere quel cazzo di 1 in fondo @@ -893,10 +891,15 @@ void CampoSetup::DiskUpdate() //aggiornamento dei moduli SY ed SR da disco //il modulo SY va aggiornato comunque +#ifndef NDEBUG + strRemotePath = "c:/campo11/cd/program/"; + DiskUpdateModule(strLocalPath, strRemotePath, "li"); +#else DiskUpdateModule(strLocalPath, strRemotePath, "sy"); //il modulo SR va aggiornato solo se usato (si sta aggiornando il cpu con il gestore delle chiavi) if (m_bLurchWasRunning) DiskUpdateModule(strLocalPath, strRemotePath, "sr"); +#endif wxSetWorkingDirectory(strLocalPath); wxExecute("ba1 -6 /uADMIN"); @@ -1533,9 +1536,9 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e)) //aggiornamento da disco,client,web if (strCommand == "-ud") - DiskUpdate(); + DiskUpdate(); else if (strCommand == "-uc") - ClientUpdate(); + ClientUpdate(); else if (strCommand == "-uw") InternetUpdate(); } diff --git a/setup/dninst.txt b/setup/dninst.txt index 127d51f1c..9036a6308 100755 --- a/setup/dninst.txt +++ b/setup/dninst.txt @@ -1,4 +1,4 @@ -2101 +2121 [5] *=31-12-2010 Owner=PrassiNapoli diff --git a/setup/key.cpp b/setup/key.cpp index ff44c6dd3..ec5bf6427 100755 --- a/setup/key.cpp +++ b/setup/key.cpp @@ -309,8 +309,16 @@ unsigned short ServerLogin(int& year, wxString& strSrvName) return serno; } - bool DictionaryLogin(const wxString& strSrvName) { return false; } + +/////////////////////////////// +// Gestione chiave SSA // +/////////////////////////////// + +unsigned short SSALogin(int& year) +{ + return 0xFFFF; +} diff --git a/setup/key.h b/setup/key.h index 60ebc661f..64205a4cf 100755 --- a/setup/key.h +++ b/setup/key.h @@ -7,6 +7,8 @@ unsigned short HardlockLogin(int& year); void EncodeEutronPassword(char* str); unsigned short EutronLogin(int& year); +unsigned short SSALogin(int& year); + unsigned short ServerLogin(int& year, wxString& strSrvName); unsigned short ServerLoggedUsers(const wxString& strSrvName); bool DictionaryLogin(const wxString& strSrvName); diff --git a/setup/oem.ini b/setup/oem.ini index 1fc790a03..3a7099789 100755 --- a/setup/oem.ini +++ b/setup/oem.ini @@ -1,5 +1,5 @@ [MAIN] -OEM = 0 +OEM = 1 [OEM_0] Administrator = ’—’Œ @@ -12,7 +12,7 @@ Password = Product = ””’“žf·›·¦¿ÀÁ‰ØÓ Reseller = ’š†c¸´¸œ³´¢”ÒÑÇå›Ó¢Õ‘ Themes = aga_themes.ini -Web = www.aga.it/release100/ +Web = http://85.18.53.183/release110/ [OEM_1] Administrator = ’—’Œ @@ -24,7 +24,7 @@ Password = Product = ””’“žf·›·¦¿ÀÁ‰ØÓ Reseller = ¤¼·¬¾f»›¹ØäÖДÒÑÇ×ÔÝÜ×ÆÎ@æ—ã¢Æ› Themes = sirio_themes.ini -Web = http://patch.campoenterprise.com/PatchV1000/ +Web = http://85.18.53.183/release110/ [OEM_2] Administrator = ’—’Œ @@ -36,19 +36,10 @@ Password = Product = ”¢Œˆ’•r€¬»¨» Reseller = ¤¼·¬¾f»›¹ØäÖДÒÑÇ×ÔÝÜ×ÆÎ@æ—ã¢Æ› Themes = silav_themes.ini -Web = http://patch.campoenterprise.com/PatchV1000/ +Web = http://85.18.53.183/release110/ [OEM_3] -Administrator = ’—’Œ -Icon = geisoft.ico -Licence = geisoft_licenza.htm -Logo = geisoft_logo.jpg -Name = ””’“ž -Password = ²·s°¸´ -Product = ””’“ž -Reseller = ˜¸®c¢µ¸¡gØ—’Û” -Themes = geisoft_themes.ini -Web = www.aga.it/release100/ +Dismissed=22/09/2011 [OEM_4] Administrator = ’—’Œ @@ -60,19 +51,10 @@ Password = Product = ”¢Œˆ’•r€¬»¨» Reseller = ¥¸¹µ°©Æ–Ç…ç Ó‘à— Themes = tetra_themes.ini -Web = http://patch.campoenterprise.com/PatchV1000/ +Web = http://85.18.53.183/release110/ [OEM_5] -Administrator = ’—’Œ -Icon = aga.ico -Licence = procom_licenza.htm -Logo = aga_logo.jpg -Name = ””’“ž -Password = ²·s°¸´ -Product = ””’“žf·›·¦¿ÀÁ‰ØÓ -Reseller = ¡¥”†ž“ -Themes = aga_themes.ini -Web = www.aga.it/release100/ +Dismissed=22/09/2011 [OEM_6] Administrator = ’—’Œ @@ -85,7 +67,7 @@ Password = Product = ””’“žf·›·¦¿ÀÁ‰ØÓ Reseller = ¤¢ˆ’–‹ŸMÆ}µ}³s Themes = aga_themes.ini -Web = www.aga.it/release100/ +Web = http://85.18.53.183/release110/ [OEM_7] Administrator = ’—’Œ @@ -98,7 +80,7 @@ Password = Product = ””’“žf·›·¦¿ÀÁ‰ØÓ Reseller = ’š†c¸´¸œ³´¢”ÒÑÇå›Ó¢Õ‘ Themes = aga_themes.ini -Web = www.aga.it/release100/ +Web = http://85.18.53.183/release110/ [OEM_8] Administrator = ’—’Œ @@ -111,4 +93,4 @@ Password = Product = ””’“žf·›·¦¿ÀÁ‰ØÓ Reseller = ’š†c¸´¸œ³´¢”ÒÑÇå›Ó¢Õ‘ Themes = aga_themes.ini -Web = www.aga.it/release100/ \ No newline at end of file +Web = http://85.18.53.183/release110/ diff --git a/setup/utils.cpp b/setup/utils.cpp index 6dcfddb0a..374d6edbc 100755 --- a/setup/utils.cpp +++ b/setup/utils.cpp @@ -592,7 +592,7 @@ static size_t GetZipList(const char* strZipFile, wxArrayString& aFiles) -bool UnzipFile(const char* strSrcFile, const char* strDestDir) +bool UnzipFile(const wxString& strSrcFile, const wxString& strDestDir) { //se il file da unzippare è su un disco remoto, lo copia in locale per unzipparlo e alla fine elimina la copia.. //..è importante per velocizzare l'aggiornamento da disco @@ -643,29 +643,34 @@ bool UnzipFile(const char* strSrcFile, const char* strDestDir) } else { - //wxZipInputStream fin(strZipFile, strFileName); - wxFileInputStream fstr(strZipFile); + //wxZipInputStream fin(strZipFile, strFileName); // 2.6 compatibility is gone! + wxFFileInputStream fstr(strZipFile); wxZipInputStream fin(fstr); - wxZipEntry ze(strFileName); - fin.OpenEntry(ze); - wxString strOutFile = strDestDir; - if (!wxEndsWithPathSeparator(strOutFile) && !wxIsPathSeparator(strFileName[0])) - strOutFile += wxFILE_SEP_PATH; - strOutFile += strFileName; + wxZipEntry* entry = NULL; + do entry = fin.GetNextEntry(); + while (entry && entry->GetInternalName() != strFileName); - wxString strPath; - ::wxSplitPath(strOutFile, &strPath, NULL, NULL); - CheckAndMakeDir(strPath, wxEmptyString); + if (entry && fin.OpenEntry(*entry)) + { + wxString strOutFile = strDestDir; + if (!wxEndsWithPathSeparator(strOutFile) && !wxIsPathSeparator(strFileName[0])) + strOutFile += wxFILE_SEP_PATH; + strOutFile += strFileName; + + wxString strPath; + ::wxSplitPath(strOutFile, &strPath, NULL, NULL); + CheckAndMakeDir(strPath, wxEmptyString); - wxFileOutputStream fout(strOutFile); - fout.Write(fin); - fout.Close(); + wxFileOutputStream fout(strOutFile); + fout.Write(fin); + fout.Close(); - fin.CloseEntry(); + fin.CloseEntry(); - if (strOutFile.EndsWith("res.zip")) - UnzipFile(strOutFile , strPath); + if (strOutFile.EndsWith("res.zip")) + UnzipFile(strOutFile , strPath); + } } } diff --git a/setup/utils.h b/setup/utils.h index 537258ef6..7a89297e6 100755 --- a/setup/utils.h +++ b/setup/utils.h @@ -73,7 +73,7 @@ bool YesNoBox(const wxString str); //trattamento files void CheckAndMakeDir(const wxString& strDir, const wxString& strMsg); -bool UnzipFile(const char* strZipFile, const char* strDestdir); +bool UnzipFile(const wxString& strZipFile, const wxString& strDestdir); bool CopiaFile(const wxString& file1, const wxString& file2); void NormalizeSlash(wxString& strFileName); diff --git a/setup/wizard.cpp b/setup/wizard.cpp index 1c614a5e0..bd6293139 100755 --- a/setup/wizard.cpp +++ b/setup/wizard.cpp @@ -584,7 +584,7 @@ CampoWizardPage3::CampoWizardPage3(wxWizard* parent) : CampoWizardPage(parent) if (asCampi.IsEmpty()) { strTitle += wxT("Scelta Installazione"); - strBody += wxT("

E' possibile INSTALLARE PRODUCT in un nuovo direttorio.

"); + strBody += wxT("

E' possibile INSTALLARE PRODUCT in una nuova cartella.

"); asCampi.Add("Nuova installazione"); //voce di nuova installazione! m_pRadioBox = new wxRadioBox(this, 301, "Installazione del software", wxDefaultPosition, @@ -594,9 +594,9 @@ CampoWizardPage3::CampoWizardPage3(wxWizard* parent) : CampoWizardPage(parent) else { strTitle += wxT("Scelta Aggiornamento / Installazione"); - strBody += wxT("

E' possibile AGGIORNARE (scelta consigliata) una installazione di PRODUCT gia' presente oppure INSTALLARE in un nuovo direttorio.

"); - strBody += wxT("

Selezionare l'opzione desiderata nel riquadro sottostante. In caso di piu' di una installazione presente sul computer "); - strBody += wxT("sara' preselezionata la eventuale installazione di tipo Server o Standard, in quanto deve essere aggiornata per prima! "); + strBody += wxT("

E' possibile AGGIORNARE (scelta consigliata) una installazione di PRODUCT gia' presente oppure INSTALLARE in una nuova cartella.

"); + strBody += wxT("

Selezionare l'opzione desiderata nel riquadro sottostante. In caso di più d'una installazione presente sul computer "); + strBody += wxT("sarà preselezionata la eventuale installazione di tipo Server o Standard, in quanto deve essere aggiornata per prima! "); strBody += wxT("

In questo caso procedere all'aggiornamento di tale installazione Server e aggiornare successivamente le postazioni client "); strBody += wxT("lanciando il programma PRODUCT su di esse

"); @@ -625,6 +625,7 @@ protected: void OnHLPick(wxCommandEvent& e); void OnEUPick(wxCommandEvent& e); void OnSRPick(wxCommandEvent& e); + void OnSSAPick(wxCommandEvent& e); virtual bool ForwardValidate(); virtual bool TransferDataToWindow(); @@ -643,6 +644,7 @@ BEGIN_EVENT_TABLE(CampoWizardPage4, CampoWizardPage) EVT_BUTTON(401, OnHLPick) EVT_BUTTON(402, OnEUPick) EVT_BUTTON(403, OnSRPick) + EVT_BUTTON(405, OnSSAPick) END_EVENT_TABLE() void CampoWizardPage4::OnHLPick(wxCommandEvent& e) @@ -673,6 +675,13 @@ void CampoWizardPage4::OnSRPick(wxCommandEvent& e) } } +void CampoWizardPage4::OnSSAPick(wxCommandEvent& e) +{ + wxString path("../../chiavi/ssa/GetInfo.exe"); + wxExecute(path, wxEXEC_SYNC); +} + + bool CampoWizardPage4::ForwardValidate() { //per poter proseguire deve aver trovato una chiave o un server! @@ -714,6 +723,7 @@ bool CampoWizardPage4::TransferDataToWindow() FindWindowById(402)->Disable(); FindWindowById(403)->Disable(); FindWindowById(404)->Disable(); + FindWindowById(405)->Disable(); //controlla preventivamente se la chiave c'e' ed eventualmente quale e' (hardlock,eutron,server di chiavi) const int nDongleType = DongleTest(); @@ -725,21 +735,25 @@ bool CampoWizardPage4::TransferDataToWindow() { case 1: strBody += wxT("

E' stata rilevata una chiave tipo Hardlock:

"); - strBody += wxT("

"); + strBody += wxT("

"); strBody += wxT("

Si puo' procedere con l'installazione /aggiornamento del software PRODUCT. Premere il pulsante \"Avanti\".

"); break; case 2: strBody += wxT("

E' stata rilevata una chiave tipo Eutron:

"); - strBody += wxT("

"); + strBody += wxT("

"); strBody += wxT("

Si puo' procedere con l'installazione /aggiornamento del software PRODUCT. Premere il pulsante \"Avanti\".

"); break; case 3: strBody += wxT("

E' stato rilevata una chiave remota condivisa in rete con il servizio di gestione autorizzazioni:

"); - strBody += wxT("

"); + strBody += wxT("

"); strBody += wxT("

Si puo' procedere con l'installazione /aggiornamento del software PRODUCT. Premere il pulsante \"Avanti\".

"); Set(404, GetWizard().GetSrvAuth()); break; - + case 4: + strBody += wxT("

E' stata rilevata una chiave tipo SSA:

"); + strBody += wxT("

"); + strBody += wxT("

Si puo' procedere con l'installazione /aggiornamento del software PRODUCT. Premere il pulsante \"Avanti\".

"); + break; default: strBody += wxT("

Non e' stata rilevata alcuna chiave hardware installata sul computer!

"); strBody += wxT("

Per procedere all'installazione della chiave hardware, collegarla al computer e premere il bottone corrispondente alla tipologia della chiave stessa per installarne i driver.

"); @@ -750,6 +764,7 @@ bool CampoWizardPage4::TransferDataToWindow() FindWindowById(402)->Enable(); FindWindowById(403)->Enable(); FindWindowById(404)->Enable(); + FindWindowById(405)->Enable(); break; } @@ -803,16 +818,25 @@ int CampoWizardPage4::DongleTest() if (serno == 0xFFFF) { serno = HardlockLogin(yearKey); - if (serno == 0xFFFF) - { - serno = EutronLogin(yearKey); - if (serno != 0xFFFF) - dongle_type = 2; //chiave eutron - } - else - dongle_type = 1; //chiave hardlock + if (serno != 0xFFFF) + dongle_type = 1; //chiave hardlock + } + + if (serno == 0xFFFF) + { + serno = EutronLogin(yearKey); + if (serno != 0xFFFF) + dongle_type = 2; //chiave eutron } + if (serno == 0xFFFF) + { + serno = SSALogin(yearKey); + if (serno != 0xFFFF) + dongle_type = 4; //chiave software + } + + return dongle_type; } @@ -829,7 +853,7 @@ CampoWizardPage4::CampoWizardPage4(wxWizard* parent) : CampoWizardPage(parent) //Hardlock label AddLabel(gbsButtSizer, "Installa chiave locale di tipo Hardlock", 0, 0); //Hardlock image - wxBitmap bmp_HL("../../campo/servers/hardlock.gif", wxBITMAP_TYPE_GIF); + wxBitmap bmp_HL("hardlock.gif", wxBITMAP_TYPE_GIF); wxStaticBitmap* s_bmp_HL = new wxStaticBitmap(this, wxID_ANY, bmp_HL); gbsButtSizer->Add(s_bmp_HL, wxGBPosition(0, 1)); //bottone Hardlock @@ -840,7 +864,7 @@ CampoWizardPage4::CampoWizardPage4(wxWizard* parent) : CampoWizardPage(parent) //Eutron label AddLabel(gbsButtSizer, "Installa chiave locale di tipo Eutron", 1, 0); //Eutron image - wxBitmap bmp_EU("../../campo/servers/eutron.gif", wxBITMAP_TYPE_GIF); + wxBitmap bmp_EU("eutron.gif", wxBITMAP_TYPE_GIF); wxStaticBitmap* s_bmp_EU = new wxStaticBitmap(this, wxID_ANY, bmp_EU); gbsButtSizer->Add(s_bmp_EU, wxGBPosition(1, 1)); //bottone Eutron @@ -848,14 +872,25 @@ CampoWizardPage4::CampoWizardPage4(wxWizard* parent) : CampoWizardPage(parent) gbsButtSizer->Add(bEuButton, wxGBPosition(1, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); //terza riga della griglia + //SSA label + AddLabel(gbsButtSizer, "Installa licenza software", 2, 0); + //SSA image + wxBitmap bmp_SSA("ssa.gif", wxBITMAP_TYPE_GIF); + wxStaticBitmap* s_bmp_SSA = new wxStaticBitmap(this, wxID_ANY, bmp_SSA); + gbsButtSizer->Add(s_bmp_SSA, wxGBPosition(2, 1)); + //bottone Eutron + wxButton* bSSAButton = new wxButton(this, 405, wxT("SSA"), wxDefaultPosition, wxSize(64, -1)); + gbsButtSizer->Add(bSSAButton, wxGBPosition(2, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); + + //ultima riga della griglia //Server label - AddLabel(gbsButtSizer, "Nome o indirizzo IP del server di autorizzazioni", 2, 0); + AddLabel(gbsButtSizer, "Nome o indirizzo IP del server di autorizzazioni", 3, 0); //nome Server wxTextCtrl* tcSrvName = new wxTextCtrl(this, 404, "", wxDefaultPosition, wxSize(128,-1)); - gbsButtSizer->Add(tcSrvName, wxGBPosition(2, 1)); + gbsButtSizer->Add(tcSrvName, wxGBPosition(3, 1)); //bottone Eutron wxButton* bSrvButton = new wxButton(this, 403, wxT("Cerca"), wxDefaultPosition, wxSize(64, -1)); - gbsButtSizer->Add(bSrvButton, wxGBPosition(2, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); + gbsButtSizer->Add(bSrvButton, wxGBPosition(3, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); } @@ -1483,17 +1518,10 @@ bool CampoWizardPage9::TransferDataToWindow() bool bChkTeleass = false; if (FindReseller() <= 0) { - 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()) - bChkTeleass = false; - } + const wxString strTVDir = GetWindowsProgramDirectory() + "/TeamViewer/Version5"; + wxFileName fnFileToCheck(strTVDir, "TeamViewer"); + fnFileToCheck.SetExt("exe"); + bChkTeleass = !fnFileToCheck.FileExists(); } Set(902, bChkTeleass); @@ -1506,13 +1534,12 @@ bool CampoWizardPage9::TransferDataToWindow() strBody += wxT("

E' possibile creare l'icona di PRODUCT sul desktop.

"); if (FindReseller() <= 0 && !bInstDemoVersion) { - strBody += wxT("

E' possibile installare il programma di teleassistenza UltraVNC. E' il software che consente"); + strBody += wxT("

E' possibile installare il programma di teleassistenza TeamViewer. E' il software che consente"); strBody += wxT(" ai tecnici dell'assistenza di controllare il computer su cui si installa PRODUCT 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.

"); } - //è stato inopinatamente scelto di installare la DEMO if (bInstDemoVersion) { @@ -1546,7 +1573,7 @@ bool CampoWizardPage9::ForwardValidate() const bool bInstallTeleass = GetBool(902); if (bInstallTeleass) { - wxString strPath("../../teleassistenza/UltraVNC_105_Setup_W32.exe"); + wxString strPath("../../teleassistenza/TeamViewerQS_it.exe"); wxExecute(strPath, wxEXEC_SYNC); } @@ -1565,10 +1592,6 @@ CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent) if (FindReseller() > 0) pTeleass->Hide(); - - //wxCheckBox* pLink = new wxCheckBox(this, 1002, wxT("Associare i file .caz al programma")); - //pLink->SetValue(true); - //GetSizer()->Add(pLink, 0, wxALL, 0); } @@ -1721,7 +1744,7 @@ bool CampoWizardPage10::TransferDataToWindow() strBody += wxT("

Installazione area dati dimostrativa

"); if (_bDesktopShortcut) - strBody += wxT("

Creazione dell' icona sul desktop

"); + strBody += wxT("

Creazione dell'icona sul desktop

"); SetHTMLText(strTitle, strBody);