0027811: Configuration - allow building TKOpenGl with OpenGL ES on Windows
[occt.git] / adm / genconf.tcl
1 #!/usr/bin/tclsh
2
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 # =======================================================================
23
24 # load tools
25 source [file join [file dirname [info script]] genconfdeps.tcl]
26
27 package require Tk
28
29 set aRowIter 0
30 set aCheckRowIter 0
31 frame .myFrame -padx 5 -pady 5
32 pack  .myFrame -fill both -expand 1
33 frame .myFrame.myVsFrame
34 frame .myFrame.myHxxChecks
35 frame .myFrame.myChecks
36
37 set SYS_VS_LIST {}
38 set SYS_VC_LIST {}
39 set SYS_VCVARS_LIST {}
40
41 # detect installed Visual Studio instances from global environment
42 if { [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 }
47 if { [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"
51 }
52 if { [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 }
57 if { [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 }
62 if { [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 }
67 if { [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 }
72 if { [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 }
77 lappend ::SYS_VS_LIST "Custom"
78 lappend ::SYS_VC_LIST "vcX"
79 lappend ::SYS_VCVARS_LIST "%VSXXCOMNTOOLS%..\\..\\VC\\vcvarsall.bat"
80
81 set aVcVerIndex [lsearch $::SYS_VC_LIST $::VCVER]
82 set ::VSVER  [lindex $::SYS_VS_LIST     $aVcVerIndex]
83 if { "$::VCVARS" == "" } {
84   set ::VCVARS [lindex $::SYS_VCVARS_LIST $aVcVerIndex]
85 }
86
87 proc wokdep:gui:Close {} {
88   # if changed ask
89   exit
90 }
91
92 proc wokdep:gui:SwitchConfig {} {
93   set ::VCVER  [lindex $::SYS_VC_LIST     [.myFrame.myVsFrame.myVsCombo current]]
94   set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]]
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
104 proc 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
121 proc 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_GLES2" == "true" } {
131     if { "$::HAVE_GL2PS" == "true" } {
132       lappend anIncErrs "Error: gl2ps can not be used within OpenGL ES"
133     }
134     if { "$::HAVE_D3D" == "true" } {
135       lappend anIncErrs "Error: Direct3D can not be used within OpenGL ES"
136     }
137     wokdep:SearchEGL     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
138     wokdep:SearchGLES    anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
139   }
140   if { "$::HAVE_FREEIMAGE" == "true" } {
141     wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
142   }
143   if { "$::HAVE_GL2PS" == "true" } {
144     wokdep:SearchGL2PS   anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
145   }
146   if { "$::HAVE_TBB" == "true" } {
147     wokdep:SearchTBB     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
148   }
149 #  if { "$::HAVE_OPENCL" == "true" } {
150 #    wokdep:SearchOpenCL  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
151 #  }
152   if { "$::HAVE_VTK" == "true" } {
153     wokdep:SearchVTK  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
154   }
155   if { "$::CHECK_QT4" == "true" } {
156     wokdep:SearchQt4     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
157   }
158   if { "$::CHECK_JDK" == "true" } {
159     wokdep:SearchJDK     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
160   }
161
162   .myFrame.myIncErrLbl   configure -text [join $anIncErrs   "\n"]
163   .myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"]
164   .myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"]
165   .myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"]
166   .myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"]
167 }
168
169 proc wokdep:gui:BrowseVcVars {} {
170   set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"]
171   if { "$aResult" != "" } {
172     set ::VCVARS $aResult
173   }
174 }
175
176 proc wokdep:gui:BrowsePartiesRoot {} {
177   set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"]
178   if { "$aResult" != "" } {
179     set ::PRODUCTS_PATH $aResult
180     wokdep:gui:UpdateList
181   }
182 }
183
184 proc wokdep:gui:AddIncPath {} {
185   set aResult [tk_chooseDirectory -title "Choose a directory"]
186   if { "$aResult" != "" } {
187     lappend ::CSF_OPT_INC "$aResult"
188     wokdep:gui:UpdateList
189   }
190 }
191
192 proc wokdep:gui:AddLib32Path {} {
193   set aResult [tk_chooseDirectory -title "Choose a directory"]
194   if { "$aResult" != "" } {
195     lappend ::CSF_OPT_LIB32 "$aResult"
196     wokdep:gui:UpdateList
197   }
198 }
199
200 proc wokdep:gui:AddLib64Path {} {
201   set aResult [tk_chooseDirectory -title "Choose a directory"]
202   if { "$aResult" != "" } {
203     lappend ::CSF_OPT_LIB64 "$aResult"
204     wokdep:gui:UpdateList
205   }
206 }
207
208 proc wokdep:gui:AddBin32Path {} {
209   set aResult [tk_chooseDirectory -title "Choose a directory"]
210   if { "$aResult" != "" } {
211     lappend ::CSF_OPT_BIN32 "$aResult"
212     wokdep:gui:UpdateList
213   }
214 }
215
216 proc wokdep:gui:AddBin64Path {} {
217   set aResult [tk_chooseDirectory -title "Choose a directory"]
218   if { "$aResult" != "" } {
219     lappend ::CSF_OPT_BIN64 "$aResult"
220     wokdep:gui:UpdateList
221   }
222 }
223
224 proc wokdep:gui:RemoveIncPath {} {
225   set aSelIndices [.myFrame.myIncList curselection]
226   if { [llength $aSelIndices] != 0 } {
227     .myFrame.myIncList delete [lindex $aSelIndices 0]
228   }
229   wokdep:gui:UpdateList
230 }
231
232 proc wokdep:gui:RemoveLib32Path {} {
233   set aSelIndices [.myFrame.myLib32List curselection]
234   if { [llength $aSelIndices] != 0 } {
235     .myFrame.myLib32List delete [lindex $aSelIndices 0]
236   }
237   wokdep:gui:UpdateList
238 }
239
240 proc wokdep:gui:RemoveLib64Path {} {
241   set aSelIndices [.myFrame.myLib64List curselection]
242   if { [llength $aSelIndices] != 0 } {
243     .myFrame.myLib64List delete [lindex $aSelIndices 0]
244   }
245   wokdep:gui:UpdateList
246 }
247
248 proc wokdep:gui:RemoveBin32Path {} {
249   set aSelIndices [.myFrame.myBin32List curselection]
250   if { [llength $aSelIndices] != 0 } {
251     .myFrame.myBin32List delete [lindex $aSelIndices 0]
252   }
253   wokdep:gui:UpdateList
254 }
255
256 proc wokdep:gui:RemoveBin64Path {} {
257   set aSelIndices [.myFrame.myBin64List curselection]
258   if { [llength $aSelIndices] != 0 } {
259     .myFrame.myBin64List delete [lindex $aSelIndices 0]
260   }
261   wokdep:gui:UpdateList
262 }
263
264 proc wokdep:gui:ResetIncPath {} {
265   set ::CSF_OPT_INC {}
266   wokdep:gui:UpdateList
267 }
268
269 proc wokdep:gui:ResetLib32Path {} {
270   set ::CSF_OPT_LIB32 {}
271   wokdep:gui:UpdateList
272 }
273
274 proc wokdep:gui:ResetLib64Path {} {
275   set ::CSF_OPT_LIB64 {}
276   wokdep:gui:UpdateList
277 }
278
279 proc wokdep:gui:ResetBin32Path {} {
280   set ::CSF_OPT_BIN32 {}
281   wokdep:gui:UpdateList
282 }
283
284 proc wokdep:gui:ResetBin64Path {} {
285   set ::CSF_OPT_BIN64 {}
286   wokdep:gui:UpdateList
287 }
288
289 proc wokdep:gui:Show32Bitness { theRowIter } {
290   upvar $theRowIter aRowIter
291
292   if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } {
293     grid forget .myFrame.myLib64Lbl .myFrame.myLib64List   .myFrame.myLib64Scrl
294     grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl
295     grid forget .myFrame.myBin64Lbl .myFrame.myBin64List   .myFrame.myBin64Scrl
296     grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl
297   }
298
299   # Additional libraries (32-bit) search paths
300   grid .myFrame.myLib32Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
301   incr aRowIter
302   grid .myFrame.myLib32List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
303   grid .myFrame.myLib32Scrl   -row $aRowIter -column 5 -rowspan 4
304   grid .myFrame.myLib32Add    -row $aRowIter -column 6
305   incr aRowIter
306   #grid .myFrame.myLib32Edit   -row $aRowIter -column 6
307   incr aRowIter
308   grid .myFrame.myLib32Remove -row $aRowIter -column 6
309   incr aRowIter
310   grid .myFrame.myLib32Clear  -row $aRowIter -column 6
311   incr aRowIter
312   grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
313   incr aRowIter
314
315   # Additional executables (32-bit) search paths
316   grid .myFrame.myBin32Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
317   incr aRowIter
318   grid .myFrame.myBin32List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
319   grid .myFrame.myBin32Scrl   -row $aRowIter -column 5 -rowspan 4
320   grid .myFrame.myBin32Add    -row $aRowIter -column 6
321   incr aRowIter
322   #grid .myFrame.myBin32Edit   -row $aRowIter -column 6
323   incr aRowIter
324   grid .myFrame.myBin32Remove -row $aRowIter -column 6
325   incr aRowIter
326   grid .myFrame.myBin32Clear  -row $aRowIter -column 6
327   incr aRowIter
328   grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
329   incr aRowIter
330 }
331
332 proc wokdep:gui:Show64Bitness { theRowIter } {
333   upvar $theRowIter aRowIter
334
335   if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } {
336     grid forget .myFrame.myLib32Lbl .myFrame.myLib32List   .myFrame.myLib32Scrl
337     grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl
338     grid forget .myFrame.myBin32Lbl .myFrame.myBin32List   .myFrame.myBin32Scrl
339     grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl
340   }
341
342   # Additional libraries (64-bit) search paths
343   grid .myFrame.myLib64Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
344   incr aRowIter
345   grid .myFrame.myLib64List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
346   grid .myFrame.myLib64Scrl   -row $aRowIter -column 5 -rowspan 4
347   grid .myFrame.myLib64Add    -row $aRowIter -column 6
348   incr aRowIter
349   #grid .myFrame.myLib64Edit   -row $aRowIter -column 6
350   incr aRowIter
351   grid .myFrame.myLib64Remove -row $aRowIter -column 6
352   incr aRowIter
353   grid .myFrame.myLib64Clear  -row $aRowIter -column 6
354   incr aRowIter
355   grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
356   incr aRowIter
357
358   # Additional executables (64-bit) search paths
359   grid .myFrame.myBin64Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
360   incr aRowIter
361   grid .myFrame.myBin64List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
362   grid .myFrame.myBin64Scrl   -row $aRowIter -column 5 -rowspan 4
363   grid .myFrame.myBin64Add    -row $aRowIter -column 6
364   incr aRowIter
365   #grid .myFrame.myBin64Edit   -row $aRowIter -column 6
366   incr aRowIter
367   grid .myFrame.myBin64Remove -row $aRowIter -column 6
368   incr aRowIter
369   grid .myFrame.myBin64Clear  -row $aRowIter -column 6
370   incr aRowIter
371   grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
372   incr aRowIter
373 }
374
375 # Header
376 ttk::label    .myFrame.myVsFrame.myVsLbl       -text "Visual Studio configuration:" -padding {5 5 80 5}
377 ttk::combobox .myFrame.myVsFrame.myVsCombo     -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
378 ttk::combobox .myFrame.myVsFrame.myArchCombo   -values { {32} {64} } -textvariable ARCH -state readonly -width 6
379 entry         .myFrame.myVcEntry     -textvariable VCVER  -width 6
380 entry         .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
381 ttk::button   .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
382
383 #
384 ttk::combobox .myFrame.myHxxChecks.myScutsCombo   -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12
385 ttk::label    .myFrame.myHxxChecks.myScutsLbl     -text "Strategy for filling headers folder inc:"
386
387 #
388 ttk::label    .myFrame.mySrchLbl       -text "3rd-parties search path:" -padding {5 5 80 5}
389 entry         .myFrame.mySrchEntry     -textvariable PRODUCTS_PATH -width 80
390 ttk::button   .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
391 checkbutton   .myFrame.myChecks.myFImageCheck   -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
392 ttk::label    .myFrame.myChecks.myFImageLbl     -text "Use FreeImage"
393 checkbutton   .myFrame.myChecks.myGl2psCheck    -offvalue "false" -onvalue "true" -variable HAVE_GL2PS     -command wokdep:gui:UpdateList
394 ttk::label    .myFrame.myChecks.myGl2psLbl      -text "Use GL2PS"
395 checkbutton   .myFrame.myChecks.myTbbCheck      -offvalue "false" -onvalue "true" -variable HAVE_TBB       -command wokdep:gui:UpdateList
396 ttk::label    .myFrame.myChecks.myTbbLbl        -text "Use Intel TBB"
397 if { "$::tcl_platform(os)" != "Darwin" } {
398   checkbutton .myFrame.myChecks.myGlesCheck     -offvalue "false" -onvalue "true" -variable HAVE_GLES2     -command wokdep:gui:UpdateList
399   ttk::label  .myFrame.myChecks.myGlesLbl       -text "Use OpenGL ES"
400 }
401 if { "$::tcl_platform(platform)" == "windows" } {
402   checkbutton .myFrame.myChecks.myD3dCheck      -offvalue "false" -onvalue "true" -variable HAVE_D3D       -command wokdep:gui:UpdateList
403   ttk::label  .myFrame.myChecks.myD3dLbl        -text "Use Direct3D"
404 }
405 #checkbutton   .myFrame.myChecks.myOpenClCheck   -offvalue "false" -onvalue "true" -variable HAVE_OPENCL    -command wokdep:gui:UpdateList
406 #ttk::label    .myFrame.myChecks.myOpenClLbl     -text "Use OpenCL"
407 checkbutton   .myFrame.myChecks.myMacGLXCheck   -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
408 ttk::label    .myFrame.myChecks.myMacGLXLbl     -text "Use X11 for windows drawing"
409 ttk::label    .myFrame.myChecks.myVtkLbl        -text "Use VTK"
410 checkbutton   .myFrame.myChecks.myVtkCheck      -offvalue "false" -onvalue "true" -variable HAVE_VTK       -command wokdep:gui:UpdateList
411 checkbutton   .myFrame.myChecks.myQt4Check      -offvalue "false" -onvalue "true" -variable CHECK_QT4      -command wokdep:gui:UpdateList
412 ttk::label    .myFrame.myChecks.myQt4Lbl        -text "Search Qt4"
413 checkbutton   .myFrame.myChecks.myJDKCheck      -offvalue "false" -onvalue "true" -variable CHECK_JDK      -command wokdep:gui:UpdateList
414 ttk::label    .myFrame.myChecks.myJDKLbl        -text "Search JDK"
415
416 # Additional headers search paths
417 ttk::label    .myFrame.myIncLbl    -text "Additional headers search paths:" -padding {5 5 80 5}
418 scrollbar     .myFrame.myIncScrl   -command ".myFrame.myIncList yview"
419 listbox       .myFrame.myIncList   -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
420 ttk::button   .myFrame.myIncAdd    -text "Add"     -command wokdep:gui:AddIncPath
421 ttk::button   .myFrame.myIncEdit   -text "Edit"
422 ttk::button   .myFrame.myIncRemove -text "Remove"  -command wokdep:gui:RemoveIncPath
423 ttk::button   .myFrame.myIncClear  -text "Reset"   -command wokdep:gui:ResetIncPath
424 ttk::label    .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
425
426 # Additional libraries (32-bit) search paths
427 ttk::label    .myFrame.myLib32Lbl    -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
428 scrollbar     .myFrame.myLib32Scrl   -command ".myFrame.myLib32List yview"
429 listbox       .myFrame.myLib32List   -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
430 ttk::button   .myFrame.myLib32Add    -text "Add"     -command wokdep:gui:AddLib32Path
431 ttk::button   .myFrame.myLib32Edit   -text "Edit"
432 ttk::button   .myFrame.myLib32Remove -text "Remove"  -command wokdep:gui:RemoveLib32Path
433 ttk::button   .myFrame.myLib32Clear  -text "Reset"   -command wokdep:gui:ResetLib32Path
434 ttk::label    .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
435
436 # Additional libraries (64-bit) search paths
437 ttk::label    .myFrame.myLib64Lbl    -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
438 scrollbar     .myFrame.myLib64Scrl   -command ".myFrame.myLib64List yview"
439 listbox       .myFrame.myLib64List   -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
440 ttk::button   .myFrame.myLib64Add    -text "Add"     -command wokdep:gui:AddLib64Path
441 ttk::button   .myFrame.myLib64Edit   -text "Edit"
442 ttk::button   .myFrame.myLib64Remove -text "Remove"  -command wokdep:gui:RemoveLib64Path
443 ttk::button   .myFrame.myLib64Clear  -text "Reset"   -command wokdep:gui:ResetLib64Path
444 ttk::label    .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
445
446 # Additional executables (32-bit) search paths
447 ttk::label    .myFrame.myBin32Lbl    -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
448 scrollbar     .myFrame.myBin32Scrl   -command ".myFrame.myBin32List yview"
449 listbox       .myFrame.myBin32List   -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
450 ttk::button   .myFrame.myBin32Add    -text "Add"     -command wokdep:gui:AddBin32Path
451 ttk::button   .myFrame.myBin32Edit   -text "Edit"
452 ttk::button   .myFrame.myBin32Remove -text "Remove"  -command wokdep:gui:RemoveBin32Path
453 ttk::button   .myFrame.myBin32Clear  -text "Reset"   -command wokdep:gui:ResetBin32Path
454 ttk::label    .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
455
456 # Additional executables (64-bit) search paths
457 ttk::label    .myFrame.myBin64Lbl    -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
458 scrollbar     .myFrame.myBin64Scrl   -command ".myFrame.myBin64List yview"
459 listbox       .myFrame.myBin64List   -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
460 ttk::button   .myFrame.myBin64Add    -text "Add"     -command wokdep:gui:AddBin64Path
461 ttk::button   .myFrame.myBin64Edit   -text "Edit"
462 ttk::button   .myFrame.myBin64Remove -text "Remove"  -command wokdep:gui:RemoveBin64Path
463 ttk::button   .myFrame.myBin64Clear  -text "Reset"   -command wokdep:gui:ResetBin64Path
464 ttk::label    .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
465
466 # Bottom
467 ttk::button   .myFrame.mySave  -text "Save"  -command wokdep:SaveCustom
468 ttk::button   .myFrame.myClose -text "Close" -command wokdep:gui:Close
469
470 # Create grid
471 # Header
472 if { "$tcl_platform(platform)" == "windows" } {
473   grid .myFrame.myVsFrame               -row $aRowIter -column 0 -columnspan 10 -sticky w
474   grid .myFrame.myVsFrame.myVsLbl       -row 0 -column 0
475   grid .myFrame.myVsFrame.myVsCombo     -row 0 -column 1 -padx 5
476   grid .myFrame.myVsFrame.myArchCombo   -row 0 -column 2
477   incr aRowIter
478   grid .myFrame.myVcEntry     -row $aRowIter -column 0
479   grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
480   grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6
481   incr aRowIter
482 }
483
484 #
485 grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
486 grid .myFrame.myHxxChecks.myScutsLbl     -row 0 -column 0
487 grid .myFrame.myHxxChecks.myScutsCombo   -row 0 -column 1
488 incr aRowIter
489 #
490 grid .myFrame.mySrchLbl       -row $aRowIter -column 0 -columnspan 10 -sticky w
491 incr aRowIter
492 grid .myFrame.mySrchEntry     -row $aRowIter -column 0 -columnspan 5
493 grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6
494 incr aRowIter
495
496 grid .myFrame.myChecks        -row $aRowIter -column 0 -columnspan 10 -sticky w
497 incr aRowIter
498 grid .myFrame.myChecks.myFImageCheck   -row $aCheckRowIter -column 0 -sticky e
499 grid .myFrame.myChecks.myFImageLbl     -row $aCheckRowIter -column 1 -sticky w
500 grid .myFrame.myChecks.myTbbCheck      -row $aCheckRowIter -column 2 -sticky e
501 grid .myFrame.myChecks.myTbbLbl        -row $aCheckRowIter -column 3 -sticky w
502 grid .myFrame.myChecks.myQt4Check      -row $aCheckRowIter -column 4 -sticky e
503 grid .myFrame.myChecks.myQt4Lbl        -row $aCheckRowIter -column 5 -sticky w
504 grid .myFrame.myChecks.myGlesCheck     -row $aCheckRowIter -column 6 -sticky e
505 grid .myFrame.myChecks.myGlesLbl       -row $aCheckRowIter -column 7 -sticky w
506 #grid .myFrame.myChecks.myOpenClCheck   -row $aCheckRowIter -column 6 -sticky e
507 #grid .myFrame.myChecks.myOpenClLbl     -row $aCheckRowIter -column 7 -sticky w
508 incr aCheckRowIter
509 grid .myFrame.myChecks.myGl2psCheck    -row $aCheckRowIter -column 0 -sticky e
510 grid .myFrame.myChecks.myGl2psLbl      -row $aCheckRowIter -column 1 -sticky w
511 grid .myFrame.myChecks.myVtkCheck      -row $aCheckRowIter -column 2 -sticky e
512 grid .myFrame.myChecks.myVtkLbl        -row $aCheckRowIter -column 3 -sticky w
513 grid .myFrame.myChecks.myJDKCheck      -row $aCheckRowIter -column 4 -sticky e
514 grid .myFrame.myChecks.myJDKLbl        -row $aCheckRowIter -column 5 -sticky w
515 if { "$::tcl_platform(platform)" == "windows" } {
516   grid .myFrame.myChecks.myD3dCheck    -row $aCheckRowIter -column 6 -sticky e
517   grid .myFrame.myChecks.myD3dLbl      -row $aCheckRowIter -column 7 -sticky w
518 }
519 incr aCheckRowIter
520 if { "$::tcl_platform(os)" == "Darwin" } {
521   grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
522   grid .myFrame.myChecks.myMacGLXLbl   -row $aCheckRowIter -column 1 -sticky w
523   incr aCheckRowIter
524 }
525
526 # Additional headers search paths
527 grid .myFrame.myIncLbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
528 incr aRowIter
529 grid .myFrame.myIncList   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
530 grid .myFrame.myIncScrl   -row $aRowIter -column 5 -rowspan 4
531 grid .myFrame.myIncAdd    -row $aRowIter -column 6
532 incr aRowIter
533 #grid .myFrame.myIncEdit   -row $aRowIter -column 6
534 incr aRowIter
535 grid .myFrame.myIncRemove -row $aRowIter -column 6
536 incr aRowIter
537 grid .myFrame.myIncClear  -row $aRowIter -column 6
538 incr aRowIter
539 grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
540 incr aRowIter
541
542 # Additional 32-bit search paths
543 if { "$ARCH" == "32" } {
544   wokdep:gui:Show32Bitness aRowIter
545 }
546
547 # Additional 64-bit search paths
548 if { "$ARCH" == "64" } {
549   wokdep:gui:Show64Bitness aRowIter
550 }
551
552 # Bottom section
553 grid .myFrame.mySave  -row $aRowIter -column 4 -columnspan 2
554 grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
555
556 # Bind events
557 bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
558   wokdep:gui:SwitchConfig
559 }
560 bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
561   wokdep:gui:SwitchArch
562 }
563
564 .myFrame.mySrchEntry configure -validate all -validatecommand {
565   #return [file exists "$::PRODUCTS_PATH"]
566   wokdep:gui:UpdateList
567   return 1
568 }
569
570 wokdep:gui:UpdateList