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