0029250: Configuration, TKIVtk - build failure with VTK 6.3+ due to vtkRenderingFreeT...
[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 2017 instances by running vswhere.exe
42 if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
43   lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
44   lappend ::SYS_VC_LIST "vc141"
45   lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
46 }
47 if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
48   lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141) UWP"
49   lappend ::SYS_VC_LIST "vc141-uwp"
50   lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
51 }
52
53 # detect installed Visual Studio instances from global environment
54 if { [info exists ::env(VS140COMNTOOLS)] } {
55   lappend ::SYS_VS_LIST "Visual Studio 2015 (14, toolset v140)"
56   lappend ::SYS_VC_LIST "vc14"
57   lappend ::SYS_VCVARS_LIST "%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
58
59   lappend ::SYS_VS_LIST "Visual Studio 2015 (14, toolset v140) UWP"
60   lappend ::SYS_VC_LIST "vc14-uwp"
61   lappend ::SYS_VCVARS_LIST "%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
62 }
63 if { [info exists ::env(VS120COMNTOOLS)] } {
64   lappend ::SYS_VS_LIST "Visual Studio 2013 (12, toolset v120)"
65   lappend ::SYS_VC_LIST "vc12"
66   lappend ::SYS_VCVARS_LIST "%VS120COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
67 }
68 if { [info exists ::env(VS110COMNTOOLS)] } {
69   lappend ::SYS_VS_LIST "Visual Studio 2012 (11, toolset v110)"
70   lappend ::SYS_VC_LIST "vc11"
71   lappend ::SYS_VCVARS_LIST "%VS110COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
72 }
73 if { [info exists ::env(VS100COMNTOOLS)] } {
74   lappend ::SYS_VS_LIST "Visual Studio 2010 (10, toolset v100)"
75   lappend ::SYS_VC_LIST "vc10"
76   lappend ::SYS_VCVARS_LIST "%VS100COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
77 }
78 if { [info exists ::env(VS90COMNTOOLS)] } {
79   lappend ::SYS_VS_LIST "Visual Studio 2008 (9, toolset v90)"
80   lappend ::SYS_VC_LIST "vc9"
81   lappend ::SYS_VCVARS_LIST "%VS90COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
82 }
83 if { [info exists ::env(VS80COMNTOOLS)] } {
84   lappend ::SYS_VS_LIST "Visual Studio 2005 (8, toolset v80)"
85   lappend ::SYS_VC_LIST "vc8"
86   lappend ::SYS_VCVARS_LIST "%VS80COMNTOOLS%..\\..\\VC\\vcvarsall.bat"
87 }
88 lappend ::SYS_VS_LIST "Custom"
89 lappend ::SYS_VC_LIST "vcX"
90 lappend ::SYS_VCVARS_LIST "%VSXXCOMNTOOLS%..\\..\\VC\\vcvarsall.bat"
91
92 set aVcVerIndex [lsearch $::SYS_VC_LIST $::VCVER]
93 set ::VSVER  [lindex $::SYS_VS_LIST     $aVcVerIndex]
94 if { "$::VCVARS" == "" } {
95   set ::VCVARS [lindex $::SYS_VCVARS_LIST $aVcVerIndex]
96 }
97
98 proc wokdep:gui:Close {} {
99   # if changed ask
100   exit
101 }
102
103 proc wokdep:gui:SwitchConfig {} {
104   set ::VCVER  [lindex $::SYS_VC_LIST     [.myFrame.myVsFrame.myVsCombo current]]
105   set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]]
106
107   set ::CSF_OPT_INC {}
108   set ::CSF_OPT_LIB32 {}
109   set ::CSF_OPT_LIB64 {}
110   set ::CSF_OPT_BIN32 {}
111   set ::CSF_OPT_BIN64 {}
112   wokdep:gui:UpdateList
113 }
114
115 proc wokdep:gui:SwitchArch {} {
116   if { "$::ARCH" == "32" } {
117     wokdep:gui:Show32Bitness ::aRowIter
118   }
119   if { "$::ARCH" == "64" } {
120     wokdep:gui:Show64Bitness ::aRowIter
121   }
122
123   if { [llength [grid info .myFrame.mySave]] != 0 } {
124     grid forget .myFrame.mySave .myFrame.myClose
125   }
126
127   # Bottom section
128   grid .myFrame.mySave  -row $::aRowIter -column 4 -columnspan 2
129   grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2
130 }
131
132 proc wokdep:gui:UpdateList {} {
133   set anIncErrs   {}
134   set anLib32Errs {}
135   set anLib64Errs {}
136   set anBin32Errs {}
137   set anBin64Errs {}
138   wokdep:SearchTclTk     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
139   wokdep:SearchFreeType  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
140   wokdep:SearchX11       anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
141   if { "$::HAVE_GLES2" == "true" } {
142     if { "$::HAVE_GL2PS" == "true" } {
143       lappend anIncErrs "Error: gl2ps can not be used with OpenGL ES"
144     }
145     wokdep:SearchEGL     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
146     wokdep:SearchGLES    anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
147   }
148   if { "$::HAVE_FREEIMAGE" == "true" } {
149     wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
150   }
151   if { "$::HAVE_FFMPEG" == "true" } {
152     wokdep:SearchFFmpeg  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
153   }
154   if { "$::HAVE_GL2PS" == "true" } {
155     wokdep:SearchStandardLibrary  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "gl2ps" "gl2ps.h" "gl2ps" {"gl2ps"}
156   }
157   if { "$::HAVE_TBB" == "true" } {
158     wokdep:SearchTBB     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
159   }
160 #  if { "$::HAVE_OPENCL" == "true" } {
161 #    wokdep:SearchOpenCL  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
162 #  }
163   if { "$::HAVE_VTK" == "true" } {
164     wokdep:SearchVTK  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
165   }
166
167   if { "$::HAVE_ZLIB" == "true" } {
168     wokdep:SearchStandardLibrary  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "zlib" {"zlib"}
169   }
170   if { "$::HAVE_LIBLZMA" == "true" } {
171     set aCheckLib "lzma"
172     if { "$::tcl_platform(platform)" == "windows" } {
173       set aCheckLib "liblzma"
174     }
175     wokdep:SearchStandardLibrary  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"}
176   }
177
178   if { "$::CHECK_QT4" == "true" } {
179     wokdep:SearchQt4     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
180   }
181   if { "$::CHECK_JDK" == "true" } {
182     wokdep:SearchJDK     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
183   }
184
185   .myFrame.myIncErrLbl   configure -text [join $anIncErrs   "\n"]
186   .myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"]
187   .myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"]
188   .myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"]
189   .myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"]
190 }
191
192 proc wokdep:gui:BrowseVcVars {} {
193   set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"]
194   if { "$aResult" != "" } {
195     set ::VCVARS $aResult
196   }
197 }
198
199 proc wokdep:gui:BrowsePartiesRoot {} {
200   set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"]
201   if { "$aResult" != "" } {
202     set ::PRODUCTS_PATH $aResult
203     wokdep:gui:UpdateList
204   }
205 }
206
207 proc wokdep:gui:AddIncPath {} {
208   set aResult [tk_chooseDirectory -title "Choose a directory"]
209   if { "$aResult" != "" } {
210     lappend ::CSF_OPT_INC "$aResult"
211     wokdep:gui:UpdateList
212   }
213 }
214
215 proc wokdep:gui:AddLib32Path {} {
216   set aResult [tk_chooseDirectory -title "Choose a directory"]
217   if { "$aResult" != "" } {
218     lappend ::CSF_OPT_LIB32 "$aResult"
219     wokdep:gui:UpdateList
220   }
221 }
222
223 proc wokdep:gui:AddLib64Path {} {
224   set aResult [tk_chooseDirectory -title "Choose a directory"]
225   if { "$aResult" != "" } {
226     lappend ::CSF_OPT_LIB64 "$aResult"
227     wokdep:gui:UpdateList
228   }
229 }
230
231 proc wokdep:gui:AddBin32Path {} {
232   set aResult [tk_chooseDirectory -title "Choose a directory"]
233   if { "$aResult" != "" } {
234     lappend ::CSF_OPT_BIN32 "$aResult"
235     wokdep:gui:UpdateList
236   }
237 }
238
239 proc wokdep:gui:AddBin64Path {} {
240   set aResult [tk_chooseDirectory -title "Choose a directory"]
241   if { "$aResult" != "" } {
242     lappend ::CSF_OPT_BIN64 "$aResult"
243     wokdep:gui:UpdateList
244   }
245 }
246
247 proc wokdep:gui:RemoveIncPath {} {
248   set aSelIndices [.myFrame.myIncList curselection]
249   if { [llength $aSelIndices] != 0 } {
250     .myFrame.myIncList delete [lindex $aSelIndices 0]
251   }
252   wokdep:gui:UpdateList
253 }
254
255 proc wokdep:gui:RemoveLib32Path {} {
256   set aSelIndices [.myFrame.myLib32List curselection]
257   if { [llength $aSelIndices] != 0 } {
258     .myFrame.myLib32List delete [lindex $aSelIndices 0]
259   }
260   wokdep:gui:UpdateList
261 }
262
263 proc wokdep:gui:RemoveLib64Path {} {
264   set aSelIndices [.myFrame.myLib64List curselection]
265   if { [llength $aSelIndices] != 0 } {
266     .myFrame.myLib64List delete [lindex $aSelIndices 0]
267   }
268   wokdep:gui:UpdateList
269 }
270
271 proc wokdep:gui:RemoveBin32Path {} {
272   set aSelIndices [.myFrame.myBin32List curselection]
273   if { [llength $aSelIndices] != 0 } {
274     .myFrame.myBin32List delete [lindex $aSelIndices 0]
275   }
276   wokdep:gui:UpdateList
277 }
278
279 proc wokdep:gui:RemoveBin64Path {} {
280   set aSelIndices [.myFrame.myBin64List curselection]
281   if { [llength $aSelIndices] != 0 } {
282     .myFrame.myBin64List delete [lindex $aSelIndices 0]
283   }
284   wokdep:gui:UpdateList
285 }
286
287 proc wokdep:gui:ResetIncPath {} {
288   set ::CSF_OPT_INC {}
289   wokdep:gui:UpdateList
290 }
291
292 proc wokdep:gui:ResetLib32Path {} {
293   set ::CSF_OPT_LIB32 {}
294   wokdep:gui:UpdateList
295 }
296
297 proc wokdep:gui:ResetLib64Path {} {
298   set ::CSF_OPT_LIB64 {}
299   wokdep:gui:UpdateList
300 }
301
302 proc wokdep:gui:ResetBin32Path {} {
303   set ::CSF_OPT_BIN32 {}
304   wokdep:gui:UpdateList
305 }
306
307 proc wokdep:gui:ResetBin64Path {} {
308   set ::CSF_OPT_BIN64 {}
309   wokdep:gui:UpdateList
310 }
311
312 proc wokdep:gui:Show32Bitness { theRowIter } {
313   upvar $theRowIter aRowIter
314
315   if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } {
316     grid forget .myFrame.myLib64Lbl .myFrame.myLib64List   .myFrame.myLib64Scrl
317     grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl
318     grid forget .myFrame.myBin64Lbl .myFrame.myBin64List   .myFrame.myBin64Scrl
319     grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl
320   }
321
322   # Additional libraries (32-bit) search paths
323   grid .myFrame.myLib32Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
324   incr aRowIter
325   grid .myFrame.myLib32List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
326   grid .myFrame.myLib32Scrl   -row $aRowIter -column 5 -rowspan 4
327   grid .myFrame.myLib32Add    -row $aRowIter -column 6
328   incr aRowIter
329   #grid .myFrame.myLib32Edit   -row $aRowIter -column 6
330   incr aRowIter
331   grid .myFrame.myLib32Remove -row $aRowIter -column 6
332   incr aRowIter
333   grid .myFrame.myLib32Clear  -row $aRowIter -column 6
334   incr aRowIter
335   grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
336   incr aRowIter
337
338   # Additional executables (32-bit) search paths
339   grid .myFrame.myBin32Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
340   incr aRowIter
341   grid .myFrame.myBin32List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
342   grid .myFrame.myBin32Scrl   -row $aRowIter -column 5 -rowspan 4
343   grid .myFrame.myBin32Add    -row $aRowIter -column 6
344   incr aRowIter
345   #grid .myFrame.myBin32Edit   -row $aRowIter -column 6
346   incr aRowIter
347   grid .myFrame.myBin32Remove -row $aRowIter -column 6
348   incr aRowIter
349   grid .myFrame.myBin32Clear  -row $aRowIter -column 6
350   incr aRowIter
351   grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
352   incr aRowIter
353 }
354
355 proc wokdep:gui:Show64Bitness { theRowIter } {
356   upvar $theRowIter aRowIter
357
358   if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } {
359     grid forget .myFrame.myLib32Lbl .myFrame.myLib32List   .myFrame.myLib32Scrl
360     grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl
361     grid forget .myFrame.myBin32Lbl .myFrame.myBin32List   .myFrame.myBin32Scrl
362     grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl
363   }
364
365   # Additional libraries (64-bit) search paths
366   grid .myFrame.myLib64Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
367   incr aRowIter
368   grid .myFrame.myLib64List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
369   grid .myFrame.myLib64Scrl   -row $aRowIter -column 5 -rowspan 4
370   grid .myFrame.myLib64Add    -row $aRowIter -column 6
371   incr aRowIter
372   #grid .myFrame.myLib64Edit   -row $aRowIter -column 6
373   incr aRowIter
374   grid .myFrame.myLib64Remove -row $aRowIter -column 6
375   incr aRowIter
376   grid .myFrame.myLib64Clear  -row $aRowIter -column 6
377   incr aRowIter
378   grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
379   incr aRowIter
380
381   # Additional executables (64-bit) search paths
382   grid .myFrame.myBin64Lbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
383   incr aRowIter
384   grid .myFrame.myBin64List   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
385   grid .myFrame.myBin64Scrl   -row $aRowIter -column 5 -rowspan 4
386   grid .myFrame.myBin64Add    -row $aRowIter -column 6
387   incr aRowIter
388   #grid .myFrame.myBin64Edit   -row $aRowIter -column 6
389   incr aRowIter
390   grid .myFrame.myBin64Remove -row $aRowIter -column 6
391   incr aRowIter
392   grid .myFrame.myBin64Clear  -row $aRowIter -column 6
393   incr aRowIter
394   grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
395   incr aRowIter
396 }
397
398 # Header
399 ttk::label    .myFrame.myVsFrame.myVsLbl       -text "Visual Studio configuration:" -padding {5 5 20 5}
400 ttk::combobox .myFrame.myVsFrame.myVsCombo     -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40
401 ttk::combobox .myFrame.myVsFrame.myArchCombo   -values { {32} {64} } -textvariable ARCH -state readonly -width 6
402 entry         .myFrame.myVcEntry     -textvariable VCVER  -width 10
403 entry         .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
404 ttk::button   .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
405 ttk::label    .myFrame.myHxxChecks.myRelDebInfoLbl   -text "Release with Debug info"
406 checkbutton   .myFrame.myHxxChecks.myRelDebInfoCheck -offvalue "false" -onvalue "true" -variable HAVE_RelWithDebInfo
407
408 #
409 ttk::combobox .myFrame.myHxxChecks.myScutsCombo   -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12
410 ttk::label    .myFrame.myHxxChecks.myScutsLbl     -text "Strategy for filling headers folder inc:"
411
412 #
413 ttk::label    .myFrame.mySrchLbl       -text "3rd-parties search path:" -padding {5 5 80 5}
414 entry         .myFrame.mySrchEntry     -textvariable PRODUCTS_PATH -width 80
415 ttk::button   .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
416 checkbutton   .myFrame.myChecks.myFImageCheck   -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
417 ttk::label    .myFrame.myChecks.myFImageLbl     -text "Use FreeImage"
418 checkbutton   .myFrame.myChecks.myGl2psCheck    -offvalue "false" -onvalue "true" -variable HAVE_GL2PS     -command wokdep:gui:UpdateList
419 ttk::label    .myFrame.myChecks.myGl2psLbl      -text "Use GL2PS"
420 checkbutton   .myFrame.myChecks.myTbbCheck      -offvalue "false" -onvalue "true" -variable HAVE_TBB       -command wokdep:gui:UpdateList
421 ttk::label    .myFrame.myChecks.myTbbLbl        -text "Use Intel TBB"
422 if { "$::tcl_platform(os)" != "Darwin" } {
423   checkbutton .myFrame.myChecks.myGlesCheck     -offvalue "false" -onvalue "true" -variable HAVE_GLES2     -command wokdep:gui:UpdateList
424   ttk::label  .myFrame.myChecks.myGlesLbl       -text "Use OpenGL ES"
425 }
426 if { "$::tcl_platform(platform)" == "windows" } {
427   checkbutton .myFrame.myChecks.myD3dCheck      -offvalue "false" -onvalue "true" -variable HAVE_D3D       -command wokdep:gui:UpdateList
428   ttk::label  .myFrame.myChecks.myD3dLbl        -text "Use Direct3D"
429 }
430 checkbutton   .myFrame.myChecks.myFFmpegCheck   -offvalue "false" -onvalue "true" -variable HAVE_FFMPEG    -command wokdep:gui:UpdateList
431 ttk::label    .myFrame.myChecks.myFFmpegLbl     -text "Use FFmpeg"
432 #checkbutton   .myFrame.myChecks.myOpenClCheck   -offvalue "false" -onvalue "true" -variable HAVE_OPENCL    -command wokdep:gui:UpdateList
433 #ttk::label    .myFrame.myChecks.myOpenClLbl     -text "Use OpenCL"
434 checkbutton   .myFrame.myChecks.myMacGLXCheck   -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
435 ttk::label    .myFrame.myChecks.myMacGLXLbl     -text "Use X11 for windows drawing"
436 ttk::label    .myFrame.myChecks.myVtkLbl        -text "Use VTK"
437 checkbutton   .myFrame.myChecks.myVtkCheck      -offvalue "false" -onvalue "true" -variable HAVE_VTK       -command wokdep:gui:UpdateList
438
439 checkbutton   .myFrame.myChecks.myZLibCheck     -offvalue "false" -onvalue "true" -variable HAVE_ZLIB      -command wokdep:gui:UpdateList
440 ttk::label    .myFrame.myChecks.myZLibLbl       -text "Use zlib"
441 checkbutton   .myFrame.myChecks.myLzmaCheck     -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA   -command wokdep:gui:UpdateList
442 ttk::label    .myFrame.myChecks.myLzmaLbl       -text "Use liblzma"
443
444 checkbutton   .myFrame.myChecks.myQt4Check      -offvalue "false" -onvalue "true" -variable CHECK_QT4      -command wokdep:gui:UpdateList
445 ttk::label    .myFrame.myChecks.myQt4Lbl        -text "Search Qt4"
446 checkbutton   .myFrame.myChecks.myJDKCheck      -offvalue "false" -onvalue "true" -variable CHECK_JDK      -command wokdep:gui:UpdateList
447 ttk::label    .myFrame.myChecks.myJDKLbl        -text "Search JDK"
448
449 # Additional headers search paths
450 ttk::label    .myFrame.myIncLbl    -text "Additional headers search paths:" -padding {5 5 80 5}
451 scrollbar     .myFrame.myIncScrl   -command ".myFrame.myIncList yview"
452 listbox       .myFrame.myIncList   -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
453 ttk::button   .myFrame.myIncAdd    -text "Add"     -command wokdep:gui:AddIncPath
454 ttk::button   .myFrame.myIncEdit   -text "Edit"
455 ttk::button   .myFrame.myIncRemove -text "Remove"  -command wokdep:gui:RemoveIncPath
456 ttk::button   .myFrame.myIncClear  -text "Reset"   -command wokdep:gui:ResetIncPath
457 ttk::label    .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
458
459 # Additional libraries (32-bit) search paths
460 ttk::label    .myFrame.myLib32Lbl    -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
461 scrollbar     .myFrame.myLib32Scrl   -command ".myFrame.myLib32List yview"
462 listbox       .myFrame.myLib32List   -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
463 ttk::button   .myFrame.myLib32Add    -text "Add"     -command wokdep:gui:AddLib32Path
464 ttk::button   .myFrame.myLib32Edit   -text "Edit"
465 ttk::button   .myFrame.myLib32Remove -text "Remove"  -command wokdep:gui:RemoveLib32Path
466 ttk::button   .myFrame.myLib32Clear  -text "Reset"   -command wokdep:gui:ResetLib32Path
467 ttk::label    .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
468
469 # Additional libraries (64-bit) search paths
470 ttk::label    .myFrame.myLib64Lbl    -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
471 scrollbar     .myFrame.myLib64Scrl   -command ".myFrame.myLib64List yview"
472 listbox       .myFrame.myLib64List   -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
473 ttk::button   .myFrame.myLib64Add    -text "Add"     -command wokdep:gui:AddLib64Path
474 ttk::button   .myFrame.myLib64Edit   -text "Edit"
475 ttk::button   .myFrame.myLib64Remove -text "Remove"  -command wokdep:gui:RemoveLib64Path
476 ttk::button   .myFrame.myLib64Clear  -text "Reset"   -command wokdep:gui:ResetLib64Path
477 ttk::label    .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
478
479 # Additional executables (32-bit) search paths
480 ttk::label    .myFrame.myBin32Lbl    -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
481 scrollbar     .myFrame.myBin32Scrl   -command ".myFrame.myBin32List yview"
482 listbox       .myFrame.myBin32List   -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
483 ttk::button   .myFrame.myBin32Add    -text "Add"     -command wokdep:gui:AddBin32Path
484 ttk::button   .myFrame.myBin32Edit   -text "Edit"
485 ttk::button   .myFrame.myBin32Remove -text "Remove"  -command wokdep:gui:RemoveBin32Path
486 ttk::button   .myFrame.myBin32Clear  -text "Reset"   -command wokdep:gui:ResetBin32Path
487 ttk::label    .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
488
489 # Additional executables (64-bit) search paths
490 ttk::label    .myFrame.myBin64Lbl    -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
491 scrollbar     .myFrame.myBin64Scrl   -command ".myFrame.myBin64List yview"
492 listbox       .myFrame.myBin64List   -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
493 ttk::button   .myFrame.myBin64Add    -text "Add"     -command wokdep:gui:AddBin64Path
494 ttk::button   .myFrame.myBin64Edit   -text "Edit"
495 ttk::button   .myFrame.myBin64Remove -text "Remove"  -command wokdep:gui:RemoveBin64Path
496 ttk::button   .myFrame.myBin64Clear  -text "Reset"   -command wokdep:gui:ResetBin64Path
497 ttk::label    .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
498
499 # Bottom
500 ttk::button   .myFrame.mySave  -text "Save"  -command wokdep:SaveCustom
501 ttk::button   .myFrame.myClose -text "Close" -command wokdep:gui:Close
502
503 # Create grid
504 # Header
505 if { "$tcl_platform(platform)" == "windows" } {
506   grid .myFrame.myVsFrame               -row $aRowIter -column 0 -columnspan 10 -sticky w
507   grid .myFrame.myVsFrame.myVsLbl       -row 0 -column 0
508   grid .myFrame.myVsFrame.myVsCombo     -row 0 -column 1 -padx 5
509   grid .myFrame.myVsFrame.myArchCombo   -row 0 -column 2
510   incr aRowIter
511   grid .myFrame.myVcEntry     -row $aRowIter -column 0
512   grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
513   grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6
514   incr aRowIter
515 }
516
517 #
518 grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
519 grid .myFrame.myHxxChecks.myScutsLbl     -row 0 -column 0
520 grid .myFrame.myHxxChecks.myScutsCombo   -row 0 -column 1
521 if { "$tcl_platform(platform)" == "windows" } {
522   grid .myFrame.myHxxChecks.myRelDebInfoCheck -row 0 -column 2
523   grid .myFrame.myHxxChecks.myRelDebInfoLbl   -row 0 -column 3
524 }
525 incr aRowIter
526 #
527 grid .myFrame.mySrchLbl       -row $aRowIter -column 0 -columnspan 10 -sticky w
528 incr aRowIter
529 grid .myFrame.mySrchEntry     -row $aRowIter -column 0 -columnspan 5
530 grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6
531 incr aRowIter
532
533 grid .myFrame.myChecks        -row $aRowIter -column 0 -columnspan 10 -sticky w
534 incr aRowIter
535 grid .myFrame.myChecks.myFImageCheck   -row $aCheckRowIter -column 0 -sticky e
536 grid .myFrame.myChecks.myFImageLbl     -row $aCheckRowIter -column 1 -sticky w
537 grid .myFrame.myChecks.myTbbCheck      -row $aCheckRowIter -column 2 -sticky e
538 grid .myFrame.myChecks.myTbbLbl        -row $aCheckRowIter -column 3 -sticky w
539 if { "$::tcl_platform(os)" != "Darwin" } {
540   grid .myFrame.myChecks.myGlesCheck     -row $aCheckRowIter -column 4 -sticky e
541   grid .myFrame.myChecks.myGlesLbl       -row $aCheckRowIter -column 5 -sticky w
542 }
543 #grid .myFrame.myChecks.myOpenClCheck   -row $aCheckRowIter -column 6 -sticky e
544 #grid .myFrame.myChecks.myOpenClLbl     -row $aCheckRowIter -column 7 -sticky w
545 grid .myFrame.myChecks.myZLibCheck     -row $aCheckRowIter -column 6 -sticky e
546 grid .myFrame.myChecks.myZLibLbl       -row $aCheckRowIter -column 7 -sticky w
547
548 grid .myFrame.myChecks.myGl2psCheck    -row $aCheckRowIter -column 8 -sticky e
549 grid .myFrame.myChecks.myGl2psLbl      -row $aCheckRowIter -column 9 -sticky w
550
551 grid .myFrame.myChecks.myQt4Check      -row $aCheckRowIter -column 10 -sticky e
552 grid .myFrame.myChecks.myQt4Lbl        -row $aCheckRowIter -column 11 -sticky w
553
554 incr aCheckRowIter
555 grid .myFrame.myChecks.myFFmpegCheck   -row $aCheckRowIter -column 0 -sticky e
556 grid .myFrame.myChecks.myFFmpegLbl     -row $aCheckRowIter -column 1 -sticky w
557 grid .myFrame.myChecks.myVtkCheck      -row $aCheckRowIter -column 2 -sticky e
558 grid .myFrame.myChecks.myVtkLbl        -row $aCheckRowIter -column 3 -sticky w
559 if { "$::tcl_platform(platform)" == "windows" } {
560   grid .myFrame.myChecks.myD3dCheck    -row $aCheckRowIter -column 4 -sticky e
561   grid .myFrame.myChecks.myD3dLbl      -row $aCheckRowIter -column 5 -sticky w
562 }
563 grid .myFrame.myChecks.myLzmaCheck     -row $aCheckRowIter -column 6 -sticky e
564 grid .myFrame.myChecks.myLzmaLbl       -row $aCheckRowIter -column 7 -sticky w
565 grid .myFrame.myChecks.myJDKCheck      -row $aCheckRowIter -column 10 -sticky e
566 grid .myFrame.myChecks.myJDKLbl        -row $aCheckRowIter -column 11 -sticky w
567
568 incr aCheckRowIter
569 if { "$::tcl_platform(os)" == "Darwin" } {
570   grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
571   grid .myFrame.myChecks.myMacGLXLbl   -row $aCheckRowIter -column 1 -sticky w
572   incr aCheckRowIter
573 }
574
575 # Additional headers search paths
576 grid .myFrame.myIncLbl    -row $aRowIter -column 0 -columnspan 10 -sticky w
577 incr aRowIter
578 grid .myFrame.myIncList   -row $aRowIter -column 0 -rowspan 4 -columnspan 5
579 grid .myFrame.myIncScrl   -row $aRowIter -column 5 -rowspan 4
580 grid .myFrame.myIncAdd    -row $aRowIter -column 6
581 incr aRowIter
582 #grid .myFrame.myIncEdit   -row $aRowIter -column 6
583 incr aRowIter
584 grid .myFrame.myIncRemove -row $aRowIter -column 6
585 incr aRowIter
586 grid .myFrame.myIncClear  -row $aRowIter -column 6
587 incr aRowIter
588 grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
589 incr aRowIter
590
591 # Additional 32-bit search paths
592 if { "$ARCH" == "32" } {
593   wokdep:gui:Show32Bitness aRowIter
594 }
595
596 # Additional 64-bit search paths
597 if { "$ARCH" == "64" } {
598   wokdep:gui:Show64Bitness aRowIter
599 }
600
601 # Bottom section
602 grid .myFrame.mySave  -row $aRowIter -column 4 -columnspan 2
603 grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
604
605 # Bind events
606 bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
607   wokdep:gui:SwitchConfig
608 }
609 bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
610   wokdep:gui:SwitchArch
611 }
612
613 .myFrame.mySrchEntry configure -validate all -validatecommand {
614   #return [file exists "$::PRODUCTS_PATH"]
615   wokdep:gui:UpdateList
616   return 1
617 }
618
619 wokdep:gui:UpdateList