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 ok = false; | ||||
|   const TFilename local_setupdir = "setup"; | ||||
| 
 | ||||
|   const TFixed_string local_setupdir("setup"); | ||||
|   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
 | ||||
|   if (remote_setupdir.exist()) | ||||
|   bool ok = remote_setupdir.exist(); | ||||
|   if (ok) | ||||
|   { | ||||
|     remote_setupdir.add("*.*"); | ||||
| 
 | ||||
| @ -1291,8 +1290,6 @@ bool TMenu_application::copy_setup(const TString& remote_path) | ||||
|     if (!ar.empty()) | ||||
|     { | ||||
|       make_dir(local_setupdir); | ||||
| 
 | ||||
|       ok = true; | ||||
|       TFilename strsrc, strdst; | ||||
|       FOR_EACH_ARRAY_ROW (ar, i, row) | ||||
|       { | ||||
| @ -1300,14 +1297,14 @@ bool TMenu_application::copy_setup(const TString& remote_path) | ||||
|         strdst = local_setupdir; | ||||
|         strdst.add(strsrc.name()); | ||||
|         //se la copia dei files si inchioda esce
 | ||||
|         if (!fcopy(strsrc, strdst)) | ||||
|         { | ||||
|           ok = false; | ||||
|         ok = fcopy(strsrc, strdst); | ||||
|         if (!ok) | ||||
|           break; | ||||
|         } | ||||
|       } //FOR_EACH_ARRAY...
 | ||||
|     } //if(!ar.empty...
 | ||||
|   } //if(remote_setupdir...
 | ||||
|   else | ||||
|     ok = cantread_box(remote_setupdir); | ||||
| 
 | ||||
|   return ok; | ||||
| } | ||||
| @ -1407,13 +1404,16 @@ bool TMenu_application::test_programs() | ||||
|     if (update_needed > 0 && yesno_box(msg)) | ||||
|     { | ||||
|       //copia il contenuto della setup del server nella setup del client
 | ||||
|       if (sy_needed && copy_setup(remote_name.path())) | ||||
|       if (sy_needed) | ||||
|       { | ||||
|         //mette il flag di installing
 | ||||
| 		    set_installing_flag(); | ||||
|         //lancia setup in modalita' aggiornamento client e si suicida! (banzai!!)
 | ||||
|         TExternal_app app("setup\\setup.exe -uc"); | ||||
| 				app.run(true, 0, false);	     | ||||
|         if (copy_setup(remote_name.path())) | ||||
|         { | ||||
|           //mette il flag di installing
 | ||||
|   		    set_installing_flag(); | ||||
|           //lancia setup in modalita' aggiornamento client e si suicida! (banzai!!)
 | ||||
|           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)
 | ||||
| 			{ | ||||
|  | ||||
| @ -358,9 +358,12 @@ int TInstaller_mask::precheck_modules(bool only_newer) | ||||
|         check(r, chk); | ||||
| 
 | ||||
|       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++) | ||||
|           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); | ||||
|         check_enabled = false;  //..ed uscire
 | ||||
|       } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user