#rR gscope_setup.tcl # #rR Il faut laisser setup_perso en debut de ce fichier global FichierSetupPerso ; set FichierSetupPerso "SetupPerso_non_defini" if {[info exists env(HOME)] && [file exists "$env(HOME)/gscoperso/gscope_setup_perso.tcl"]} { set FichierSetupPerso "$env(HOME)/gscoperso/gscope_setup_perso.tcl" if {[file exists $FichierSetupPerso]} { source $FichierSetupPerso } } #rR maintenant peut venir la suite proc QuidSeqEstDisponible {} { global QuidSeqEstDisponible if { ! [info exists QuidSeqEstDisponible]} { set QuidSeqEstDisponible 0 } return $QuidSeqEstDisponible } proc WithinGenoret {} { return 0 } proc WithinFed {} { return 0 } proc OutsideCSTB {} { return [expr ! [InsideCSTB]] } proc InsideCSTB {} { global InsideCSTB global OutsideCSTB if {[info exists InsideCSTB]} { return $InsideCSTB } set H "" catch { set H [exec hostname] } if {$H=="bob"} { set InsideCSTB 1 } else { set HostEna "" catch {set HostEna [exec host ena]} set InsideCSTB [regexp "192.168.10.130" $HostEna] } set OutsideCSTB [expr ! $InsideCSTB] return $InsideCSTB } proc GscopeIsOpen {} { global GscopeIsOpen if {[info exists GscopeIsOpen]} { return $GscopeIsOpen } set GscopeIsOpen [InsideCSTB] return $GscopeIsOpen } proc WithPackage {Pack {Valeur ""}} { global WithPackage if {$Valeur!=""} { set WithPackage($Pack) $Valeur } if {[info exists WithPackage($Pack)]} { return [set WithPackage($Pack)] } set WithPackage(Default,CafeDesSciences) [InsideCSTB] set WithPackage(Default,GscopeContrib) 1 set WithPackage(Default,GscopeSpecifique) 1 set WithPackage(Default,Genoret) 0 set WithPackage(Default,Ordali) 1 set WithPackage(Default,Correlator) 1 set WithPackage(Default,Math3D) 1 if { ! [info exists WithPackage(Default,$Pack)]} { set WithPackage(Default,$Pack) 0 } set WithPackage($Pack) [set WithPackage(Default,$Pack)] return [set WithPackage($Pack)] } global ChoixParmiDansListBox ; set ChoixParmiDansListBox 0 global GscopeAideSurLesBoutons ; set GscopeAideSurLesBoutons 1 proc EstUneVariableGlobaleGenerale variable { if { ! [regexp {^[A-Z]} $variable]} { return 1 } if {[regexp "^Fichier" $variable]} { return 1 } if {[regexp "^Gscope" $variable]} { return 1 } if {[regexp "Wscope" $variable]} { return 1 } if {[regexp "^WithPack" $variable]} { return 1 } if {[regexp "^Commande" $variable]} { return 1 } if {[regexp "^LesBouto" $variable]} { return 1 } if {[regexp "Glossaire" $variable]} { return 1 } if {[regexp "Secret" $variable]} { return 1 } if {$variable=="OutsideCSTB"} { return 1 } if {$variable=="VersionDeGscope"} { return 1 } if {$variable=="VariableADetruire"} { return 1 } if {$variable=="RepertoireDeTravail"} { return 1 } if {$variable=="QuidSeqEstDisponible"} { return 1 } if {$variable=="ChoixParmiDansListBox"} { return 1 } if {$variable=="OrthographeCanonique"} { return 1 } if {$variable=="OrthographeCanoniqueInverse"} { return 1 } return 0 } #rR if {[catch { package require Img } ErreurImg]} { puts stderr $ErreurImg } if {[catch {package require http} MessagePourPackageRequireHttp]} {} if {[catch {package require tdom} MessagePourPackageRequireTdom]} {} #global OrfsAvecStop ; set OrfsAvecStop 1