-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.tcl
55 lines (47 loc) · 1.14 KB
/
util.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
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
proc PutMessageLightBlue {msg} {
puts "\[36m* $msg\[0m"
}
proc PutMessagePink {msg} {
puts "\[35m* $msg\[0m"
}
proc PutMessageBlue {msg} {
puts "\[34m* $msg\[0m"
}
proc PutMessageBrown {msg} {
puts "\[33m* $msg\[0m"
}
#normal print function...
proc PutMessage {msg} {
puts "\[32m* $msg\[0m"
}
#printing error...
proc PutErrorMessage {msg} {
puts "\[31m$msg\[0m"
}
#printing error...
proc PutMessageRed {msg} {
puts "\[31m$msg\[0m"
}
#Check if package is available...
proc IsPackageAvailable {a} {
global xPackages
if {[lsearch $xPackages $a] != -1} {return 1}
return 0
}
#Create component.xml file
proc CreateComponentXML {} {
if {[catch {glob component.xml}]} {
set fh [open "component.xml" "w"]
puts $fh "<PISI>
<Name>Pilonga</Name>
<LocalName xml:lang=\"tr\">Pilonga paketleri</LocalName>
<Summary xml:lang=\"tr\">Pilonga paketleri</Summary>
<Description xml:lang=\"tr\">...</Description>
</PISI>"
close $fh
}
}