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