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