Patch level :10.0 182
Files correlati :ba0.exe ba1.exe Ricompilazione Demo : [ ] Commento :gestione aggiornamento client; path corretti, impossibilità di avere su un client il modulo SR (sarebbe un controsenso), evitato il lancio di setup quando il client deve aggiornare moduli != da SY (non serviva a nulla e faceva un casino bestia) git-svn-id: svn://10.65.10.50/trunk@17784 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
78e7198e38
commit
36d430f5dc
@ -1262,16 +1262,16 @@ bool TMenu_application::test_programs()
|
||||
TToken_string dangerous;
|
||||
int update_needed = 0;
|
||||
bool is_client = false;
|
||||
bool sy_needed = false;
|
||||
|
||||
//parentesi necessaria per richiudere subito il .ini!
|
||||
{
|
||||
TConfig prawin(CONFIG_INSTALL, "Main");
|
||||
const int type = prawin.get_int("Type");
|
||||
if (type == 3)
|
||||
is_client = true;
|
||||
else
|
||||
is_client = prawin.get_bool("TestPrograms");
|
||||
is_client = type == 3 || prawin.get_bool("TestPrograms");
|
||||
}
|
||||
|
||||
TString msg = TR("I seguenti moduli devono essere aggiornati prima dell'utilizzo:\n");
|
||||
if (is_client)
|
||||
{
|
||||
TConfig install("install.ini", "Main");
|
||||
@ -1292,15 +1292,16 @@ bool TMenu_application::test_programs()
|
||||
remote_install.for_each_paragraph(get_module_version, &his_modules);
|
||||
pi.addstatus(1);
|
||||
|
||||
TString msg = TR("I seguenti moduli devono essere aggiornati prima dell'utilizzo:\n");
|
||||
|
||||
//giro su tutti i moduli che sono sul server
|
||||
const TDongle& chiavetta = dongle();
|
||||
FOR_EACH_ASSOC_STRING(his_modules, h, str_code, str_tok)
|
||||
{
|
||||
//per prima cosa controlla se deve aggiornare SY e/o BA
|
||||
int module = 0;
|
||||
const TString4 code = str_code;
|
||||
if (code == "sr")
|
||||
continue; // Un client non può aggiornare il modulo server!
|
||||
|
||||
int module = 0;
|
||||
if (code != "sy" && code != "ba")
|
||||
module = chiavetta.module_name2code(code);
|
||||
|
||||
@ -1320,6 +1321,11 @@ bool TMenu_application::test_programs()
|
||||
//...non lascierebbe funzionare nulla!!!!
|
||||
if (module > 0)
|
||||
dangerous.add(code);
|
||||
else
|
||||
{
|
||||
if (code == "sy")
|
||||
sy_needed = true;
|
||||
}
|
||||
|
||||
if (msg.len() < 200)
|
||||
{
|
||||
@ -1341,25 +1347,23 @@ bool TMenu_application::test_programs()
|
||||
} //if (!v1.blank()...
|
||||
} //if (chiavetta.active(module...
|
||||
} //FOR_EACH_ASSOC_STR
|
||||
|
||||
if (update_needed > 0)
|
||||
warning_box(msg);
|
||||
} //if(remote_name.exist()...
|
||||
|
||||
if (update_needed > 0 && yesno_box(TR("Si desidera aggiornare i moduli adesso?")))
|
||||
if (update_needed > 0 && yesno_box(msg))
|
||||
{
|
||||
//copia il contenuto della setup del server nella setup del client
|
||||
if (copy_setup(remote_name.path()))
|
||||
if (sy_needed && copy_setup(remote_name.path()))
|
||||
{
|
||||
//mette il flag di installing
|
||||
set_installing_flag();
|
||||
//lancia setup in modalita' aggiornamento client e si suicida! (banzai!!)
|
||||
xvt_sys_execute("setup\\setup.exe -uc", false, false);
|
||||
TExternal_app app("setup\\setup.exe -uc");
|
||||
app.run(true, 0, false);
|
||||
}
|
||||
else //lancia l'installazione moduli alla vecchia maniera (e' una vecchia 4.0)
|
||||
{
|
||||
TExternal_app app("ba1 -6 /uADMIN");
|
||||
app.run(true);
|
||||
app.run(true, 0, false);
|
||||
}
|
||||
//se lancia un'installazione->esce!!!
|
||||
return false;
|
||||
|
@ -763,7 +763,7 @@ bool is_tassan()
|
||||
bool yes = false;
|
||||
if (dongle().number() == 202)
|
||||
{
|
||||
const TDate morte(24, 11, 2008); // Giorno della morte del programma
|
||||
const TDate morte(14, 02, 2009); // Giorno della morte del programma (S.Valentino)
|
||||
const TDate oggi(TODAY);
|
||||
yes = oggi >= morte;
|
||||
}
|
||||
|
@ -274,8 +274,13 @@ int TInstaller_mask::precheck_modules(bool only_newer)
|
||||
(release == currrelease && (only_newer ? patchlevel > currpatch : patchlevel >= currpatch) ))
|
||||
)
|
||||
{
|
||||
// checca il modulo o la patch se ho installata la stessa versione
|
||||
const bool chk = rigar.get_char(C_ISPATCH) != 'X' || release == currrelease;
|
||||
// spunta il modulo o la patch se ho installata la stessa versione
|
||||
bool chk = rigar.get_char(C_ISPATCH) != 'X' || release == currrelease;
|
||||
|
||||
// non spunta automaticamente il modulo server sui client
|
||||
if (chk && cod_module == "sr" && test_station_type() != 2)
|
||||
chk = false;
|
||||
|
||||
if (check_enabled)
|
||||
check(r, chk);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user