Patch level :4.0 setup
Files correlati : Ricompilazione Demo : [ ] Commento :iniziato trasferimento datidemo git-svn-id: svn://10.65.10.50/trunk@15592 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c74df2fc18
commit
f563d16aa1
@ -2316,6 +2316,8 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
const bool bNewInstallation = uInstallationType < 3;
|
const bool bNewInstallation = uInstallationType < 3;
|
||||||
//installazione servers?
|
//installazione servers?
|
||||||
const bool bInstallLurch = uInstallationType == 1 && (pWizard->GetInstUseAuth() || pWizard->GetInstUseDict());
|
const bool bInstallLurch = uInstallationType == 1 && (pWizard->GetInstUseAuth() || pWizard->GetInstUseDict());
|
||||||
|
//installazione datidemo? (oddio speriamo di no!; comunque vale solo per installazione standard)
|
||||||
|
const bool bInstallDemoData = uInstallationType == 0 && pWizard->GetInstDemoData();
|
||||||
//cartelle selezionate dall'utente
|
//cartelle selezionate dall'utente
|
||||||
const wxString& strPrgLocPath = pWizard->GetPrgLocPath();
|
const wxString& strPrgLocPath = pWizard->GetPrgLocPath();
|
||||||
const wxString& strDataPath = pWizard->GetDataPath();
|
const wxString& strDataPath = pWizard->GetDataPath();
|
||||||
@ -2342,7 +2344,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
//..contando anche quanti sono e memorizzandoli in un array asFileList
|
//..contando anche quanti sono e memorizzandoli in un array asFileList
|
||||||
const size_t uFilesToCopy = wxDir::GetAllFiles(strSourcePath.GetPath(), &asFilesList);
|
const size_t uFilesToCopy = wxDir::GetAllFiles(strSourcePath.GetPath(), &asFilesList);
|
||||||
|
|
||||||
//per ogni files da copiare controlla i path sorgente e destinazione(problema con sottodirectory tipo dati)
|
//per ogni file da copiare controlla i path sorgente e destinazione(problema con sottodirectory tipo dati)
|
||||||
wxString strFileCurr;
|
wxString strFileCurr;
|
||||||
const size_t nPathLenght = strSourcePath.GetPath().Len();
|
const size_t nPathLenght = strSourcePath.GetPath().Len();
|
||||||
//progress bar
|
//progress bar
|
||||||
@ -2413,8 +2415,56 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
} //if (!strFileCurr.IsEmpty()..
|
} //if (!strFileCurr.IsEmpty()..
|
||||||
} //for(size_t...
|
} //for(size_t...
|
||||||
|
|
||||||
|
// 3) INSTALLAZIONE DATI DEMO
|
||||||
|
//---------------------------
|
||||||
|
//installazione dei dati dimostrativi (che schifo!)
|
||||||
|
if (bInstallDemoData)
|
||||||
|
{
|
||||||
|
//trova la cartella datidemo da copiare
|
||||||
|
wxArrayString asDataList;
|
||||||
|
wxFileName strSourcePath(wxGetCwd(), "*.*");
|
||||||
|
strSourcePath.AppendDir("..");
|
||||||
|
strSourcePath.AppendDir("datidemo");
|
||||||
|
strSourcePath.MakeAbsolute();
|
||||||
|
|
||||||
// 3) COMPILAZIONE CAMPO.INI CON CONFIGURAZIONE NUOVA INSTALLAZIONE
|
const size_t uFilesToCopy = wxDir::GetAllFiles(strSourcePath.GetPath(), &asDataList);
|
||||||
|
wxString strFileCurr;
|
||||||
|
const size_t nPathLenght = strSourcePath.GetPath().Len();
|
||||||
|
wxProgressDialog pi("Installazione Dati Demo...", "", (int)uFilesToCopy, NULL, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT);
|
||||||
|
for (size_t i = 0; i < uFilesToCopy; i++)
|
||||||
|
{
|
||||||
|
if (!pi.Update((int)i, asDataList[i]))
|
||||||
|
break;
|
||||||
|
|
||||||
|
asDataList[i].Lower();
|
||||||
|
strFileCurr = strDataPath + "/";
|
||||||
|
strFileCurr += asDataList[i].Mid(nPathLenght + 9);
|
||||||
|
|
||||||
|
if (!strFileCurr.IsEmpty())
|
||||||
|
{
|
||||||
|
strFileCurr.MakeLower();
|
||||||
|
const wxFileName strFileName(strFileCurr);
|
||||||
|
//eventuali sottodirectory le crea (solo se hanno un nome)
|
||||||
|
const wxString strDir = strFileName.GetPath();
|
||||||
|
if (!strDir.IsEmpty() && !wxDirExists(strDir))
|
||||||
|
wxMkdir(strDir);
|
||||||
|
|
||||||
|
if(!wxCopyFile(asDataList[i], strFileCurr))
|
||||||
|
{
|
||||||
|
wxString strErr = "Impossibile copiare il file ";
|
||||||
|
strErr += asDataList[i];
|
||||||
|
strErr += " in ";
|
||||||
|
strErr += strFileCurr;
|
||||||
|
strErr += "\nInstallazione interrotta!";
|
||||||
|
ErrorBox(strErr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //if (!strFileCurr.IsEmpty()..
|
||||||
|
} //for (size_t i = 0...
|
||||||
|
} //if(bInstallDemoData...
|
||||||
|
|
||||||
|
|
||||||
|
// 4) COMPILAZIONE CAMPO.INI CON CONFIGURAZIONE NUOVA INSTALLAZIONE
|
||||||
//-----------------------------------------------------------------
|
//-----------------------------------------------------------------
|
||||||
//adesso deve compilare il campo.ini se nuova installazione..
|
//adesso deve compilare il campo.ini se nuova installazione..
|
||||||
if (bNewInstallation)
|
if (bNewInstallation)
|
||||||
@ -2450,7 +2500,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
} //if(bNewInstallation...
|
} //if(bNewInstallation...
|
||||||
|
|
||||||
|
|
||||||
// 4) COMPILAZIONE\AGGIORNAMENTO INSTALL.INI CON DISKPATH
|
// 5) COMPILAZIONE\AGGIORNAMENTO INSTALL.INI CON DISKPATH
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
//..e modificare comunque l'install.ini aggiornando eventualmente l'origine dei programmi
|
//..e modificare comunque l'install.ini aggiornando eventualmente l'origine dei programmi
|
||||||
//parentesi necessaria per la scrittura immediata (non cancellare! serve per debug)
|
//parentesi necessaria per la scrittura immediata (non cancellare! serve per debug)
|
||||||
@ -2469,7 +2519,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 5) CREAZIONE AUTOSTART DEI SERVERS (SE CI SONO)
|
// 6) CREAZIONE AUTOSTART DEI SERVERS (SE CI SONO)
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
//solo se sta installando campo in postazione server e deve installare un gestore di servizi..
|
//solo se sta installando campo in postazione server e deve installare un gestore di servizi..
|
||||||
//..avvia la procedura della creazione dell'autostart(un casino)
|
//..avvia la procedura della creazione dell'autostart(un casino)
|
||||||
@ -2480,14 +2530,14 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 6) AGGIORNAMENTO DEL MODULO SY CON EVENTUALI PATCH PRESENTI IN PROGRAM DEL CD E AGGIORNAMENTO INSTALL.INI
|
// 7) AGGIORNAMENTO DEL MODULO SY CON EVENTUALI PATCH PRESENTI IN PROGRAM DEL CD E AGGIORNAMENTO INSTALL.INI
|
||||||
//----------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------
|
||||||
//procede poi al caricamento delle patch eventuali di sistema all'interno della dir 'program' e al..
|
//procede poi al caricamento delle patch eventuali di sistema all'interno della dir 'program' e al..
|
||||||
//..conseguente riaggiornamento del livello versione/patch del SY in install.ini
|
//..conseguente riaggiornamento del livello versione/patch del SY in install.ini
|
||||||
UnzipSystem(strPrgLocPath);
|
UnzipSystem(strPrgLocPath);
|
||||||
|
|
||||||
|
|
||||||
// 7) CREAZIONE DELL'ICONA SUL DESKTOP
|
// 8) CREAZIONE DELL'ICONA SUL DESKTOP
|
||||||
//------------------------------------
|
//------------------------------------
|
||||||
const wxFileName strExe(strPrgLocPath, wxT("ba0.exe"));
|
const wxFileName strExe(strPrgLocPath, wxT("ba0.exe"));
|
||||||
const bool bDesktopShortcut = pWizard->GetDesktopShortcut();
|
const bool bDesktopShortcut = pWizard->GetDesktopShortcut();
|
||||||
@ -2495,7 +2545,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe);
|
CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe);
|
||||||
|
|
||||||
|
|
||||||
// 8) AGGIORNAMENTO CAMPO.STP
|
// 9) AGGIORNAMENTO CAMPO.STP
|
||||||
//---------------------------
|
//---------------------------
|
||||||
if (bNewInstallation)
|
if (bNewInstallation)
|
||||||
{
|
{
|
||||||
@ -2514,6 +2564,9 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 10) CHIUDE IL SETUP LANCIANDO BA1 -6 PER INSTALLAZIONE MODULI
|
||||||
|
//-------------------------------------------------------------
|
||||||
//lanciare ba1.exe -6 in uscita (non va qui! e' solo per ricordarsi di farlo!)
|
//lanciare ba1.exe -6 in uscita (non va qui! e' solo per ricordarsi di farlo!)
|
||||||
wxSetWorkingDirectory(strPrgLocPath);
|
wxSetWorkingDirectory(strPrgLocPath);
|
||||||
wxExecute("ba1 -6 /uADMIN");
|
wxExecute("ba1 -6 /uADMIN");
|
||||||
@ -2521,6 +2574,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
|||||||
} //if (pWizard->Run())...
|
} //if (pWizard->Run())...
|
||||||
pWizard->Destroy();
|
pWizard->Destroy();
|
||||||
|
|
||||||
|
//finestrina x chiudere a mano il programma (sconsigliata causa lancio ba1.exe)
|
||||||
// ::wxMessageBox(wxT("Installazione terminata"), APPNAME, wxOK | wxICON_INFORMATION);
|
// ::wxMessageBox(wxT("Installazione terminata"), APPNAME, wxOK | wxICON_INFORMATION);
|
||||||
m_pMainFrame->Destroy();
|
m_pMainFrame->Destroy();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user