Patch level :4.0 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento :setup in corso d'opera git-svn-id: svn://10.65.10.50/trunk@15581 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9b75e411ee
commit
d681294c31
@ -234,8 +234,8 @@ public:
|
||||
};
|
||||
|
||||
CampoIniFile::CampoIniFile(const wxString strIniPath, const wxString strParagraph)
|
||||
: wxFileConfig (wxEmptyString, wxEmptyString, wxEmptyString, strIniPath,
|
||||
wxCONFIG_USE_GLOBAL_FILE|wxCONFIG_USE_NO_ESCAPE_CHARACTERS)
|
||||
: wxFileConfig (wxEmptyString, wxEmptyString, strIniPath, wxEmptyString,
|
||||
wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_NO_ESCAPE_CHARACTERS)
|
||||
{
|
||||
if (!strParagraph.IsEmpty())
|
||||
SetPath(strParagraph);
|
||||
@ -2190,7 +2190,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
const unsigned int uInstallationType = pWizard->GetInstallationType();
|
||||
const bool bNewInstallation = uInstallationType < 3;
|
||||
//installazione servers?
|
||||
const bool bInstallLurch = uInstallationType == 1 && (pWizard->GetInstUseAuth() | pWizard->GetInstUseDict());
|
||||
const bool bInstallLurch = uInstallationType == 1 && (pWizard->GetInstUseAuth() || pWizard->GetInstUseDict());
|
||||
//cartelle selezionate dall'utente
|
||||
const wxString& strPrgLocPath = pWizard->GetPrgLocPath();
|
||||
const wxString& strDataPath = pWizard->GetDataPath();
|
||||
@ -2218,14 +2218,7 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
wxString strFileCurr;
|
||||
const size_t nPathLenght = strSourcePath.GetPath().Len();
|
||||
for (size_t i = 0; i < uFilesToCopy; i++)
|
||||
{
|
||||
/* che fare con i servers? copiare la directory comunque o saltarli?
|
||||
if (asFilesList[i].Lower().Find("\\servers\\") > 0 && bInstallLurch)
|
||||
{
|
||||
strFileCurr = strPrgLocPath;
|
||||
strFileCurr += asFilesList[i].Mid(nPathLenght);
|
||||
}
|
||||
else*/
|
||||
{
|
||||
//files dei dati standard! solo in caso di nuova installazione!!
|
||||
if (asFilesList[i].Lower().Find("\\dati\\") > 0)
|
||||
{
|
||||
@ -2235,12 +2228,24 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
strFileCurr += asFilesList[i].Mid(nPathLenght + 5);
|
||||
}
|
||||
}
|
||||
else //files dei programmi
|
||||
else
|
||||
{
|
||||
strFileCurr = strPrgLocPath;
|
||||
strFileCurr += asFilesList[i].Mid(nPathLenght);
|
||||
//che fare con i servers? copiare la directory..potrebbe servire
|
||||
if (asFilesList[i].Lower().Find("\\servers\\") > 0)
|
||||
{
|
||||
if (bInstallLurch)
|
||||
{
|
||||
strFileCurr = strPrgLocPath;
|
||||
strFileCurr += "\\servers";
|
||||
strFileCurr += asFilesList[i].Mid(nPathLenght + 8);
|
||||
}
|
||||
}
|
||||
else //files dei programmi
|
||||
{
|
||||
strFileCurr = strPrgLocPath;
|
||||
strFileCurr += asFilesList[i].Mid(nPathLenght);
|
||||
}
|
||||
}
|
||||
|
||||
//copia i files nella cartella di destinazione (programmi,dati,cazzi e mazzi);se il nome del file..
|
||||
//..di destinazione e' vuoto significa che non lo deve copiare!! (es. dati in aggiornamento)
|
||||
if (!strFileCurr.IsEmpty())
|
||||
@ -2277,22 +2282,24 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
//adesso deve compilare il campo.ini se nuova installazione..
|
||||
if (bNewInstallation)
|
||||
{
|
||||
//paragrafo [Main]
|
||||
CampoIniFile CampoIniMain(strPrgLocPath + "/campo.ini", "Main");
|
||||
const unsigned int uDongleType = pWizard->GetDongleType();
|
||||
CampoIniMain.Set("Dongle", uDongleType);
|
||||
CampoIniMain.Set("Study", strDataPath);
|
||||
CampoIniMain.Set("Firm", "com");
|
||||
//client o non client?
|
||||
if (uInstallationType == 2) //client
|
||||
{
|
||||
CampoIniMain.Set("TestDatabase", "N");
|
||||
CampoIniMain.Set("TestPrograms", "X");
|
||||
}
|
||||
else //altri (standard,server)
|
||||
{
|
||||
CampoIniMain.Set("TestDatabase", "X");
|
||||
CampoIniMain.Set("TestPrograms", "N");
|
||||
{ //parentesi necessaria per la scrittura immediata (non cancellare! serve per debug)
|
||||
//paragrafo [Main]
|
||||
CampoIniFile CampoIniMain(strPrgLocPath + "/campo.ini", "Main");
|
||||
const unsigned int uDongleType = pWizard->GetDongleType();
|
||||
CampoIniMain.Set("Donglehw", uDongleType);
|
||||
CampoIniMain.Set("Study", strDataPath);
|
||||
CampoIniMain.Set("Firm", "com");
|
||||
//client o non client?
|
||||
if (uInstallationType == 2) //client
|
||||
{
|
||||
CampoIniMain.Set("TestDatabase", "N");
|
||||
CampoIniMain.Set("TestPrograms", "X");
|
||||
}
|
||||
else //altri (standard,server)
|
||||
{
|
||||
CampoIniMain.Set("TestDatabase", "X");
|
||||
CampoIniMain.Set("TestPrograms", "N");
|
||||
}
|
||||
}
|
||||
//paragrafo [Server]
|
||||
if (bInstallLurch)
|
||||
@ -2305,18 +2312,20 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
}
|
||||
}
|
||||
//..e modificare comunque l'install.ini aggiornando eventualmente l'origine dei programmi
|
||||
CampoIniFile CampoInstall(strPrgLocPath + "/install.ini", "Main");
|
||||
if (uInstallationType == 2) //client: directory origine sul server
|
||||
CampoInstall.Set("DiskPath", pWizard->GetPrgNetPath());
|
||||
else //e' il path assoluto dell'install.ini che sta in 'program' (es. D:\program)
|
||||
//parentesi necessaria per la scrittura immediata (non cancellare! serve per debug)
|
||||
{
|
||||
wxFileName strSourcePath(wxGetCwd());
|
||||
strSourcePath.AppendDir("program");
|
||||
strSourcePath.MakeAbsolute();
|
||||
const wxString strSrc = strSourcePath.GetPath();
|
||||
CampoInstall.Set("DiskPath", strSrc);
|
||||
CampoIniFile CampoInstall(strPrgLocPath + "/install.ini", "Main");
|
||||
if (uInstallationType == 2) //client: directory origine sul server
|
||||
CampoInstall.Set("DiskPath", pWizard->GetPrgNetPath());
|
||||
else //e' il path assoluto dell'install.ini che sta in 'program' (es. D:\program)
|
||||
{
|
||||
wxFileName strSourcePath(wxGetCwd());
|
||||
strSourcePath.AppendDir("program");
|
||||
strSourcePath.MakeAbsolute();
|
||||
const wxString strSrc = strSourcePath.GetPath();
|
||||
CampoInstall.Set("DiskPath", strSrc);
|
||||
}
|
||||
}
|
||||
|
||||
//solo se sta installando campo in postazione server e deve installare un gestore di servizi..
|
||||
//..avvia la procedura della creazione dell'autostart(un casino)
|
||||
if (bInstallLurch)
|
||||
@ -2344,9 +2353,6 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
|
||||
|
||||
// 4) lanciare ba1.exe -6 in uscita (non va qui! e' solo per ricordarsi di farlo!)
|
||||
|
||||
//questo e' un esempio di associazione automatica di estensione file
|
||||
//if (pWizard->GetBool(bAssocExtension))
|
||||
// AssociateExtension(strExe, wxT(".caz"));
|
||||
}
|
||||
pWizard->Destroy();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user