Patch level : 10.0
Files correlati : ba0.exe ba1.exe Ricompilazione Demo : [ ] Commento : Resa installazione piu' resistente per permettere aggiornamento di situazioni incoerenti molto datate git-svn-id: svn://10.65.10.50/trunk@20089 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ce944dbeda
commit
6b20f0e9b4
@ -1275,13 +1275,12 @@ static int get_module_version(TConfig& cfg, void* jolly)
|
|||||||
|
|
||||||
bool TMenu_application::copy_setup(const TString& remote_path)
|
bool TMenu_application::copy_setup(const TString& remote_path)
|
||||||
{
|
{
|
||||||
bool ok = false;
|
const TFixed_string local_setupdir("setup");
|
||||||
const TFilename local_setupdir = "setup";
|
|
||||||
|
|
||||||
TFilename remote_setupdir = remote_path;
|
TFilename remote_setupdir = remote_path;
|
||||||
remote_setupdir.add(local_setupdir.name());
|
remote_setupdir.add(local_setupdir);
|
||||||
//controlla se esiste la directory;è necessario in quanto se è una vecchia 4.0 potrebbe non esserci
|
//controlla se esiste la directory;è necessario in quanto se è una vecchia 4.0 potrebbe non esserci
|
||||||
if (remote_setupdir.exist())
|
bool ok = remote_setupdir.exist();
|
||||||
|
if (ok)
|
||||||
{
|
{
|
||||||
remote_setupdir.add("*.*");
|
remote_setupdir.add("*.*");
|
||||||
|
|
||||||
@ -1291,8 +1290,6 @@ bool TMenu_application::copy_setup(const TString& remote_path)
|
|||||||
if (!ar.empty())
|
if (!ar.empty())
|
||||||
{
|
{
|
||||||
make_dir(local_setupdir);
|
make_dir(local_setupdir);
|
||||||
|
|
||||||
ok = true;
|
|
||||||
TFilename strsrc, strdst;
|
TFilename strsrc, strdst;
|
||||||
FOR_EACH_ARRAY_ROW (ar, i, row)
|
FOR_EACH_ARRAY_ROW (ar, i, row)
|
||||||
{
|
{
|
||||||
@ -1300,14 +1297,14 @@ bool TMenu_application::copy_setup(const TString& remote_path)
|
|||||||
strdst = local_setupdir;
|
strdst = local_setupdir;
|
||||||
strdst.add(strsrc.name());
|
strdst.add(strsrc.name());
|
||||||
//se la copia dei files si inchioda esce
|
//se la copia dei files si inchioda esce
|
||||||
if (!fcopy(strsrc, strdst))
|
ok = fcopy(strsrc, strdst);
|
||||||
{
|
if (!ok)
|
||||||
ok = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
} //FOR_EACH_ARRAY...
|
} //FOR_EACH_ARRAY...
|
||||||
} //if(!ar.empty...
|
} //if(!ar.empty...
|
||||||
} //if(remote_setupdir...
|
} //if(remote_setupdir...
|
||||||
|
else
|
||||||
|
ok = cantread_box(remote_setupdir);
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -1407,7 +1404,9 @@ bool TMenu_application::test_programs()
|
|||||||
if (update_needed > 0 && yesno_box(msg))
|
if (update_needed > 0 && yesno_box(msg))
|
||||||
{
|
{
|
||||||
//copia il contenuto della setup del server nella setup del client
|
//copia il contenuto della setup del server nella setup del client
|
||||||
if (sy_needed && copy_setup(remote_name.path()))
|
if (sy_needed)
|
||||||
|
{
|
||||||
|
if (copy_setup(remote_name.path()))
|
||||||
{
|
{
|
||||||
//mette il flag di installing
|
//mette il flag di installing
|
||||||
set_installing_flag();
|
set_installing_flag();
|
||||||
@ -1415,6 +1414,7 @@ bool TMenu_application::test_programs()
|
|||||||
TExternal_app app("setup\\setup.exe -uc");
|
TExternal_app app("setup\\setup.exe -uc");
|
||||||
app.run(true, 0, false);
|
app.run(true, 0, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else //lancia l'installazione moduli alla vecchia maniera (e' una vecchia 4.0)
|
else //lancia l'installazione moduli alla vecchia maniera (e' una vecchia 4.0)
|
||||||
{
|
{
|
||||||
TExternal_app app("ba1 -6 /uADMIN");
|
TExternal_app app("ba1 -6 /uADMIN");
|
||||||
|
@ -360,7 +360,10 @@ int TInstaller_mask::precheck_modules(bool only_newer)
|
|||||||
if (chk && only_newer && cod_module == "sy") //se viene checkato il modulo sy (sistema) deve togliere..
|
if (chk && only_newer && cod_module == "sy") //se viene checkato il modulo sy (sistema) deve togliere..
|
||||||
{ //..la possibilita' di installare altri moduli..
|
{ //..la possibilita' di installare altri moduli..
|
||||||
for (int i = 0; i < a.items(); i++)
|
for (int i = 0; i < a.items(); i++)
|
||||||
disable_row(i); //disabilita tutte le righe dello sheet
|
{
|
||||||
|
disable_row(i); // disabilita tutte le righe dello sheet
|
||||||
|
if (i != r) uncheck(i); // puo' succedere che il modulo sy non sia il primo
|
||||||
|
}
|
||||||
disable(DLG_USER);
|
disable(DLG_USER);
|
||||||
check_enabled = false; //..ed uscire
|
check_enabled = false; //..ed uscire
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user