Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@15723 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8abe900362
commit
fdcdb2c058
@ -762,7 +762,7 @@ void CampoSetup::NormalSetup()
|
|||||||
//SOLO se sta aggiornando una versione antecedente alla 10.0 scrive la variabile Type nel campo.ini..
|
//SOLO se sta aggiornando una versione antecedente alla 10.0 scrive la variabile Type nel campo.ini..
|
||||||
//..ovvero deve testare se Type = 0
|
//..ovvero deve testare se Type = 0
|
||||||
if (CampoIniMain.GetInt("Type") == 0)
|
if (CampoIniMain.GetInt("Type") == 0)
|
||||||
CampoIniMain.Set("Type", uInstallationType + 1);
|
CampoIniMain.Set("Type", CampoIniMain.GetInstallationTypeNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5) COMPILAZIONE\AGGIORNAMENTO INSTALL.INI CON DISKPATH
|
// 5) COMPILAZIONE\AGGIORNAMENTO INSTALL.INI CON DISKPATH
|
||||||
@ -807,18 +807,26 @@ void CampoSetup::NormalSetup()
|
|||||||
{
|
{
|
||||||
const wxFileName strExe(strPrgLocPath, wxT("ba0.exe"));
|
const wxFileName strExe(strPrgLocPath, wxT("ba0.exe"));
|
||||||
wxString strLnk;
|
wxString strLnk;
|
||||||
switch (uInstallationType)
|
|
||||||
|
CampoIniFile CampoIniMain(strPrgLocPath + "/campo.ini", "Main");
|
||||||
|
int nInstType = CampoIniMain.GetInstallationTypeNumber();
|
||||||
|
switch (nInstType)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
strLnk = "Campo (Server)";
|
strLnk = "Campo";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
strLnk = "Campo (Server)";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
strLnk = "Campo (Client)";
|
strLnk = "Campo (Client)";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
strLnk = "Campo";
|
strLnk = "Campo";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//crea comunque l'icona
|
||||||
CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe, strLnk);
|
CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe, strLnk);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -846,8 +854,10 @@ void CampoSetup::NormalSetup()
|
|||||||
// 10) CHIUDE IL SETUP LANCIANDO BA1 -6 PER INSTALLAZIONE MODULI
|
// 10) CHIUDE IL SETUP LANCIANDO BA1 -6 PER INSTALLAZIONE MODULI
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
//lanciare ba1.exe -6 in uscita
|
//lanciare ba1.exe -6 in uscita
|
||||||
wxSetWorkingDirectory(strPrgLocPath);
|
if (wxSetWorkingDirectory(strPrgLocPath))
|
||||||
wxExecute("ba1 -6 /uADMIN");
|
wxExecute("ba1 -6 /uADMIN");
|
||||||
|
else
|
||||||
|
ErrorBox("Impossibile installare i moduli. Cartella di destinazione irraggiungibile!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,18 +41,13 @@ wxString GetDefaultDestination()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Magico metodo per stabilire se una directory e' condivisa ed e' su un disco locale!!
|
//Magico metodo per stabilire se una directory e' condivisa ed e' su un disco locale!!
|
||||||
bool IsSharedLocal (const wxString& strDir)
|
bool IsSharedDirectory (const wxString& strDir)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
wxString strDataDir = strDir.Lower();
|
wxString strDataDir = strDir.Lower();
|
||||||
strDataDir.Replace ("/", "\\");
|
strDataDir.Replace ("/", "\\");
|
||||||
|
|
||||||
UINT nDataDriveType = GetDriveType(strDataDir.Left(3));
|
|
||||||
|
|
||||||
//l'area dati e' su un disco locale?
|
|
||||||
if (nDataDriveType == DRIVE_FIXED)
|
|
||||||
{
|
|
||||||
NET_API_STATUS res = ERROR_MORE_DATA;
|
NET_API_STATUS res = ERROR_MORE_DATA;
|
||||||
while (res==ERROR_MORE_DATA && !found)
|
while (res==ERROR_MORE_DATA && !found)
|
||||||
{
|
{
|
||||||
@ -82,7 +77,7 @@ bool IsSharedLocal (const wxString& strDir)
|
|||||||
NetApiBufferFree(shi);
|
NetApiBufferFree(shi);
|
||||||
} //if(res ==...
|
} //if(res ==...
|
||||||
} //while (res==ERROR_MORE_DATA...
|
} //while (res==ERROR_MORE_DATA...
|
||||||
} //if (nDataDriveType...
|
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,15 +142,16 @@ int CampoIniFile::GetInstallationTypeNumber() const
|
|||||||
int nType = GetInt("Type");
|
int nType = GetInt("Type");
|
||||||
if (nType < 1 || nType > 3)
|
if (nType < 1 || nType > 3)
|
||||||
{
|
{
|
||||||
|
nType = 1; //di base e' standalone
|
||||||
const bool bTestDataBase = GetBool("TestDatabase");
|
const bool bTestDataBase = GetBool("TestDatabase");
|
||||||
const bool bTestPrograms = GetBool("TestPrograms");
|
const bool bTestPrograms = GetBool("TestPrograms");
|
||||||
nType = 1; //di base e' standalone
|
|
||||||
if (bTestDataBase) //se puo' manipolare i dati e' StandAlone o Server..
|
if (bTestDataBase) //se puo' manipolare i dati e' StandAlone o Server..
|
||||||
{
|
{
|
||||||
//ma e' Standalone o Server?
|
//ma e' Standalone o Server?
|
||||||
//se la directory dei dati e' condivisa in scrittura e' un server (almeno al 99%)
|
//se la directory dei dati e' condivisa in scrittura e' un server (almeno al 99%)
|
||||||
const wxString strStudy = Get("Study");
|
const wxString strStudy = Get("Study");
|
||||||
if (IsSharedLocal(strStudy))
|
if (IsSharedDirectory(strStudy))
|
||||||
nType = 2; //e' server
|
nType = 2; //e' server
|
||||||
}
|
}
|
||||||
else //..senno' e' client
|
else //..senno' e' client
|
||||||
|
@ -1111,22 +1111,35 @@ bool CampoWizardPage8::TransferDataToWindow()
|
|||||||
|
|
||||||
bool CampoWizardPage8::ForwardValidate()
|
bool CampoWizardPage8::ForwardValidate()
|
||||||
{
|
{
|
||||||
//controllo esistenza directory vuota per i programmi in locale
|
//controlli su directory selezionate
|
||||||
|
|
||||||
|
//1) directory di installazione programmi
|
||||||
const wxString strPrgLocPath = Get(801);
|
const wxString strPrgLocPath = Get(801);
|
||||||
|
//la directory di installazione programmi deve essere su un disco locale (sei un client!)
|
||||||
|
UINT nPrgDriveType = GetDriveType(strPrgLocPath.Left(3));
|
||||||
|
if (nPrgDriveType != DRIVE_FIXED)
|
||||||
|
return ErrorBox("La cartella selezionata per l'installazione dei programmi deve trovarsi su un disco locale!");
|
||||||
|
//controllo esistenza directory vuota per i programmi in locale
|
||||||
wxDir dirPrgLocPath(strPrgLocPath);
|
wxDir dirPrgLocPath(strPrgLocPath);
|
||||||
if (dirPrgLocPath.Exists(strPrgLocPath) && (dirPrgLocPath.HasFiles() || dirPrgLocPath.HasSubDirs()))
|
if (dirPrgLocPath.Exists(strPrgLocPath) && (dirPrgLocPath.HasFiles() || dirPrgLocPath.HasSubDirs()))
|
||||||
return ErrorBox("La cartella selezionata per l'installazione dei programmi NON e' valida! Selezionarne un'altra!");
|
return ErrorBox("La cartella selezionata per l'installazione dei programmi NON e' valida! Selezionarne un'altra!");
|
||||||
|
|
||||||
//controllo esistenza directory e programmi sul server
|
//2) directory di origine dei programmi sul server
|
||||||
const wxString strPrgNetPath = Get(803);
|
const wxString strPrgNetPath = Get(803);
|
||||||
if (!CheckPrgDir(strPrgNetPath))
|
if (!CheckPrgDir(strPrgNetPath))
|
||||||
return ErrorBox("La cartella selezionata come origine dei programmi NON e' valida!");
|
return ErrorBox("La cartella selezionata come origine dei programmi NON e' valida!");
|
||||||
|
|
||||||
//controllo esistenza dati sul server...
|
//3) directory dati sul server
|
||||||
const wxString strDataPath = Get(805);
|
const wxString strDataPath = Get(805);
|
||||||
|
//la cartella dei dati deve essere in remoto,senno' sei una postazione locale o un server
|
||||||
|
UINT nDataDriveType = GetDriveType(strDataPath.Left(3));
|
||||||
|
if (nDataDriveType != DRIVE_REMOTE)
|
||||||
|
return ErrorBox("La cartella dei dati deve trovarsi su un server remoto e non su un disco locale!");
|
||||||
|
//la cartella dei dati deve contenerli ed essere scrivibile
|
||||||
if (!CheckDataDir(strDataPath))
|
if (!CheckDataDir(strDataPath))
|
||||||
return ErrorBox("La cartella selezionata come area dati NON e' valida o non accessibile in scrittura!");
|
return ErrorBox("La cartella selezionata come area dati NON e' valida o non accessibile in scrittura!");
|
||||||
|
|
||||||
|
|
||||||
//setta alla pagina riassuntiva i valori della pagina attuale
|
//setta alla pagina riassuntiva i valori della pagina attuale
|
||||||
GetWizard().SetPrgLocPath(strPrgLocPath);
|
GetWizard().SetPrgLocPath(strPrgLocPath);
|
||||||
GetWizard().SetPrgNetPath(strPrgNetPath);
|
GetWizard().SetPrgNetPath(strPrgNetPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user