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