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