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