-
Notifications
You must be signed in to change notification settings - Fork 0
/
Katyusha.tcl
executable file
·166 lines (124 loc) · 4.15 KB
/
Katyusha.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/usr/bin/tclsh
## Créé le 22/6/2020 ##
######################################################
# ___ __ __ ___ __ ___ ____ #
# |__| | | / \ / |__| | | / \ |__| | #
# | |--| | | ---- | |--| | | |\ |-- #
# | | | \__/ ___/ | | | \__/ | \ |___ #
# #
######################################################
# Répertoire racine du script
set rpr [file dirname [info script]]
# Répertoire racine de l'exécutable
#set rpr [file dirname [file normalize [info nameofexecutable]]]
# Pour les packages embarqués
#lappend auto_path [file join "$rpr/packages"]
source "$rpr/C/fonctions_interface.tcl"
source "$rpr/C/Images.tcl"
source "$rpr/C/Splash.tcl"
source "$rpr/C/MCD/MCD.tcl"
source "$rpr/C/MCD/INTERFACE_Objets.tcl"
source "$rpr/C/MCD/Objets.tcl"
source "$rpr/C/MCD/Heritages.tcl"
source "$rpr/C/MCD/Associations.tcl"
source "$rpr/C/MCD/Etiquettes.tcl"
source "$rpr/C/MCD/Entites.tcl"
source "$rpr/C/MCD/Attributs.tcl"
source "$rpr/C/MCD/Interface_MCD.tcl"
source "$rpr/C/MCD/INTERFACE_Associations.tcl"
source "$rpr/C/MCD/INTERFACE_Etiquettes.tcl"
source "$rpr/C/MCD/INTERFACE_Entites.tcl"
source "$rpr/C/MCD/INTERFACE_Heritages.tcl"
source "$rpr/C/UML/UML.tcl"
source "$rpr/C/UML/Objets.tcl"
source "$rpr/C/UML/Classes.tcl"
source "$rpr/C/UML/Interface_UML.tcl"
source "$rpr/C/UML/Interface_Classes.tcl"
source "$rpr/C/UML/Interface_Objets.tcl"
source "$rpr/C/Interface_Objets_MCD_UML.tcl"
source "$rpr/C/Objets_MCD_UML.tcl"
source "$rpr/C/INTERFACE_Code.tcl"
source "$rpr/C/INTERFACE_Configurations.tcl"
source "$rpr/C/C.tcl"
source "$rpr/C/SQL_gen.tcl"
source "$rpr/C/XML.tcl"
source "$rpr/C/sauvegarde_charge.tcl"
source "$rpr/C/Configurations.tcl"
source "$rpr/C/verification_mcd.tcl"
source "$rpr/C/Interface.tcl"
source "$rpr/C/SQL.tcl"
source "$rpr/C/Sauvegarde.tcl"
source "$rpr/C/Charge.tcl"
source "$rpr/C/Historique.tcl"
source "$rpr/C/SVG.tcl"
source "$rpr/C/Code.tcl"
source "$rpr/C/Modeles/Code_gen.tcl"
source "$rpr/C/MLD.tcl"
source "$rpr/C/Liens.tcl"
source "$rpr/libs/canvas2svg.tcl"
source "$rpr/libs/arabe.tcl"
set THEME katyusha_darkblue
# Tk
puts -nonewline "Chargement de Tk"
if {[catch {package require Tk}]} {
puts " # TK obligatoire pour ce programme!"
exit
} else {
puts " # OK!"
}
source "$rpr/Themes/katyusha/$THEME.tcl"
ttk::style theme use $THEME
set tbg [ttk::style lookup TFrame -background]
lassign [winfo rgb . $tbg] bg_r bg_g bg_b
. configure -background $tbg
# FreeWrap ne supporte pas l'importation de packages traditionnel
source "$rpr/packages/tooltip.tcl"
source "$rpr/packages/phgettext/phgettext.tcl"
source "$rpr/packages/phxml/phxml.tcl"
array set CONFIG {}
array set MCD {}
# Splash
set CONFIGS(RESOLUTION) "auto"
Katyusha_Splash $rpr
puts "Initialisation........"
Katyusha_Images
# Configurations
puts "Chargement des configurations"
set rep_configs "~/.phosphore/katyusha_mcd"
Katyusha_Configurations_init
Katyusha_Configurations_charge $rpr $rep_configs
# Répertoire par défaut des projets Katyusha MCD
set id_projet -1
set ENV "null"
Katyusha_MCD_init
Katyusha_UML_init
set version "1.0.0 alpha 1"
set splash [lindex [list "Катюша!" "Katyusha!" "!کاتیوشا" "कात्युषा" "კატიუშა" "Կատյուշա" "Катюша!"] [expr int((rand() * 7) + 1) - 1]]
set sgbd 0
# Fichier dans lequel toutes les sauvegardes simples se feronts
set fichier_sauvegarde ""
# Action du bouton Gauche de la souris
set ACTION_B1 "null"
set zoom_compteur 0
# Initialisation de la traduction
puts "Chargement de la langue locale"
phgt::src "$rpr/locale" "fr"
# Par défaut, français
#Katyusha_Configurations_packages
puts "v$version"
puts "OK!"
set OS [lindex $tcl_platform(os) 0]
set NOTEBOOK_MCD ".editeurs.notebook_mcd"
set NOTEBOOK_UML ".editeurs.notebook_uml"
set ZONE_MCD ".editeurs.notebook_mcd.mcd"
set ZONE_UML ".editeurs.notebook_uml.uml"
puts "OS : $OS"
after 2000
Katyusha_Interface
source "$rpr/C/MCD/Bind_MCD.tcl"
source "$rpr/C/UML/Bind_UML.tcl"
source "$rpr/C/Commandes.tcl"
# Si un projet est passé en paramètre, l'ouvrir
if { $::argc > 0 } {
Katyusha_Charge [lindex $::argv 0]
}