From 36d430f5dc745130f1ea648a3ce6f118139bc9b0 Mon Sep 17 00:00:00 2001 From: luca Date: Wed, 3 Dec 2008 11:12:51 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:10.0?= =?UTF-8?q?=20182=20Files=20correlati=20=20=20=20=20:ba0.exe=20ba1.exe=20R?= =?UTF-8?q?icompilazione=20Demo=20:=20[=20]=20Commento=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20:gestione=20aggiornamento=20client;=20path=20?= =?UTF-8?q?corretti,=20impossibilit=C3=A0=20di=20avere=20su=20un=20client?= =?UTF-8?q?=20il=20modulo=20SR=20(sarebbe=20un=20controsenso),=20evitato?= =?UTF-8?q?=20il=20lancio=20di=20setup=20quando=20il=20client=20deve=20agg?= =?UTF-8?q?iornare=20moduli=20!=3D=20da=20SY=20(non=20serviva=20a=20nulla?= =?UTF-8?q?=20e=20faceva=20un=20casino=20bestia)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.65.10.50/trunk@17784 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba0100.cpp | 32 ++++++++++++++++++-------------- ba/ba0101.cpp | 2 +- ba/ba1700.cpp | 9 +++++++-- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index c672a4cc6..24919ad1b 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -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; diff --git a/ba/ba0101.cpp b/ba/ba0101.cpp index 148c9647f..2fe833858 100755 --- a/ba/ba0101.cpp +++ b/ba/ba0101.cpp @@ -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; } diff --git a/ba/ba1700.cpp b/ba/ba1700.cpp index 563e7ae40..b0398b4d9 100755 --- a/ba/ba1700.cpp +++ b/ba/ba1700.cpp @@ -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);