910970ab |
1 | #!/usr/bin/tclsh |
2 | |
3 | package require Tk |
4 | |
5 | source "./adm/genconfdeps.tcl" |
6 | |
7 | set aRowIter 0 |
8 | frame .myFrame -padx 5 -pady 5 |
9 | pack .myFrame -fill both -expand 1 |
10 | |
11 | set SYS_VS_LIST {} |
12 | set SYS_VC_LIST {} |
13 | set SYS_VCVARS_LIST {} |
14 | |
15 | # detect installed Visual Studio instances from global environment |
16 | if { [info exists ::env(VS130COMNTOOLS)] } { |
17 | lappend ::SYS_VS_LIST "Visual Studio 201x (vc13)" |
18 | lappend ::SYS_VC_LIST "vc13" |
19 | lappend ::SYS_VCVARS_LIST "%VS130COMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
20 | } |
21 | if { [info exists ::env(VS120COMNTOOLS)] } { |
22 | lappend ::SYS_VS_LIST "Visual Studio 2013 (vc12)" |
23 | lappend ::SYS_VC_LIST "vc12" |
24 | lappend ::SYS_VCVARS_LIST "%VS120COMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
25 | } |
26 | if { [info exists ::env(VS110COMNTOOLS)] } { |
27 | lappend ::SYS_VS_LIST "Visual Studio 2012 (vc11)" |
28 | lappend ::SYS_VC_LIST "vc11" |
29 | lappend ::SYS_VCVARS_LIST "%VS110COMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
30 | } |
31 | if { [info exists ::env(VS100COMNTOOLS)] } { |
32 | lappend ::SYS_VS_LIST "Visual Studio 2010 (vc10)" |
33 | lappend ::SYS_VC_LIST "vc10" |
34 | lappend ::SYS_VCVARS_LIST "%VS100COMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
35 | } |
36 | if { [info exists ::env(VS90COMNTOOLS)] } { |
37 | lappend ::SYS_VS_LIST "Visual Studio 2008 (vc9)" |
38 | lappend ::SYS_VC_LIST "vc9" |
39 | lappend ::SYS_VCVARS_LIST "%VS90COMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
40 | } |
41 | if { [info exists ::env(VS80COMNTOOLS)] } { |
42 | lappend ::SYS_VS_LIST "Visual Studio 2005 (vc8)" |
43 | lappend ::SYS_VC_LIST "vc8" |
44 | lappend ::SYS_VCVARS_LIST "%VS80COMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
45 | } |
46 | lappend ::SYS_VS_LIST "Custom" |
47 | lappend ::SYS_VC_LIST "vcX" |
48 | lappend ::SYS_VCVARS_LIST "%VSXXCOMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
49 | |
50 | set aVcVerIndex [lsearch $::SYS_VC_LIST $::VCVER] |
51 | set ::VSVER [lindex $::SYS_VS_LIST $aVcVerIndex] |
52 | if { "$::VCVARS" == "" } { |
53 | set ::VCVARS [lindex $::SYS_VCVARS_LIST $aVcVerIndex] |
54 | } |
55 | |
56 | proc wokdep:gui:Close {} { |
57 | # if changed ask |
58 | exit |
59 | } |
60 | |
61 | proc wokdep:gui:SwitchConfig {} { |
62 | set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsCombo current]] |
63 | set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsCombo current]] |
64 | |
65 | set ::CSF_OPT_INC {} |
66 | set ::CSF_OPT_LIB32 {} |
67 | set ::CSF_OPT_LIB64 {} |
68 | set ::CSF_OPT_BIN32 {} |
69 | set ::CSF_OPT_BIN64 {} |
70 | wokdep:gui:UpdateList |
71 | } |
72 | |
73 | proc wokdep:gui:SwitchArch {} { |
74 | if { "$::ARCH" == "32" } { |
75 | wokdep:gui:Show32Bitness ::aRowIter |
76 | } |
77 | if { "$::ARCH" == "64" } { |
78 | wokdep:gui:Show64Bitness ::aRowIter |
79 | } |
80 | |
81 | if { [llength [grid info .myFrame.mySave]] != 0 } { |
82 | grid forget .myFrame.mySave .myFrame.myClose |
83 | } |
84 | |
85 | # Bottom section |
86 | grid .myFrame.mySave -row $::aRowIter -column 4 -columnspan 2 |
87 | grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2 |
88 | } |
89 | |
90 | proc wokdep:gui:UpdateList {} { |
91 | set anIncErrs {} |
92 | set anLib32Errs {} |
93 | set anLib64Errs {} |
94 | set anBin32Errs {} |
95 | set anBin64Errs {} |
96 | wokdep:SearchTclTk anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
97 | wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
98 | wokdep:SearchX11 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
99 | if { "$::HAVE_FREEIMAGE" == "true" } { |
100 | wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
101 | } |
102 | if { "$::HAVE_GL2PS" == "true" } { |
103 | wokdep:SearchGL2PS anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
104 | } |
105 | if { "$::HAVE_TBB" == "true" } { |
106 | wokdep:SearchTBB anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
107 | } |
108 | if { "$::HAVE_OPENCL" == "true" } { |
109 | wokdep:SearchOpenCL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
110 | } |
111 | if { "$::HAVE_VTK" == "true" } { |
112 | wokdep:SearchVTK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
113 | } |
114 | if { "$::CHECK_QT4" == "true" } { |
115 | wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
116 | } |
117 | if { "$::CHECK_JDK" == "true" } { |
118 | wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs |
119 | } |
120 | |
121 | .myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"] |
122 | .myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"] |
123 | .myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"] |
124 | .myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"] |
125 | .myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"] |
126 | } |
127 | |
128 | proc wokdep:gui:BrowseVcVars {} { |
129 | set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"] |
130 | if { "$aResult" != "" } { |
131 | set ::VCVARS $aResult |
132 | } |
133 | } |
134 | |
135 | proc wokdep:gui:BrowsePartiesRoot {} { |
136 | set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"] |
137 | if { "$aResult" != "" } { |
138 | set ::PRODUCTS_PATH $aResult |
139 | wokdep:gui:UpdateList |
140 | } |
141 | } |
142 | |
143 | proc wokdep:gui:AddIncPath {} { |
144 | set aResult [tk_chooseDirectory -title "Choose a directory"] |
145 | if { "$aResult" != "" } { |
146 | lappend ::CSF_OPT_INC "$aResult" |
147 | wokdep:gui:UpdateList |
148 | } |
149 | } |
150 | |
151 | proc wokdep:gui:AddLib32Path {} { |
152 | set aResult [tk_chooseDirectory -title "Choose a directory"] |
153 | if { "$aResult" != "" } { |
154 | lappend ::CSF_OPT_LIB32 "$aResult" |
155 | wokdep:gui:UpdateList |
156 | } |
157 | } |
158 | |
159 | proc wokdep:gui:AddLib64Path {} { |
160 | set aResult [tk_chooseDirectory -title "Choose a directory"] |
161 | if { "$aResult" != "" } { |
162 | lappend ::CSF_OPT_LIB64 "$aResult" |
163 | wokdep:gui:UpdateList |
164 | } |
165 | } |
166 | |
167 | proc wokdep:gui:AddBin32Path {} { |
168 | set aResult [tk_chooseDirectory -title "Choose a directory"] |
169 | if { "$aResult" != "" } { |
170 | lappend ::CSF_OPT_BIN32 "$aResult" |
171 | wokdep:gui:UpdateList |
172 | } |
173 | } |
174 | |
175 | proc wokdep:gui:AddBin64Path {} { |
176 | set aResult [tk_chooseDirectory -title "Choose a directory"] |
177 | if { "$aResult" != "" } { |
178 | lappend ::CSF_OPT_BIN64 "$aResult" |
179 | wokdep:gui:UpdateList |
180 | } |
181 | } |
182 | |
183 | proc wokdep:gui:RemoveIncPath {} { |
184 | set aSelIndices [.myFrame.myIncList curselection] |
185 | if { [llength $aSelIndices] != 0 } { |
186 | .myFrame.myIncList delete [lindex $aSelIndices 0] |
187 | } |
188 | wokdep:gui:UpdateList |
189 | } |
190 | |
191 | proc wokdep:gui:RemoveLib32Path {} { |
192 | set aSelIndices [.myFrame.myLib32List curselection] |
193 | if { [llength $aSelIndices] != 0 } { |
194 | .myFrame.myLib32List delete [lindex $aSelIndices 0] |
195 | } |
196 | wokdep:gui:UpdateList |
197 | } |
198 | |
199 | proc wokdep:gui:RemoveLib64Path {} { |
200 | set aSelIndices [.myFrame.myLib64List curselection] |
201 | if { [llength $aSelIndices] != 0 } { |
202 | .myFrame.myLib64List delete [lindex $aSelIndices 0] |
203 | } |
204 | wokdep:gui:UpdateList |
205 | } |
206 | |
207 | proc wokdep:gui:RemoveBin32Path {} { |
208 | set aSelIndices [.myFrame.myBin32List curselection] |
209 | if { [llength $aSelIndices] != 0 } { |
210 | .myFrame.myBin32List delete [lindex $aSelIndices 0] |
211 | } |
212 | wokdep:gui:UpdateList |
213 | } |
214 | |
215 | proc wokdep:gui:RemoveBin64Path {} { |
216 | set aSelIndices [.myFrame.myBin64List curselection] |
217 | if { [llength $aSelIndices] != 0 } { |
218 | .myFrame.myBin64List delete [lindex $aSelIndices 0] |
219 | } |
220 | wokdep:gui:UpdateList |
221 | } |
222 | |
223 | proc wokdep:gui:ResetIncPath {} { |
224 | set ::CSF_OPT_INC {} |
225 | wokdep:gui:UpdateList |
226 | } |
227 | |
228 | proc wokdep:gui:ResetLib32Path {} { |
229 | set ::CSF_OPT_LIB32 {} |
230 | wokdep:gui:UpdateList |
231 | } |
232 | |
233 | proc wokdep:gui:ResetLib64Path {} { |
234 | set ::CSF_OPT_LIB64 {} |
235 | wokdep:gui:UpdateList |
236 | } |
237 | |
238 | proc wokdep:gui:ResetBin32Path {} { |
239 | set ::CSF_OPT_BIN32 {} |
240 | wokdep:gui:UpdateList |
241 | } |
242 | |
243 | proc wokdep:gui:ResetBin64Path {} { |
244 | set ::CSF_OPT_BIN64 {} |
245 | wokdep:gui:UpdateList |
246 | } |
247 | |
248 | proc wokdep:gui:Show32Bitness { theRowIter } { |
249 | upvar $theRowIter aRowIter |
250 | |
251 | if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } { |
252 | grid forget .myFrame.myLib64Lbl .myFrame.myLib64List .myFrame.myLib64Scrl |
253 | grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl |
254 | grid forget .myFrame.myBin64Lbl .myFrame.myBin64List .myFrame.myBin64Scrl |
255 | grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl |
256 | } |
257 | |
258 | # Additional libraries (32-bit) search paths |
259 | grid .myFrame.myLib32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
260 | incr aRowIter |
261 | grid .myFrame.myLib32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 |
262 | grid .myFrame.myLib32Scrl -row $aRowIter -column 5 -rowspan 4 |
263 | grid .myFrame.myLib32Add -row $aRowIter -column 6 |
264 | incr aRowIter |
265 | #grid .myFrame.myLib32Edit -row $aRowIter -column 6 |
266 | incr aRowIter |
267 | grid .myFrame.myLib32Remove -row $aRowIter -column 6 |
268 | incr aRowIter |
269 | grid .myFrame.myLib32Clear -row $aRowIter -column 6 |
270 | incr aRowIter |
271 | grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
272 | incr aRowIter |
273 | |
274 | # Additional executables (32-bit) search paths |
275 | grid .myFrame.myBin32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
276 | incr aRowIter |
277 | grid .myFrame.myBin32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 |
278 | grid .myFrame.myBin32Scrl -row $aRowIter -column 5 -rowspan 4 |
279 | grid .myFrame.myBin32Add -row $aRowIter -column 6 |
280 | incr aRowIter |
281 | #grid .myFrame.myBin32Edit -row $aRowIter -column 6 |
282 | incr aRowIter |
283 | grid .myFrame.myBin32Remove -row $aRowIter -column 6 |
284 | incr aRowIter |
285 | grid .myFrame.myBin32Clear -row $aRowIter -column 6 |
286 | incr aRowIter |
287 | grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
288 | incr aRowIter |
289 | } |
290 | |
291 | proc wokdep:gui:Show64Bitness { theRowIter } { |
292 | upvar $theRowIter aRowIter |
293 | |
294 | if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } { |
295 | grid forget .myFrame.myLib32Lbl .myFrame.myLib32List .myFrame.myLib32Scrl |
296 | grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl |
297 | grid forget .myFrame.myBin32Lbl .myFrame.myBin32List .myFrame.myBin32Scrl |
298 | grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl |
299 | } |
300 | |
301 | # Additional libraries (64-bit) search paths |
302 | grid .myFrame.myLib64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
303 | incr aRowIter |
304 | grid .myFrame.myLib64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 |
305 | grid .myFrame.myLib64Scrl -row $aRowIter -column 5 -rowspan 4 |
306 | grid .myFrame.myLib64Add -row $aRowIter -column 6 |
307 | incr aRowIter |
308 | #grid .myFrame.myLib64Edit -row $aRowIter -column 6 |
309 | incr aRowIter |
310 | grid .myFrame.myLib64Remove -row $aRowIter -column 6 |
311 | incr aRowIter |
312 | grid .myFrame.myLib64Clear -row $aRowIter -column 6 |
313 | incr aRowIter |
314 | grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
315 | incr aRowIter |
316 | |
317 | # Additional executables (64-bit) search paths |
318 | grid .myFrame.myBin64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
319 | incr aRowIter |
320 | grid .myFrame.myBin64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 |
321 | grid .myFrame.myBin64Scrl -row $aRowIter -column 5 -rowspan 4 |
322 | grid .myFrame.myBin64Add -row $aRowIter -column 6 |
323 | incr aRowIter |
324 | #grid .myFrame.myBin64Edit -row $aRowIter -column 6 |
325 | incr aRowIter |
326 | grid .myFrame.myBin64Remove -row $aRowIter -column 6 |
327 | incr aRowIter |
328 | grid .myFrame.myBin64Clear -row $aRowIter -column 6 |
329 | incr aRowIter |
330 | grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
331 | incr aRowIter |
332 | } |
333 | |
334 | # Header |
335 | ttk::label .myFrame.myVsLbl -text "Visual Studio configuration" -relief solid -padding {5 5 80 5} |
336 | ttk::combobox .myFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30 |
337 | ttk::combobox .myFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6 |
338 | entry .myFrame.myVcEntry -textvariable VCVER -width 6 |
339 | entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70 |
340 | ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars |
341 | |
342 | # |
343 | ttk::label .myFrame.myOcctBuildLbl -text "OCCT headers configuration" -relief solid -padding {5 5 80 5} |
344 | checkbutton .myFrame.myScutsCheck -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS |
345 | ttk::label .myFrame.myScutsLbl -text "Short-cut headers instead original ones in inc" |
346 | |
347 | # |
348 | ttk::label .myFrame.mySrchLbl -text "3rd-parties search path" -relief solid -padding {5 5 80 5} |
349 | entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80 |
350 | ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot |
351 | checkbutton .myFrame.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList |
352 | ttk::label .myFrame.myFImageLbl -text "Use FreeImage" |
353 | checkbutton .myFrame.myGl2psCheck -offvalue "false" -onvalue "true" -variable HAVE_GL2PS -command wokdep:gui:UpdateList |
354 | ttk::label .myFrame.myGl2psLbl -text "Use GL2PS" |
355 | checkbutton .myFrame.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList |
356 | ttk::label .myFrame.myTbbLbl -text "Use Intel TBB" |
357 | checkbutton .myFrame.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList |
358 | ttk::label .myFrame.myOpenClLbl -text "Use OpenCL" |
359 | checkbutton .myFrame.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX |
360 | ttk::label .myFrame.myMacGLXLbl -text "Use X11 for windows drawing" |
361 | ttk::label .myFrame.myVtkLbl -text "Use VTK" |
362 | checkbutton .myFrame.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList |
363 | checkbutton .myFrame.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList |
364 | ttk::label .myFrame.myQt4Lbl -text "Search Qt4" |
365 | checkbutton .myFrame.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList |
366 | ttk::label .myFrame.myJDKLbl -text "Search JDK" |
367 | |
368 | # Additional headers search paths |
369 | ttk::label .myFrame.myIncLbl -text "Additional headers search paths" -relief solid -padding {5 5 80 5} |
370 | scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview" |
371 | listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set" |
372 | ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath |
373 | ttk::button .myFrame.myIncEdit -text "Edit" |
374 | ttk::button .myFrame.myIncRemove -text "Remove" -command wokdep:gui:RemoveIncPath |
375 | ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncPath |
376 | ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
377 | |
378 | # Additional libraries (32-bit) search paths |
379 | ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths" -relief solid -padding {5 5 80 5} |
380 | scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview" |
381 | listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set" |
382 | ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path |
383 | ttk::button .myFrame.myLib32Edit -text "Edit" |
384 | ttk::button .myFrame.myLib32Remove -text "Remove" -command wokdep:gui:RemoveLib32Path |
385 | ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLib32Path |
386 | ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
387 | |
388 | # Additional libraries (64-bit) search paths |
389 | ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths" -relief solid -padding {5 5 80 5} |
390 | scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview" |
391 | listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set" |
392 | ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path |
393 | ttk::button .myFrame.myLib64Edit -text "Edit" |
394 | ttk::button .myFrame.myLib64Remove -text "Remove" -command wokdep:gui:RemoveLib64Path |
395 | ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLib64Path |
396 | ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
397 | |
398 | # Additional executables (32-bit) search paths |
399 | ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths" -relief solid -padding {5 5 80 5} |
400 | scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview" |
401 | listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set" |
402 | ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path |
403 | ttk::button .myFrame.myBin32Edit -text "Edit" |
404 | ttk::button .myFrame.myBin32Remove -text "Remove" -command wokdep:gui:RemoveBin32Path |
405 | ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBin32Path |
406 | ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
407 | |
408 | # Additional executables (64-bit) search paths |
409 | ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths" -relief solid -padding {5 5 80 5} |
410 | scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview" |
411 | listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set" |
412 | ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path |
413 | ttk::button .myFrame.myBin64Edit -text "Edit" |
414 | ttk::button .myFrame.myBin64Remove -text "Remove" -command wokdep:gui:RemoveBin64Path |
415 | ttk::button .myFrame.myBin64Clear -text "Reset" -command wokdep:gui:ResetBin64Path |
416 | ttk::label .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
417 | |
418 | # Bottom |
419 | ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom |
420 | ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close |
421 | |
422 | # Create grid |
423 | # Header |
424 | if { "$tcl_platform(platform)" == "windows" } { |
425 | grid .myFrame.myVsLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
426 | incr aRowIter |
427 | grid .myFrame.myVsCombo -row $aRowIter -column 0 -columnspan 2 -sticky w |
428 | grid .myFrame.myArchCombo -row $aRowIter -column 2 -sticky w |
429 | incr aRowIter |
430 | grid .myFrame.myVcEntry -row $aRowIter -column 0 |
431 | grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w |
432 | grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6 |
433 | incr aRowIter |
434 | } |
435 | |
436 | # |
437 | grid .myFrame.myOcctBuildLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
438 | incr aRowIter |
439 | grid .myFrame.myScutsCheck -row $aRowIter -column 0 -sticky e |
440 | grid .myFrame.myScutsLbl -row $aRowIter -column 1 -columnspan 2 -sticky w |
441 | incr aRowIter |
442 | # |
443 | grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
444 | incr aRowIter |
445 | grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5 |
446 | grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6 |
447 | incr aRowIter |
448 | grid .myFrame.myFImageCheck -row $aRowIter -column 0 -sticky e |
449 | grid .myFrame.myFImageLbl -row $aRowIter -column 1 -sticky w |
450 | grid .myFrame.myQt4Check -row $aRowIter -column 2 -sticky e |
451 | grid .myFrame.myQt4Lbl -row $aRowIter -column 3 -sticky w |
452 | incr aRowIter |
453 | grid .myFrame.myGl2psCheck -row $aRowIter -column 0 -sticky e |
454 | grid .myFrame.myGl2psLbl -row $aRowIter -column 1 -sticky w |
455 | grid .myFrame.myJDKCheck -row $aRowIter -column 2 -sticky e |
456 | grid .myFrame.myJDKLbl -row $aRowIter -column 3 -sticky w |
457 | incr aRowIter |
458 | grid .myFrame.myTbbCheck -row $aRowIter -column 0 -sticky e |
459 | grid .myFrame.myTbbLbl -row $aRowIter -column 1 -sticky w |
460 | incr aRowIter |
461 | grid .myFrame.myOpenClCheck -row $aRowIter -column 0 -sticky e |
462 | grid .myFrame.myOpenClLbl -row $aRowIter -column 1 -sticky w |
463 | incr aRowIter |
464 | grid .myFrame.myVtkCheck -row $aRowIter -column 0 -sticky e |
465 | grid .myFrame.myVtkLbl -row $aRowIter -column 1 -sticky w |
466 | incr aRowIter |
467 | if { "$::tcl_platform(os)" == "Darwin" } { |
468 | grid .myFrame.myMacGLXCheck -row $aRowIter -column 0 -sticky e |
469 | grid .myFrame.myMacGLXLbl -row $aRowIter -column 1 -sticky w |
470 | incr aRowIter |
471 | } |
472 | |
473 | # Additional headers search paths |
474 | grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
475 | incr aRowIter |
476 | grid .myFrame.myIncList -row $aRowIter -column 0 -rowspan 4 -columnspan 5 |
477 | grid .myFrame.myIncScrl -row $aRowIter -column 5 -rowspan 4 |
478 | grid .myFrame.myIncAdd -row $aRowIter -column 6 |
479 | incr aRowIter |
480 | #grid .myFrame.myIncEdit -row $aRowIter -column 6 |
481 | incr aRowIter |
482 | grid .myFrame.myIncRemove -row $aRowIter -column 6 |
483 | incr aRowIter |
484 | grid .myFrame.myIncClear -row $aRowIter -column 6 |
485 | incr aRowIter |
486 | grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
487 | incr aRowIter |
488 | |
489 | # Additional 32-bit search paths |
490 | if { "$ARCH" == "32" } { |
491 | wokdep:gui:Show32Bitness aRowIter |
492 | } |
493 | |
494 | # Additional 64-bit search paths |
495 | if { "$ARCH" == "64" } { |
496 | wokdep:gui:Show64Bitness aRowIter |
497 | } |
498 | |
499 | # Bottom section |
500 | grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2 |
501 | grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2 |
502 | |
503 | # Bind events |
504 | bind .myFrame.myVsCombo <<ComboboxSelected>> { |
505 | wokdep:gui:SwitchConfig |
506 | } |
507 | bind .myFrame.myArchCombo <<ComboboxSelected>> { |
508 | wokdep:gui:SwitchArch |
509 | } |
510 | |
511 | .myFrame.mySrchEntry configure -validate all -validatecommand { |
512 | #return [file exists "$::PRODUCTS_PATH"] |
513 | wokdep:gui:UpdateList |
514 | return 1 |
515 | } |
516 | |
517 | wokdep:gui:UpdateList |