0030931: Visualization, TKOpenGl - do not render into GL_FRONT within "GDI Generic...
[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 }
0a419c51 192 if { "$::HAVE_RAPIDJSON" == "true" } {
193 wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
194 }
e22105a9 195
910970ab 196 if { "$::CHECK_QT4" == "true" } {
197 wokdep:SearchQt4 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
198 }
199 if { "$::CHECK_JDK" == "true" } {
200 wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
201 }
202
203 .myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"]
204 .myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"]
205 .myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"]
206 .myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"]
207 .myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"]
208}
209
210proc wokdep:gui:BrowseVcVars {} {
211 set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"]
212 if { "$aResult" != "" } {
213 set ::VCVARS $aResult
214 }
215}
216
217proc wokdep:gui:BrowsePartiesRoot {} {
218 set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH -title "Choose a directory"]
219 if { "$aResult" != "" } {
220 set ::PRODUCTS_PATH $aResult
221 wokdep:gui:UpdateList
222 }
223}
224
225proc wokdep:gui:AddIncPath {} {
226 set aResult [tk_chooseDirectory -title "Choose a directory"]
227 if { "$aResult" != "" } {
228 lappend ::CSF_OPT_INC "$aResult"
229 wokdep:gui:UpdateList
230 }
231}
232
233proc wokdep:gui:AddLib32Path {} {
234 set aResult [tk_chooseDirectory -title "Choose a directory"]
235 if { "$aResult" != "" } {
236 lappend ::CSF_OPT_LIB32 "$aResult"
237 wokdep:gui:UpdateList
238 }
239}
240
241proc wokdep:gui:AddLib64Path {} {
242 set aResult [tk_chooseDirectory -title "Choose a directory"]
243 if { "$aResult" != "" } {
244 lappend ::CSF_OPT_LIB64 "$aResult"
245 wokdep:gui:UpdateList
246 }
247}
248
249proc wokdep:gui:AddBin32Path {} {
250 set aResult [tk_chooseDirectory -title "Choose a directory"]
251 if { "$aResult" != "" } {
252 lappend ::CSF_OPT_BIN32 "$aResult"
253 wokdep:gui:UpdateList
254 }
255}
256
257proc wokdep:gui:AddBin64Path {} {
258 set aResult [tk_chooseDirectory -title "Choose a directory"]
259 if { "$aResult" != "" } {
260 lappend ::CSF_OPT_BIN64 "$aResult"
261 wokdep:gui:UpdateList
262 }
263}
264
265proc wokdep:gui:RemoveIncPath {} {
266 set aSelIndices [.myFrame.myIncList curselection]
267 if { [llength $aSelIndices] != 0 } {
268 .myFrame.myIncList delete [lindex $aSelIndices 0]
269 }
270 wokdep:gui:UpdateList
271}
272
273proc wokdep:gui:RemoveLib32Path {} {
274 set aSelIndices [.myFrame.myLib32List curselection]
275 if { [llength $aSelIndices] != 0 } {
276 .myFrame.myLib32List delete [lindex $aSelIndices 0]
277 }
278 wokdep:gui:UpdateList
279}
280
281proc wokdep:gui:RemoveLib64Path {} {
282 set aSelIndices [.myFrame.myLib64List curselection]
283 if { [llength $aSelIndices] != 0 } {
284 .myFrame.myLib64List delete [lindex $aSelIndices 0]
285 }
286 wokdep:gui:UpdateList
287}
288
289proc wokdep:gui:RemoveBin32Path {} {
290 set aSelIndices [.myFrame.myBin32List curselection]
291 if { [llength $aSelIndices] != 0 } {
292 .myFrame.myBin32List delete [lindex $aSelIndices 0]
293 }
294 wokdep:gui:UpdateList
295}
296
297proc wokdep:gui:RemoveBin64Path {} {
298 set aSelIndices [.myFrame.myBin64List curselection]
299 if { [llength $aSelIndices] != 0 } {
300 .myFrame.myBin64List delete [lindex $aSelIndices 0]
301 }
302 wokdep:gui:UpdateList
303}
304
305proc wokdep:gui:ResetIncPath {} {
306 set ::CSF_OPT_INC {}
307 wokdep:gui:UpdateList
308}
309
310proc wokdep:gui:ResetLib32Path {} {
311 set ::CSF_OPT_LIB32 {}
312 wokdep:gui:UpdateList
313}
314
315proc wokdep:gui:ResetLib64Path {} {
316 set ::CSF_OPT_LIB64 {}
317 wokdep:gui:UpdateList
318}
319
320proc wokdep:gui:ResetBin32Path {} {
321 set ::CSF_OPT_BIN32 {}
322 wokdep:gui:UpdateList
323}
324
325proc wokdep:gui:ResetBin64Path {} {
326 set ::CSF_OPT_BIN64 {}
327 wokdep:gui:UpdateList
328}
329
330proc wokdep:gui:Show32Bitness { theRowIter } {
331 upvar $theRowIter aRowIter
332
333 if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } {
334 grid forget .myFrame.myLib64Lbl .myFrame.myLib64List .myFrame.myLib64Scrl
335 grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl
336 grid forget .myFrame.myBin64Lbl .myFrame.myBin64List .myFrame.myBin64Scrl
337 grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl
338 }
339
340 # Additional libraries (32-bit) search paths
341 grid .myFrame.myLib32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
342 incr aRowIter
343 grid .myFrame.myLib32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
344 grid .myFrame.myLib32Scrl -row $aRowIter -column 5 -rowspan 4
345 grid .myFrame.myLib32Add -row $aRowIter -column 6
346 incr aRowIter
347 #grid .myFrame.myLib32Edit -row $aRowIter -column 6
348 incr aRowIter
349 grid .myFrame.myLib32Remove -row $aRowIter -column 6
350 incr aRowIter
351 grid .myFrame.myLib32Clear -row $aRowIter -column 6
352 incr aRowIter
353 grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
354 incr aRowIter
355
356 # Additional executables (32-bit) search paths
357 grid .myFrame.myBin32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
358 incr aRowIter
359 grid .myFrame.myBin32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
360 grid .myFrame.myBin32Scrl -row $aRowIter -column 5 -rowspan 4
361 grid .myFrame.myBin32Add -row $aRowIter -column 6
362 incr aRowIter
363 #grid .myFrame.myBin32Edit -row $aRowIter -column 6
364 incr aRowIter
365 grid .myFrame.myBin32Remove -row $aRowIter -column 6
366 incr aRowIter
367 grid .myFrame.myBin32Clear -row $aRowIter -column 6
368 incr aRowIter
369 grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
370 incr aRowIter
371}
372
373proc wokdep:gui:Show64Bitness { theRowIter } {
374 upvar $theRowIter aRowIter
375
376 if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } {
377 grid forget .myFrame.myLib32Lbl .myFrame.myLib32List .myFrame.myLib32Scrl
378 grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl
379 grid forget .myFrame.myBin32Lbl .myFrame.myBin32List .myFrame.myBin32Scrl
380 grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl
381 }
382
383 # Additional libraries (64-bit) search paths
384 grid .myFrame.myLib64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
385 incr aRowIter
386 grid .myFrame.myLib64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
387 grid .myFrame.myLib64Scrl -row $aRowIter -column 5 -rowspan 4
388 grid .myFrame.myLib64Add -row $aRowIter -column 6
389 incr aRowIter
390 #grid .myFrame.myLib64Edit -row $aRowIter -column 6
391 incr aRowIter
392 grid .myFrame.myLib64Remove -row $aRowIter -column 6
393 incr aRowIter
394 grid .myFrame.myLib64Clear -row $aRowIter -column 6
395 incr aRowIter
396 grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
397 incr aRowIter
398
399 # Additional executables (64-bit) search paths
400 grid .myFrame.myBin64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w
401 incr aRowIter
402 grid .myFrame.myBin64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5
403 grid .myFrame.myBin64Scrl -row $aRowIter -column 5 -rowspan 4
404 grid .myFrame.myBin64Add -row $aRowIter -column 6
405 incr aRowIter
406 #grid .myFrame.myBin64Edit -row $aRowIter -column 6
407 incr aRowIter
408 grid .myFrame.myBin64Remove -row $aRowIter -column 6
409 incr aRowIter
410 grid .myFrame.myBin64Clear -row $aRowIter -column 6
411 incr aRowIter
412 grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
413 incr aRowIter
414}
415
416# Header
aafe169f 417ttk::label .myFrame.myPrjFrame.myPrjLbl -text "Project format:" -padding {5 5 20 5}
418ttk::combobox .myFrame.myPrjFrame.myPrjCombo -values $SYS_PRJNAME_LIST -state readonly -textvariable PRJNAME -width 40
d6cda17a 419ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5}
420ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40
ea991a6e 421ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6
d6cda17a 422entry .myFrame.myVcEntry -textvariable VCVER -width 10
910970ab 423entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
424ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
26cfd29c 425ttk::label .myFrame.myHxxChecks.myRelDebInfoLbl -text "Release with Debug info"
426checkbutton .myFrame.myHxxChecks.myRelDebInfoCheck -offvalue "false" -onvalue "true" -variable HAVE_RelWithDebInfo
910970ab 427
428#
5951a088 429ttk::combobox .myFrame.myHxxChecks.myScutsCombo -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12
430ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling headers folder inc:"
910970ab 431
432#
72c37458 433ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5}
910970ab 434entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80
435ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
ea991a6e 436checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
437ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage"
ea991a6e 438checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList
439ttk::label .myFrame.myChecks.myTbbLbl -text "Use Intel TBB"
1ce0716b 440if { "$::tcl_platform(os)" != "Darwin" } {
441 checkbutton .myFrame.myChecks.myGlesCheck -offvalue "false" -onvalue "true" -variable HAVE_GLES2 -command wokdep:gui:UpdateList
442 ttk::label .myFrame.myChecks.myGlesLbl -text "Use OpenGL ES"
443}
a9b51f49 444if { "$::tcl_platform(platform)" == "windows" } {
445 checkbutton .myFrame.myChecks.myD3dCheck -offvalue "false" -onvalue "true" -variable HAVE_D3D -command wokdep:gui:UpdateList
446 ttk::label .myFrame.myChecks.myD3dLbl -text "Use Direct3D"
447}
e22105a9 448checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true" -variable HAVE_FFMPEG -command wokdep:gui:UpdateList
449ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg"
944d808c 450#checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList
451#ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL"
ea991a6e 452checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
453ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing"
454ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK"
455checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList
e22105a9 456
457checkbutton .myFrame.myChecks.myZLibCheck -offvalue "false" -onvalue "true" -variable HAVE_ZLIB -command wokdep:gui:UpdateList
458ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib"
459checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList
460ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma"
461
0a419c51 462checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList
463ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON"
464
ea991a6e 465checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList
466ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4"
467checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList
468ttk::label .myFrame.myChecks.myJDKLbl -text "Search JDK"
910970ab 469
470# Additional headers search paths
72c37458 471ttk::label .myFrame.myIncLbl -text "Additional headers search paths:" -padding {5 5 80 5}
910970ab 472scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview"
473listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
474ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath
475ttk::button .myFrame.myIncEdit -text "Edit"
476ttk::button .myFrame.myIncRemove -text "Remove" -command wokdep:gui:RemoveIncPath
477ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncPath
478ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
479
480# Additional libraries (32-bit) search paths
72c37458 481ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
910970ab 482scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview"
483listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
484ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path
485ttk::button .myFrame.myLib32Edit -text "Edit"
486ttk::button .myFrame.myLib32Remove -text "Remove" -command wokdep:gui:RemoveLib32Path
487ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLib32Path
488ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
489
490# Additional libraries (64-bit) search paths
72c37458 491ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
910970ab 492scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview"
493listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
494ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path
495ttk::button .myFrame.myLib64Edit -text "Edit"
496ttk::button .myFrame.myLib64Remove -text "Remove" -command wokdep:gui:RemoveLib64Path
497ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLib64Path
498ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
499
500# Additional executables (32-bit) search paths
72c37458 501ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
910970ab 502scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview"
503listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
504ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path
505ttk::button .myFrame.myBin32Edit -text "Edit"
506ttk::button .myFrame.myBin32Remove -text "Remove" -command wokdep:gui:RemoveBin32Path
507ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBin32Path
508ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
509
510# Additional executables (64-bit) search paths
72c37458 511ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
910970ab 512scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview"
513listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
514ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path
515ttk::button .myFrame.myBin64Edit -text "Edit"
516ttk::button .myFrame.myBin64Remove -text "Remove" -command wokdep:gui:RemoveBin64Path
517ttk::button .myFrame.myBin64Clear -text "Reset" -command wokdep:gui:ResetBin64Path
518ttk::label .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
519
520# Bottom
521ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom
522ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close
523
524# Create grid
525# Header
aafe169f 526grid .myFrame.myPrjFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
527grid .myFrame.myPrjFrame.myPrjLbl -row 0 -column 0
528grid .myFrame.myPrjFrame.myPrjCombo -row 0 -column 1
529incr aRowIter
910970ab 530if { "$tcl_platform(platform)" == "windows" } {
ea991a6e 531 grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w
532 grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0
533 grid .myFrame.myVsFrame.myVsCombo -row 0 -column 1 -padx 5
534 grid .myFrame.myVsFrame.myArchCombo -row 0 -column 2
910970ab 535 incr aRowIter
536 grid .myFrame.myVcEntry -row $aRowIter -column 0
537 grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w
538 grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6
539 incr aRowIter
540}
541
542#
ea991a6e 543grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
5951a088 544grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 0
545grid .myFrame.myHxxChecks.myScutsCombo -row 0 -column 1
26cfd29c 546if { "$tcl_platform(platform)" == "windows" } {
547 grid .myFrame.myHxxChecks.myRelDebInfoCheck -row 0 -column 2
548 grid .myFrame.myHxxChecks.myRelDebInfoLbl -row 0 -column 3
549}
910970ab 550incr aRowIter
551#
552grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
553incr aRowIter
554grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5
555grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6
556incr aRowIter
ea991a6e 557
558grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
910970ab 559incr aRowIter
ea991a6e 560grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e
561grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w
562grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e
563grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w
810b672f 564if { "$::tcl_platform(os)" != "Darwin" } {
565 grid .myFrame.myChecks.myGlesCheck -row $aCheckRowIter -column 4 -sticky e
566 grid .myFrame.myChecks.myGlesLbl -row $aCheckRowIter -column 5 -sticky w
567}
ea991a6e 568#grid .myFrame.myChecks.myOpenClCheck -row $aCheckRowIter -column 6 -sticky e
569#grid .myFrame.myChecks.myOpenClLbl -row $aCheckRowIter -column 7 -sticky w
e22105a9 570grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e
571grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w
572
0a419c51 573grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 12 -sticky e
574grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 13 -sticky w
e22105a9 575
ea991a6e 576incr aCheckRowIter
e22105a9 577grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e
578grid .myFrame.myChecks.myFFmpegLbl -row $aCheckRowIter -column 1 -sticky w
ea991a6e 579grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e
580grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w
1ce0716b 581if { "$::tcl_platform(platform)" == "windows" } {
e22105a9 582 grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e
583 grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w
1ce0716b 584}
e22105a9 585grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e
586grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w
0a419c51 587grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e
588grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w
e22105a9 589
ea991a6e 590incr aCheckRowIter
910970ab 591if { "$::tcl_platform(os)" == "Darwin" } {
ea991a6e 592 grid .myFrame.myChecks.myMacGLXCheck -row $aCheckRowIter -column 0 -sticky e
593 grid .myFrame.myChecks.myMacGLXLbl -row $aCheckRowIter -column 1 -sticky w
594 incr aCheckRowIter
910970ab 595}
596
0a419c51 597grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 6 -sticky e
598grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 7 -sticky w
599incr aCheckRowIter
600
910970ab 601# Additional headers search paths
602grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
603incr aRowIter
604grid .myFrame.myIncList -row $aRowIter -column 0 -rowspan 4 -columnspan 5
605grid .myFrame.myIncScrl -row $aRowIter -column 5 -rowspan 4
606grid .myFrame.myIncAdd -row $aRowIter -column 6
607incr aRowIter
608#grid .myFrame.myIncEdit -row $aRowIter -column 6
609incr aRowIter
610grid .myFrame.myIncRemove -row $aRowIter -column 6
611incr aRowIter
612grid .myFrame.myIncClear -row $aRowIter -column 6
613incr aRowIter
614grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w
615incr aRowIter
616
617# Additional 32-bit search paths
618if { "$ARCH" == "32" } {
619 wokdep:gui:Show32Bitness aRowIter
620}
621
622# Additional 64-bit search paths
623if { "$ARCH" == "64" } {
624 wokdep:gui:Show64Bitness aRowIter
625}
626
627# Bottom section
628grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2
629grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2
630
631# Bind events
aafe169f 632bind .myFrame.myPrjFrame.myPrjCombo <<ComboboxSelected>> {
633 wokdep:gui:SwitchConfig
634}
ea991a6e 635bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> {
910970ab 636 wokdep:gui:SwitchConfig
637}
ea991a6e 638bind .myFrame.myVsFrame.myArchCombo <<ComboboxSelected>> {
910970ab 639 wokdep:gui:SwitchArch
640}
641
642.myFrame.mySrchEntry configure -validate all -validatecommand {
643 #return [file exists "$::PRODUCTS_PATH"]
644 wokdep:gui:UpdateList
645 return 1
646}
647
648wokdep:gui:UpdateList