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