Migliorato supporto per chivi SSA
git-svn-id: svn://10.65.10.50/branches/R_10_00@22688 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ae39770327
commit
e05c1ffbc0
@ -51,7 +51,6 @@ void CampoFrame::OnErase(wxEraseEvent& e)
|
||||
dc.SetFont(*pFont);
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
|
||||
|
||||
int w, h;
|
||||
dc.GetTextExtent(RESELLER, &w, &h);
|
||||
while (w > rect.width)
|
||||
@ -137,6 +136,7 @@ protected:
|
||||
|
||||
//metodi di utility per i vari modi di aggiornamento
|
||||
const wxString GetSourceDir(const wxString strDirName) const;
|
||||
const wxString& GetSetupDir() const { return m_strSetupPath; }
|
||||
void EmptyOutDir(const wxString& strDir) const;
|
||||
bool UnzipModule(const wxString& strPrgLocPath, const wxString& strSrc, const wxString& strModule) const;
|
||||
void CopyDir(const wxString& strSourceDir, const wxString& strDestDir) const;
|
||||
@ -249,9 +249,9 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co
|
||||
{
|
||||
//csidl = CSIDL_COMMON_DESKTOPDIRECTORY = desktop
|
||||
//csidl = CSIDL_COMMON_STARTUP = all users esecuzione automatica
|
||||
wxString strDesktopPath = GetFolderPath(csidl);
|
||||
|
||||
if (!strDesktopPath.IsEmpty())
|
||||
const wxString strDesktopPath = GetFolderPath(csidl);
|
||||
bool ok = wxDirExists(strDesktopPath);
|
||||
if (ok)
|
||||
{
|
||||
CoInitialize(NULL);
|
||||
|
||||
@ -292,6 +292,7 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co
|
||||
|
||||
strPath << strIcon;
|
||||
|
||||
/* Obsoleto
|
||||
//controlla se è in un sistema windows che richiede icone a 256 colori (win2000, win2003 termserv)
|
||||
int nVersion = 0;
|
||||
GetWinVer(NULL, 0, &nVersion);
|
||||
@ -300,6 +301,7 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co
|
||||
const int nPosCol = strIcon.Len() - 4;
|
||||
strIcon.insert(nPosCol, "_256");
|
||||
}
|
||||
*/
|
||||
|
||||
psl->SetIconLocation(strPath, 0);
|
||||
|
||||
@ -322,10 +324,14 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co
|
||||
ppf->Release();
|
||||
}
|
||||
psl->Release();
|
||||
|
||||
if (FAILED(hres))
|
||||
ok = ErrorBox(wxT("Impossibile creare l'icona del collegamento: eseguire l'installazione come amministratore"));
|
||||
}
|
||||
CoUninitialize();
|
||||
}
|
||||
return true;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
@ -474,10 +480,9 @@ static int PatchCompare(const wxString& first, const wxString& second)
|
||||
return strName1.CompareTo(strName2);
|
||||
}
|
||||
|
||||
|
||||
const wxString CampoSetup::GetSourceDir(const wxString strDirName) const
|
||||
{
|
||||
wxFileName strSourcePath(m_strSetupPath, "pippo.txt");
|
||||
wxFileName strSourcePath(GetSetupDir(), "pippo.txt");
|
||||
strSourcePath.AppendDir("..");
|
||||
strSourcePath.AppendDir("..");
|
||||
strSourcePath.AppendDir(strDirName);
|
||||
@ -854,7 +859,7 @@ bool CampoSetup::InternetUpdateModule(const wxString& strLocalPath, const wxStri
|
||||
//---------------------------------------------------------------
|
||||
void CampoSetup::ClientUpdate()
|
||||
{
|
||||
wxFileName fn(m_strSetupPath);
|
||||
wxFileName fn(GetSetupDir());
|
||||
fn.AppendDir("..");
|
||||
fn.MakeAbsolute();
|
||||
fn.SetFullName("install.ini");
|
||||
@ -877,7 +882,7 @@ void CampoSetup::ClientUpdate()
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
void CampoSetup::DiskUpdate()
|
||||
{
|
||||
wxFileName fn(m_strSetupPath);
|
||||
wxFileName fn(GetSetupDir());
|
||||
fn.AppendDir("..");
|
||||
fn.MakeAbsolute();
|
||||
fn.SetFullName("install.ini");
|
||||
@ -911,7 +916,7 @@ void CampoSetup::DiskUpdate()
|
||||
void CampoSetup::InternetUpdate()
|
||||
{
|
||||
//install.ini locale dove setup.exe e' in esecuzione
|
||||
wxFileName fn(m_strSetupPath);
|
||||
wxFileName fn(GetSetupDir());
|
||||
fn.AppendDir("..");
|
||||
fn.MakeAbsolute();
|
||||
fn.SetFullName("install.ini");
|
||||
@ -983,7 +988,7 @@ void CampoSetup::NormalSetup()
|
||||
//copia del contenuto della cartella campo nella cartella di destinazione (installaz/aggiornam)
|
||||
//per prima cosa cerca la cartella dei files sorgente...
|
||||
wxArrayString asFilesList;
|
||||
wxFileName strSourcePath(m_strSetupPath, "*.*");
|
||||
wxFileName strSourcePath(GetSetupDir(), "*.*");
|
||||
strSourcePath.AppendDir("..");
|
||||
strSourcePath.AppendDir("..");
|
||||
strSourcePath.AppendDir("campo"); // NOME fisso della cartella del CD, non mettere APPNAME
|
||||
@ -1101,7 +1106,7 @@ void CampoSetup::NormalSetup()
|
||||
//-------------------------------------------------------------------------------
|
||||
//Funziona tutto come al punto 2)! Cambiano solo i path (sorgente = program\setup, destinazione = destdir\setup)
|
||||
wxArrayString asSetupFilesList;
|
||||
wxFileName fnSetupSourcePath(m_strSetupPath, "*.*");
|
||||
wxFileName fnSetupSourcePath(GetSetupDir(), "*.*");
|
||||
fnSetupSourcePath.MakeAbsolute();
|
||||
|
||||
const wxString strSetupSrc = fnSetupSourcePath.GetPath();
|
||||
@ -1222,7 +1227,7 @@ void CampoSetup::NormalSetup()
|
||||
{
|
||||
//file sorgente
|
||||
const wxString strThemeFileName = Theme();
|
||||
wxString strSrcThemePath = m_strSetupPath;
|
||||
wxString strSrcThemePath = GetSetupDir();
|
||||
strSrcThemePath << strThemeFileName;
|
||||
CampoIniFile CampoTheme(strSrcThemePath, "Standard");
|
||||
|
||||
@ -1316,13 +1321,13 @@ void CampoSetup::NormalSetup()
|
||||
if (bNewInstallation)
|
||||
{
|
||||
//deve aggiungere la nuova installazione al campo.stp
|
||||
for (int i = 1;; i++)
|
||||
for (int i = 1; ; i++)
|
||||
{
|
||||
wxString strGroup;
|
||||
strGroup << i;
|
||||
CampoIniFile CampoStp("C:\\campo.stp", strGroup);
|
||||
wxString strPath = CampoStp.Get("Program");
|
||||
if (strPath.IsEmpty())
|
||||
const wxString strPath = CampoStp.Get("Program");
|
||||
if (strPath.IsEmpty() || strPath.CmpNoCase(strPrgLocPath) == 0)
|
||||
{
|
||||
CampoStp.Set("Program", strPrgLocPath);
|
||||
break;
|
||||
@ -1337,7 +1342,7 @@ void CampoSetup::NormalSetup()
|
||||
if (wxSetWorkingDirectory(strPrgLocPath))
|
||||
wxExecute("ba1 -6 /uADMIN");
|
||||
else
|
||||
ErrorBox("Impossibile installare i moduli. Cartella di destinazione irraggiungibile!");
|
||||
ErrorBox("Impossibile installare i moduli: cartella di destinazione irraggiungibile!");
|
||||
|
||||
|
||||
} //if (m_pWizard->Run())...
|
||||
@ -1508,13 +1513,18 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
|
||||
if (strCommand.IsEmpty())
|
||||
{
|
||||
wxFileName strPath(argv[0]);
|
||||
TCHAR strFileName[260];
|
||||
::GetModuleFileName(NULL, strFileName, 260);
|
||||
//wxFileName strPath(argv[0]);
|
||||
|
||||
wxFileName strPath(strFileName);
|
||||
strPath.MakeAbsolute();
|
||||
strPath.SetCwd();
|
||||
m_strSetupPath = strPath.GetPath();
|
||||
if (!m_strSetupPath.EndsWith(wxT("\\")))
|
||||
m_strSetupPath << '\\';
|
||||
|
||||
wxSetWorkingDirectory(m_strSetupPath);
|
||||
|
||||
//installazione normale da CD
|
||||
NormalSetup();
|
||||
}
|
||||
|
@ -106,22 +106,27 @@ Owner=DERBY Plus SRL
|
||||
OEM=5
|
||||
MustCall=20-09-2011
|
||||
[701]
|
||||
*=25-12-2011
|
||||
Owner=Itertec (TS Lazio)
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[702]
|
||||
*=25-12-2011
|
||||
Owner=Itertec (Valentini)
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[703]
|
||||
*=25-12-2011
|
||||
Owner=CIS informatica srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[704]
|
||||
*=25-12-2011
|
||||
Owner=Itertec (TS Lazio)
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[705]
|
||||
*=25-12-2011
|
||||
Owner=Itertec (TS Lazio)
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -296,6 +301,7 @@ OEM=1
|
||||
Owner=EDIMAR S.R.L.
|
||||
OEM=1
|
||||
[5752]
|
||||
*=25-12-2011
|
||||
Owner=Samadi spa
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -704,6 +710,7 @@ OEM=1
|
||||
Owner=Folloni gianluca
|
||||
OEM=0
|
||||
[7055]
|
||||
*=25-12-2011
|
||||
Owner=Laboratorio Casella
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -712,10 +719,12 @@ ps0872 -?=31-12-3000
|
||||
Owner=Realplast
|
||||
OEM=0
|
||||
[7063]
|
||||
*=25-12-2011
|
||||
Owner=I.T.S. e Sogecred spa
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[7066]
|
||||
*=25-12-2011
|
||||
Owner=Pomezia Avvolgibili srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -757,7 +766,7 @@ OEM=0
|
||||
Owner=Gioielleria Allegrini
|
||||
OEM=8
|
||||
[7122]
|
||||
*=22-09-2011
|
||||
*=25-12-2011
|
||||
Owner=Smile Production srl
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -873,6 +882,7 @@ OEM=8
|
||||
Owner=LA NUOVA COPERTURA SRL
|
||||
OEM=1
|
||||
[7232]
|
||||
*=25-12-2011
|
||||
Owner=Impresa Giardino Srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -975,10 +985,12 @@ Ower=New Car
|
||||
Owner=NEW CAR SRL
|
||||
OEM=0
|
||||
[7337]
|
||||
*=25-12-2011
|
||||
Owner=Sadi srl
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[7338]
|
||||
*=25-12-2011
|
||||
Owner=Video Star srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -1039,10 +1051,12 @@ OEM=1
|
||||
Owner=TRATTORIA PEPPINO SRL
|
||||
OEM=1
|
||||
[7414]
|
||||
*=25-12-2011
|
||||
Owner=Fincapital
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[7417]
|
||||
*=25-12-2011
|
||||
Owner=Prassi Roma s.r.l.
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -1108,6 +1122,7 @@ OEM=1
|
||||
Owner=BINDA PASQUALE SNC DI BINDA
|
||||
OEM=1
|
||||
[7531]
|
||||
*=25-12-2011
|
||||
Owner=MAV Television srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -1166,10 +1181,12 @@ MustCall=31-12-2011
|
||||
Owner=Informzoo
|
||||
OEM=0
|
||||
[7610]
|
||||
*=25-12-2011
|
||||
Owner=Amario srl
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[7612]
|
||||
*=25-12-2011
|
||||
Owner=Gentile Legnami srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -1267,6 +1284,7 @@ OEM=1
|
||||
Owner=GANDOLFI PAOLO
|
||||
OEM=0
|
||||
[7756]
|
||||
*=25-12-2011
|
||||
Owner=Samadi
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -1545,6 +1563,7 @@ OEM=8
|
||||
Owner=Varauto
|
||||
OEM=0
|
||||
[8029]
|
||||
*=25-12-2011
|
||||
Owner=S.I.D.I. spa
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -1826,6 +1845,7 @@ OEM=8
|
||||
[8266]
|
||||
Owner=D.B.Service srl unipersonale
|
||||
OEM=0
|
||||
ps0920 -*=31-12-3000
|
||||
[8274]
|
||||
Owner=DOPPIO ZERO S.R.L
|
||||
OEM=1
|
||||
@ -1899,10 +1919,12 @@ OEM=1
|
||||
Owner=ROFARMA ITALIA SRL
|
||||
OEM=1
|
||||
[8338]
|
||||
*=25-12-2011
|
||||
Owner=S.I.D.I. spa
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8340]
|
||||
*=25-12-2011
|
||||
Owner=Coop. Casa Service
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -2092,6 +2114,7 @@ MustCall=22-09-2011
|
||||
[8505]
|
||||
Owner=AP SERVICES DI Antoinio Porretta
|
||||
[8508]
|
||||
*=25-12-2011
|
||||
Owner=I.T.S. e Sogecred s.p.a.
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -2150,10 +2173,12 @@ OEM=1
|
||||
Owner=Feed Club
|
||||
OEM=0
|
||||
[8537]
|
||||
*=25-12-2011
|
||||
Owner=A.R.S. Progetti s.p.a.
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8538]
|
||||
*=25-12-2011
|
||||
Owner=A.R.S. Progetti s.p.a.
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -2173,10 +2198,12 @@ Owner=Serpelloni SEC
|
||||
OEM=0
|
||||
MustCall=31-12-2011
|
||||
[8546]
|
||||
*=25-12-2011
|
||||
Owner=Extra
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8550]
|
||||
*=25-12-2011
|
||||
Owner=Carla srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -2415,22 +2442,27 @@ Owner=Il Service
|
||||
OEM=8
|
||||
MustCall=22-09-2011
|
||||
[8653]
|
||||
*=25-12-2011
|
||||
Owner=Greenpeace Associazione
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8654]
|
||||
*=25-12-2011
|
||||
Owner=Laboratorio di Patologia Clinica Brusca s.r.l.
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8655]
|
||||
*=25-12-2011
|
||||
Owner=Gridi srl
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8656]
|
||||
*=25-12-2011
|
||||
Owner=Co.Na.ARMA Consorzio Nazionale Abitazioni Arma
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8657]
|
||||
*=25-12-2011
|
||||
Owner=Pomezia Avvolgibili srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -2456,19 +2488,22 @@ OEM=0
|
||||
Owner=Nuova Gafm
|
||||
OEM=0
|
||||
[8664]
|
||||
*=25-12-2011
|
||||
Owner=Tender
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8665]
|
||||
*=25-12-2011
|
||||
Owner=Immobiliare Forte Group
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8666]
|
||||
*=25-12-2011
|
||||
Owner=Soc. Iniziative Immobiliari 2002 s.r.l.
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8668]
|
||||
*=22-09-2011
|
||||
*=25-12-2011
|
||||
Owner=Smile Production srl
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -2675,20 +2710,24 @@ Owner=Amerato Costruzioni
|
||||
OEM=8
|
||||
MustCall=22-09-2011
|
||||
[8750]
|
||||
*=25-12-2011
|
||||
Owner=Samadi
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8751]
|
||||
*=25-12-2011
|
||||
Owner=Federmeccanica
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
[8752]
|
||||
*=25-12-2011
|
||||
Owner=Samadi
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8753]
|
||||
OEM=1
|
||||
[8755]
|
||||
*=25-12-2011
|
||||
Owner=ALSEMA srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -2888,6 +2927,7 @@ Owner=Pacileo Raffaele
|
||||
OEM=8
|
||||
MustCall=22-09-2011
|
||||
[8832]
|
||||
*=25-12-2011
|
||||
Owner=Oil Zito
|
||||
OEM=7
|
||||
MustCall=22-09-2011
|
||||
@ -3031,7 +3071,7 @@ Owner=COSEA
|
||||
OEM=1
|
||||
[8881]
|
||||
Owner=CHI-MA FLORENCE S.P.A.
|
||||
pl1048 -?=30-06-2012
|
||||
pl1048 -?=31-12-3000
|
||||
OEM=4
|
||||
[8882]
|
||||
Owner=Imballi Diano srl
|
||||
@ -3206,14 +3246,17 @@ OEM=1
|
||||
Owner=STRACCIA PACKAGING SRL
|
||||
OEM=1
|
||||
[8946]
|
||||
*=25-12-2011
|
||||
Owner=Iniziativa Immobiliare 2001 srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8947]
|
||||
*=25-12-2011
|
||||
Owner=Gentile Legnami srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
[8948]
|
||||
*=25-12-2011
|
||||
Owner=ALSEMA srl
|
||||
OEM=7
|
||||
MustCall=06-06-2012
|
||||
@ -3341,9 +3384,15 @@ OEM=1
|
||||
[9009]
|
||||
Owner=CO.MA.RI.
|
||||
OEM=1
|
||||
[9014]
|
||||
Owner=Transervice Europe
|
||||
OEM=1
|
||||
[9015]
|
||||
Owner=FICEM SRL
|
||||
OEM=1
|
||||
[9018]
|
||||
Owner=LAVANOL
|
||||
OEM=1
|
||||
[9019]
|
||||
Owner=CFR s.a.s
|
||||
OEM=1
|
||||
|
@ -347,5 +347,31 @@ bool DictionaryLogin(const wxString& strSrvName)
|
||||
|
||||
unsigned short SSALogin(int& year)
|
||||
{
|
||||
return 0xFFFF;
|
||||
unsigned short serno = 0xFFFF;
|
||||
bool good = true;
|
||||
for (int i = 1; good; i++)
|
||||
{
|
||||
wxString strGroup; strGroup << i;
|
||||
const CampoIniFile CampoStp("C:\\campo.stp", strGroup);
|
||||
wxString strPath = CampoStp.Get("Program");
|
||||
if (strPath.IsEmpty())
|
||||
{
|
||||
strPath = "C:\\*.ssax";
|
||||
good = false;
|
||||
}
|
||||
else
|
||||
strPath += "\\*.ssa";
|
||||
if (wxDirExists(strPath.BeforeLast('\\')))
|
||||
{
|
||||
const wxString strSSAX = wxFindFirstFile(strPath);
|
||||
const int n = strSSAX.IsEmpty() ? -1 : wxAtoi(strSSAX.AfterLast('\\'));
|
||||
if (n > 1000 && n < 65000)
|
||||
{
|
||||
serno = n;
|
||||
year = 2121;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return serno;
|
||||
}
|
||||
|
@ -45,14 +45,15 @@ bool GetWinVer(LPTSTR lpszVersion, int nVersionSize, int *pnVersion)
|
||||
int nVersion = WUNKNOWN;
|
||||
LPCTSTR cp = WUNKNOWNSTR;
|
||||
|
||||
OSVERSIONINFO osinfo; memset(&osinfo, 0, sizeof(osinfo));
|
||||
osinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if (::GetVersionEx(&osinfo))
|
||||
OSVERSIONINFOEX osinfo; ZeroMemory(&osinfo, sizeof(osinfo));
|
||||
osinfo.dwOSVersionInfoSize = sizeof(osinfo);
|
||||
if (::GetVersionEx((OSVERSIONINFO*)&osinfo))
|
||||
{
|
||||
DWORD dwPlatformId = osinfo.dwPlatformId;
|
||||
DWORD dwMinorVersion = osinfo.dwMinorVersion;
|
||||
DWORD dwMajorVersion = osinfo.dwMajorVersion;
|
||||
DWORD dwBuildNumber = osinfo.dwBuildNumber & 0xFFFF; // Win 95 needs this
|
||||
WORD wProductType = osinfo.wProductType;
|
||||
|
||||
if ((dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) && (dwMajorVersion == 4))
|
||||
{
|
||||
@ -119,7 +120,12 @@ bool GetWinVer(LPTSTR lpszVersion, int nVersionSize, int *pnVersion)
|
||||
{
|
||||
switch (dwMinorVersion)
|
||||
{
|
||||
case 0: cp = WVISTASTR; nVersion = WVISTA; break;
|
||||
case 0:
|
||||
if (wProductType == VER_NT_WORKSTATION)
|
||||
{ cp = WVISTASTR; nVersion = WVISTA; }
|
||||
else
|
||||
{ cp = W2008STR; nVersion = W2008;}
|
||||
break;
|
||||
case 1: cp = W7STR; nVersion = W7; break;
|
||||
default: cp = W8STR; nVersion = W8; break;
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ protected:
|
||||
void BuildKey(char* key);
|
||||
|
||||
public:
|
||||
int DongleTest();
|
||||
int DongleTest(unsigned short& serno);
|
||||
CampoWizardPage4(wxWizard* parent);
|
||||
};
|
||||
|
||||
@ -675,33 +675,46 @@ void CampoWizardPage4::OnSRPick(wxCommandEvent& e)
|
||||
}
|
||||
}
|
||||
|
||||
static wxString GetSetupDir()
|
||||
{
|
||||
TCHAR str[_MAX_PATH];
|
||||
::GetModuleFileName(NULL, str, _MAX_PATH);
|
||||
wxFileName n(str);
|
||||
n.MakeAbsolute();
|
||||
return n.GetPath();
|
||||
}
|
||||
|
||||
void CampoWizardPage4::OnSSAPick(wxCommandEvent& e)
|
||||
{
|
||||
wxString strSerial;
|
||||
strSerial = ::wxGetTextFromUser(_T("Inserire il numero di serie assegnato da Sirio"),
|
||||
_T("Richiesta numero di serie"), strSerial, this);
|
||||
const int nSerial = wxAtoi(strSerial);
|
||||
if (nSerial > 1000 && nSerial < 10000)
|
||||
if (nSerial > 1000 && nSerial < 65000)
|
||||
{
|
||||
wxString ssax = GetWindowsDesktopDirectory();
|
||||
wxString ssax = "C:"; // GetWindowsDesktopDirectory();
|
||||
ssax += "\\";
|
||||
ssax += strSerial;
|
||||
|
||||
wxString path("./SSAGetInfo.exe -nome ");
|
||||
wxString path = GetSetupDir();
|
||||
path += "\\SSAGetInfo.exe -nome ";
|
||||
path += ssax;
|
||||
wxExecute(path, wxEXEC_SYNC);
|
||||
|
||||
ssax += wxT(".ssax");
|
||||
if (wxFileName::FileExists(ssax))
|
||||
const long err = wxExecute(path, wxEXEC_SYNC);
|
||||
if (err >= 0)
|
||||
{
|
||||
wxString msg = _T("Spedire il file ");
|
||||
msg += ssax;
|
||||
msg += _T(" ad abilitazioni_software@sirio-is.it\nper ottenere il file della licenza da copiare nella cartella ");
|
||||
msg += GetWizard().GetPrgLocPath();
|
||||
MessageBox(msg);
|
||||
ssax += wxT(".ssax");
|
||||
if (wxFileName::FileExists(ssax))
|
||||
{
|
||||
wxString msg = _T("Spedire il file \"");
|
||||
msg += ssax;
|
||||
msg += _T("\" ad \"abilitazioni_software@sirio-is.it\" per ottenere la licenza da copiare nella cartella di destinazione.");
|
||||
WarningBox(msg);
|
||||
}
|
||||
else
|
||||
ErrorBox(_T("Non è stato possibile generare il file di richiesta licenza ") + ssax);
|
||||
}
|
||||
else
|
||||
ErrorBox(_T("Non è stato possibile generare il file di richiesta licenza"));
|
||||
ErrorBox(_T("Impossibile eseguire ") + path);
|
||||
}
|
||||
else
|
||||
ErrorBox(_T("Numero di serie non valido"));
|
||||
@ -713,9 +726,13 @@ bool CampoWizardPage4::ForwardValidate()
|
||||
//per poter proseguire deve aver trovato una chiave o un server!
|
||||
|
||||
GetWizard().SetSrvAuth(Get(404));
|
||||
int nDongleType = DongleTest();
|
||||
unsigned short serno = 0xFFFF;
|
||||
int nDongleType = DongleTest(serno);
|
||||
if (nDongleType == 0)
|
||||
{
|
||||
if (wxDirExists("c:/campodemo"))
|
||||
return ErrorBox(wxT("Non è stata rilevata alcuna chiave di protezione e la versione DEMO è già presente in C:\\CampoDemo"));
|
||||
|
||||
//return ErrorBox("Per proseguire e' NECESSARIO installare una chiave locale o collegarsi ad una chiave di rete!"); kazzone
|
||||
const bool bDemo = YesNoBox("Non è stata rilevata alcuna chiave di protezione locale e/o di rete!\n"
|
||||
"E' possibile installare solo la versione DEMO del software!\n"
|
||||
@ -752,7 +769,8 @@ bool CampoWizardPage4::TransferDataToWindow()
|
||||
FindWindowById(405)->Disable();
|
||||
|
||||
//controlla preventivamente se la chiave c'e' ed eventualmente quale e' (hardlock,eutron,server di chiavi)
|
||||
const int nDongleType = DongleTest();
|
||||
unsigned short serno = 0xFFFF;
|
||||
const int nDongleType = DongleTest(serno);
|
||||
GetWizard().SetDongleType(nDongleType);
|
||||
|
||||
wxString strTitle = wxT("Controllo della chiave hardware di protezione");
|
||||
@ -760,12 +778,12 @@ bool CampoWizardPage4::TransferDataToWindow()
|
||||
switch (nDongleType)
|
||||
{
|
||||
case 1:
|
||||
strBody += wxT("<p>E' stata rilevata una chiave tipo <b>Hardlock</b>:</p>");
|
||||
strBody += wxT("<p>E' stata rilevata la chiave #SERNO di tipo <b>Hardlock</b>:</p>");
|
||||
strBody += wxT("<p align=center><img src=\"hardlock.gif\" /></p>");
|
||||
strBody += wxT("<p>Si puo' procedere con l'installazione /aggiornamento del software <b><i>PRODUCT</i></b>. Premere il pulsante \"Avanti\".</p>");
|
||||
break;
|
||||
case 2:
|
||||
strBody += wxT("<p>E' stata rilevata una chiave tipo <b>Eutron</b>:</p>");
|
||||
strBody += wxT("<p>E' stata rilevata la chiave #SERNO di tipo <b>Eutron</b>:</p>");
|
||||
strBody += wxT("<p align=center><img src=\"eutron.gif\" /></p>");
|
||||
strBody += wxT("<p>Si puo' procedere con l'installazione /aggiornamento del software <b><i>PRODUCT</i></b>. Premere il pulsante \"Avanti\".</p>");
|
||||
break;
|
||||
@ -776,7 +794,7 @@ bool CampoWizardPage4::TransferDataToWindow()
|
||||
Set(404, GetWizard().GetSrvAuth());
|
||||
break;
|
||||
case 4:
|
||||
strBody += wxT("<p>E' stata rilevata una chiave tipo <b>SSA</b>:</p>");
|
||||
strBody += wxT("<p>E' stata rilevata la chiave #SERNO di tipo <b>SSA</b>:</p>");
|
||||
strBody += wxT("<p align=center><img src=\"ssa.gif\" /></p>");
|
||||
strBody += wxT("<p>Si puo' procedere con l'installazione /aggiornamento del software <b><i>PRODUCT</i></b>. Premere il pulsante \"Avanti\".</p>");
|
||||
break;
|
||||
@ -793,6 +811,12 @@ bool CampoWizardPage4::TransferDataToWindow()
|
||||
FindWindowById(405)->Enable();
|
||||
break;
|
||||
}
|
||||
|
||||
if (strBody.Find("#SERNO") > 0)
|
||||
{
|
||||
wxString sn; sn << serno;
|
||||
strBody.Replace("#SERNO", sn);
|
||||
}
|
||||
|
||||
SetHTMLText(strTitle, strBody);
|
||||
|
||||
@ -826,12 +850,12 @@ int CampoWizardPage4::VersionYear()
|
||||
return atoi(ver);
|
||||
}
|
||||
|
||||
int CampoWizardPage4::DongleTest()
|
||||
int CampoWizardPage4::DongleTest(unsigned short& serno)
|
||||
{
|
||||
int dongle_type = 0;
|
||||
int yearKey = 0;
|
||||
|
||||
unsigned int serno = 0xFFFF;
|
||||
serno = 0xFFFF;
|
||||
|
||||
wxString strSrvName = GetWizard().GetSrvAuth(); //nome del server di autorizzazioni (se c'e')
|
||||
if (!strSrvName.IsEmpty())
|
||||
@ -862,22 +886,6 @@ int CampoWizardPage4::DongleTest()
|
||||
dongle_type = 4; //chiave software
|
||||
}
|
||||
|
||||
if (serno == 0xFFFF)
|
||||
{
|
||||
wxString strSSAX = GetWindowsDesktopDirectory();
|
||||
strSSAX += "\\*.ssax";
|
||||
strSSAX = wxFindFirstFile(strSSAX);
|
||||
if (!strSSAX.IsEmpty())
|
||||
{
|
||||
serno = wxAtoi(strSSAX.AfterLast('\\'));
|
||||
if (serno > 1000 && serno < 65000)
|
||||
dongle_type = 4; //chiave software
|
||||
else
|
||||
serno = 0xFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return dongle_type;
|
||||
}
|
||||
|
||||
@ -1815,7 +1823,8 @@ void CampoWizard::SetDestinationPath(const wxString& path)
|
||||
{
|
||||
//aggiornamento
|
||||
CampoWizardPage4* page4 = (CampoWizardPage4*)m_pPage[3];
|
||||
if (page4->DongleTest() != 0)
|
||||
unsigned short serno = 0xFFFF;
|
||||
if (page4->DongleTest(serno) != 0)
|
||||
wxWizardPageSimple::Chain(m_pPage[2], m_pPage[8]); // chiave trovata
|
||||
else
|
||||
{
|
||||
@ -1987,10 +1996,8 @@ const bool CampoWizard::GetDesktopShortcut() const
|
||||
{
|
||||
return _bDesktopShortcut;
|
||||
}
|
||||
|
||||
//...fine litania metodi di passaggio valori tra le finestre
|
||||
|
||||
|
||||
|
||||
CampoWizard::CampoWizard(wxWindow* pParent)
|
||||
{
|
||||
//resettatore dei booleans (che senno' prendono valore casuale ad ogni esecuzione)
|
||||
@ -2042,14 +2049,13 @@ CampoWizard::CampoWizard(wxWindow* pParent)
|
||||
m_pPage[8] = new CampoWizardPage9(this); //creazione icona sul desktop e in start/programmi/campo
|
||||
m_pPage[9] = new CampoWizardPage10(this); //riassuntino installazione
|
||||
|
||||
|
||||
for (int p = 1; p < m_nPages; p++)
|
||||
wxWizardPageSimple::Chain(m_pPage[p-1], m_pPage[p]);
|
||||
|
||||
GetPageAreaSizer()->Add(m_pPage[0]);
|
||||
|
||||
//bottoni di navigazione
|
||||
Set(wxID_FORWARD, "Avanti");
|
||||
Set(wxID_BACKWARD, "Indietro");
|
||||
Set(wxID_CANCEL, "Annulla");
|
||||
Set(wxID_FORWARD, _T("Avanti"));
|
||||
Set(wxID_BACKWARD, _T("Indietro"));
|
||||
Set(wxID_CANCEL, _T("Annulla"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user