Added first version of the Perl regression testing framework.
[wine/multimedia.git] / tools / wineconf.libs / saveRC.tcl
blob4f4d71296a3e8dd7622c3e16483d7a3b320cab24
1 proc TkW:exit {} {
2 global EXIT_title QUITSAVING QUITNOSAVE CANCEL TKW
3 set base .saveRC
4 if {![winfo exists .choosemethod]} {
5 cd $TKW
6 TkW:choosemethod
7 return
10 TkW:CloseOtherWindows
12 TkW:debug "Other should be detroyed now......"
13 if {[winfo exists .saveRC]} {
14 wm deiconify .saveRC; return
16 TkW:debug "Entering TkW:exit"
17 ###################
18 # CREATING WIDGETS
19 ###################
20 toplevel .saveRC -class Toplevel \
21 -background #ffffff
22 wm focusmodel .saveRC passive
23 wm geometry .saveRC 412x163+404+267
24 wm maxsize .saveRC 1265 994
25 wm minsize .saveRC 1 1
26 wm overrideredirect .saveRC 0
27 wm resizable .saveRC 1 1
28 wm deiconify .saveRC
29 wm title .saveRC "$EXIT_title"
30 #wm iconbitmap .saveRC @$TKW/setupfiles/images/setup2.xbm
31 #wm iconmask .saveRC @$TKW/setupfiles/images/setupmask2.xbm
33 label .saveRC.lab18 \
34 -background #dddddd \
35 -font -Adobe-Helvetica-Medium-R-Normal-*-*-160-*-*-*-*-*-* \
36 -foreground #0000f6 -relief groove -text label \
37 -textvariable CONFIRMQUIT -wraplength 350
38 button .saveRC.but19 \
39 -font -Adobe-Helvetica-Medium-R-Normal-*-*-120-*-*-*-*-*-* -padx 9 \
40 -pady 3 -text button -textvariable QUITSAVING -command {TkW:saveRC;exit}
41 button .saveRC.but20 \
42 -font -Adobe-Helvetica-Medium-R-Normal-*-*-120-*-*-*-*-*-* -padx 9 \
43 -pady 3 -text button -textvariable QUITNOSAVE -command {exit}
44 button .saveRC.but21 \
45 -font -Adobe-Helvetica-Medium-R-Normal-*-*-120-*-*-*-*-*-* -padx 9 \
46 -pady 3 -text button -textvariable CANCEL -command {destroy .saveRC}
47 ###################
48 # SETTING GEOMETRY
49 ###################
50 place .saveRC.lab18 \
51 -x 5 -y 5 -width 403 -height 110 -anchor nw -bordermode ignore
52 place .saveRC.but19 \
53 -x 5 -y 120 -width 135 -height 38 -anchor nw -bordermode ignore
54 place .saveRC.but20 \
55 -x 138 -y 120 -width 135 -height 38 -anchor nw -bordermode ignore
56 place .saveRC.but21 \
57 -x 273 -y 120 -width 135 -height 38 -anchor nw -bordermode ignore
60 proc TkW:CloseOtherWindows {} {
61 set Wins ".wineconf .compile .install .insbin"
63 foreach i $Wins { if [winfo exists $i] {destroy $i}}
65 return
69 proc TkW:saveRC {} {
70 # This proc saves the ~/.winesetuprc file
71 # all the last compile option, source dest, install dire,
72 # and the like are saved.
73 # Could be improved by adding a "default" button in some places so some
74 #changes could be ignore there....
75 # For now, it saves all the last selections.
77 # Opens the ~/.winesetuprc for writting:
78 set savein [open ~/.winesetuprc w]
80 # Puts the comments as well as the content:
82 puts $savein "#"
83 puts $savein "# System description:"
84 puts $savein "#"
85 global distrib; puts $savein "set distrib \"$distrib\""
86 global kernel; puts $savein "set kernel \"$kernel\""
87 global processor; puts $savein "set processor \"$processor\""
88 global FTPNUM bz2docdest bz2exedest
89 global BROWSER;puts $savein "set BROWSER \"$BROWSER\""
90 puts $savein "#"
91 puts $savein "# Method:"
92 puts $savein "#"
93 global choosenmethod; puts $savein "set choosenmethod \"$choosenmethod\""
94 puts $savein "#"
95 puts $savein "# Compile options"
96 puts $savein "#"
97 puts $savein "# where to search the archive"
98 global dir_search; puts $savein "set dir_search \"$dir_search\""
99 puts $savein "# where to put the executable"
100 global bindir; puts $savein "set bindir \"$bindir\""
101 puts $savein "# options"
102 global debug trace noemu dll nolib clean
103 puts $savein "set debug $debug ; set trace $trace ; set noemu $noemu ; set dll $dll ; set nolib $nolib ; set clean $clean"
105 puts $savein "# where to put the source tree"
106 global srcdest; puts $savein "set srcdest \"$srcdest\""
107 puts $savein "# where is the top of the source tree"
108 global winedir; puts $savein "set winedir \"$winedir\""
109 puts $savein "#"
110 puts $savein "# Number in the list of ftp site to use"
111 puts $savein "set FTPNUM $FTPNUM"
113 puts $savein "#"
114 puts $savein "# BZIP@ exe and doc dest"
115 puts $savein "set bz2exedest $bz2exedest"
116 puts $savein "set bz2docdest $bz2docdest"
118 puts $savein "# "
119 puts $savein "# memory from last start"
120 puts $savein "# "
121 global laststart ; puts $savein "set laststart \"$laststart\""