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