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 | |
27 | package require Tk |
910970ab |
28 | |
29 | set aRowIter 0 |
ea991a6e |
30 | set aCheckRowIter 0 |
910970ab |
31 | frame .myFrame -padx 5 -pady 5 |
32 | pack .myFrame -fill both -expand 1 |
aafe169f |
33 | frame .myFrame.myPrjFrame |
ea991a6e |
34 | frame .myFrame.myVsFrame |
35 | frame .myFrame.myHxxChecks |
36 | frame .myFrame.myChecks |
910970ab |
37 | |
aafe169f |
38 | # project file format |
39 | set SYS_PRJFMT_LIST {} |
40 | set SYS_PRJNAME_LIST {} |
41 | if { "$::tcl_platform(platform)" == "windows" } { |
42 | lappend ::SYS_PRJFMT_LIST "vcxproj" |
43 | lappend ::SYS_PRJNAME_LIST "Visual Studio (.vcxproj)" |
44 | } |
45 | if { "$tcl_platform(os)" == "Darwin" } { |
46 | lappend ::SYS_PRJFMT_LIST "xcd" |
47 | lappend ::SYS_PRJNAME_LIST "XCode (.xcd)" |
48 | } |
49 | lappend ::SYS_PRJFMT_LIST "cbp" |
50 | lappend ::SYS_PRJNAME_LIST "Code Blocks (.cbp)" |
51 | lappend ::SYS_PRJFMT_LIST "pro" |
52 | lappend ::SYS_PRJNAME_LIST "Qt Creator (.pro)" |
53 | |
54 | set aPrjIndex [lsearch $::SYS_PRJFMT_LIST $::PRJFMT] |
55 | set ::PRJNAME [lindex $::SYS_PRJNAME_LIST $aPrjIndex] |
56 | |
910970ab |
57 | set SYS_VS_LIST {} |
58 | set SYS_VC_LIST {} |
59 | set SYS_VCVARS_LIST {} |
60 | |
c8428cb3 |
61 | # detect installed Visual Studio 2017+ instances by running vswhere.exe |
d6cda17a |
62 | if { ! [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 | } |
67 | if { ! [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 |
72 | if { ! [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 | } |
77 | if { ! [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 |
84 | if { [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 | } |
93 | if { [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 | } |
98 | if { [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 | } |
103 | if { [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 | } |
108 | if { [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 | } |
113 | if { [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 | } |
118 | lappend ::SYS_VS_LIST "Custom" |
119 | lappend ::SYS_VC_LIST "vcX" |
120 | lappend ::SYS_VCVARS_LIST "%VSXXCOMNTOOLS%..\\..\\VC\\vcvarsall.bat" |
121 | |
122 | set aVcVerIndex [lsearch $::SYS_VC_LIST $::VCVER] |
123 | set ::VSVER [lindex $::SYS_VS_LIST $aVcVerIndex] |
124 | if { "$::VCVARS" == "" } { |
125 | set ::VCVARS [lindex $::SYS_VCVARS_LIST $aVcVerIndex] |
126 | } |
127 | |
128 | proc wokdep:gui:Close {} { |
129 | # if changed ask |
130 | exit |
131 | } |
132 | |
133 | proc 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 | |
146 | proc 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 | |
163 | proc 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 | |
220 | proc wokdep:gui:BrowseVcVars {} { |
221 | set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"] |
222 | if { "$aResult" != "" } { |
223 | set ::VCVARS $aResult |
224 | } |
225 | } |
226 | |
227 | proc 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 | |
235 | proc 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 | |
243 | proc 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 | |
251 | proc 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 | |
259 | proc 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 | |
267 | proc 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 | |
275 | proc 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 | |
283 | proc 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 | |
291 | proc 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 | |
299 | proc 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 | |
307 | proc 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 | |
315 | proc wokdep:gui:ResetIncPath {} { |
316 | set ::CSF_OPT_INC {} |
317 | wokdep:gui:UpdateList |
318 | } |
319 | |
320 | proc wokdep:gui:ResetLib32Path {} { |
321 | set ::CSF_OPT_LIB32 {} |
322 | wokdep:gui:UpdateList |
323 | } |
324 | |
325 | proc wokdep:gui:ResetLib64Path {} { |
326 | set ::CSF_OPT_LIB64 {} |
327 | wokdep:gui:UpdateList |
328 | } |
329 | |
330 | proc wokdep:gui:ResetBin32Path {} { |
331 | set ::CSF_OPT_BIN32 {} |
332 | wokdep:gui:UpdateList |
333 | } |
334 | |
335 | proc wokdep:gui:ResetBin64Path {} { |
336 | set ::CSF_OPT_BIN64 {} |
337 | wokdep:gui:UpdateList |
338 | } |
339 | |
340 | proc 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 | |
383 | proc 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 |
427 | ttk::label .myFrame.myPrjFrame.myPrjLbl -text "Project format:" -padding {5 5 20 5} |
428 | ttk::combobox .myFrame.myPrjFrame.myPrjCombo -values $SYS_PRJNAME_LIST -state readonly -textvariable PRJNAME -width 40 |
d6cda17a |
429 | ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5} |
430 | ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40 |
ea991a6e |
431 | ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6 |
d6cda17a |
432 | entry .myFrame.myVcEntry -textvariable VCVER -width 10 |
910970ab |
433 | entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70 |
434 | ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars |
26cfd29c |
435 | ttk::label .myFrame.myHxxChecks.myRelDebInfoLbl -text "Release with Debug info" |
436 | checkbutton .myFrame.myHxxChecks.myRelDebInfoCheck -offvalue "false" -onvalue "true" -variable HAVE_RelWithDebInfo |
910970ab |
437 | |
438 | # |
5951a088 |
439 | ttk::combobox .myFrame.myHxxChecks.myScutsCombo -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12 |
440 | ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling headers folder inc:" |
910970ab |
441 | |
442 | # |
72c37458 |
443 | ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5} |
910970ab |
444 | entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH -width 80 |
445 | ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot |
ea991a6e |
446 | checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList |
447 | ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage" |
ea991a6e |
448 | checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList |
449 | ttk::label .myFrame.myChecks.myTbbLbl -text "Use Intel TBB" |
1ce0716b |
450 | if { "$::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 |
454 | if { "$::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 |
458 | checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true" -variable HAVE_FFMPEG -command wokdep:gui:UpdateList |
459 | ttk::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 |
462 | checkbutton .myFrame.myChecks.myMacGLXCheck -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX |
463 | ttk::label .myFrame.myChecks.myMacGLXLbl -text "Use X11 for windows drawing" |
464 | ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK" |
465 | checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList |
e22105a9 |
466 | |
467 | checkbutton .myFrame.myChecks.myZLibCheck -offvalue "false" -onvalue "true" -variable HAVE_ZLIB -command wokdep:gui:UpdateList |
468 | ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib" |
469 | checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList |
470 | ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma" |
471 | |
0a419c51 |
472 | checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList |
473 | ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON" |
474 | |
ea991a6e |
475 | checkbutton .myFrame.myChecks.myQt4Check -offvalue "false" -onvalue "true" -variable CHECK_QT4 -command wokdep:gui:UpdateList |
476 | ttk::label .myFrame.myChecks.myQt4Lbl -text "Search Qt4" |
477 | checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList |
478 | ttk::label .myFrame.myChecks.myJDKLbl -text "Search JDK" |
910970ab |
479 | |
480 | # Additional headers search paths |
72c37458 |
481 | ttk::label .myFrame.myIncLbl -text "Additional headers search paths:" -padding {5 5 80 5} |
910970ab |
482 | scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview" |
483 | listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set" |
484 | ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath |
485 | ttk::button .myFrame.myIncEdit -text "Edit" |
486 | ttk::button .myFrame.myIncRemove -text "Remove" -command wokdep:gui:RemoveIncPath |
487 | ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncPath |
488 | ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
489 | |
490 | # Additional libraries (32-bit) search paths |
72c37458 |
491 | ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5} |
910970ab |
492 | scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview" |
493 | listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set" |
494 | ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path |
495 | ttk::button .myFrame.myLib32Edit -text "Edit" |
496 | ttk::button .myFrame.myLib32Remove -text "Remove" -command wokdep:gui:RemoveLib32Path |
497 | ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLib32Path |
498 | ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
499 | |
500 | # Additional libraries (64-bit) search paths |
72c37458 |
501 | ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5} |
910970ab |
502 | scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview" |
503 | listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set" |
504 | ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path |
505 | ttk::button .myFrame.myLib64Edit -text "Edit" |
506 | ttk::button .myFrame.myLib64Remove -text "Remove" -command wokdep:gui:RemoveLib64Path |
507 | ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLib64Path |
508 | ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
509 | |
510 | # Additional executables (32-bit) search paths |
72c37458 |
511 | ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5} |
910970ab |
512 | scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview" |
513 | listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set" |
514 | ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path |
515 | ttk::button .myFrame.myBin32Edit -text "Edit" |
516 | ttk::button .myFrame.myBin32Remove -text "Remove" -command wokdep:gui:RemoveBin32Path |
517 | ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBin32Path |
518 | ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
519 | |
520 | # Additional executables (64-bit) search paths |
72c37458 |
521 | ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5} |
910970ab |
522 | scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview" |
523 | listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set" |
524 | ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path |
525 | ttk::button .myFrame.myBin64Edit -text "Edit" |
526 | ttk::button .myFrame.myBin64Remove -text "Remove" -command wokdep:gui:RemoveBin64Path |
527 | ttk::button .myFrame.myBin64Clear -text "Reset" -command wokdep:gui:ResetBin64Path |
528 | ttk::label .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} |
529 | |
530 | # Bottom |
531 | ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom |
532 | ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close |
533 | |
534 | # Create grid |
535 | # Header |
aafe169f |
536 | grid .myFrame.myPrjFrame -row $aRowIter -column 0 -columnspan 10 -sticky w |
537 | grid .myFrame.myPrjFrame.myPrjLbl -row 0 -column 0 |
538 | grid .myFrame.myPrjFrame.myPrjCombo -row 0 -column 1 |
539 | incr aRowIter |
910970ab |
540 | if { "$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 |
553 | grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w |
5951a088 |
554 | grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 0 |
555 | grid .myFrame.myHxxChecks.myScutsCombo -row 0 -column 1 |
26cfd29c |
556 | if { "$tcl_platform(platform)" == "windows" } { |
557 | grid .myFrame.myHxxChecks.myRelDebInfoCheck -row 0 -column 2 |
558 | grid .myFrame.myHxxChecks.myRelDebInfoLbl -row 0 -column 3 |
559 | } |
910970ab |
560 | incr aRowIter |
561 | # |
562 | grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
563 | incr aRowIter |
564 | grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5 |
565 | grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6 |
566 | incr aRowIter |
ea991a6e |
567 | |
568 | grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w |
910970ab |
569 | incr aRowIter |
ea991a6e |
570 | grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e |
571 | grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w |
572 | grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e |
573 | grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w |
810b672f |
574 | if { "$::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 |
580 | grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e |
581 | grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w |
582 | |
0a419c51 |
583 | grid .myFrame.myChecks.myQt4Check -row $aCheckRowIter -column 12 -sticky e |
584 | grid .myFrame.myChecks.myQt4Lbl -row $aCheckRowIter -column 13 -sticky w |
e22105a9 |
585 | |
ea991a6e |
586 | incr aCheckRowIter |
e22105a9 |
587 | grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e |
588 | grid .myFrame.myChecks.myFFmpegLbl -row $aCheckRowIter -column 1 -sticky w |
ea991a6e |
589 | grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e |
590 | grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w |
1ce0716b |
591 | if { "$::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 |
595 | grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e |
596 | grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w |
0a419c51 |
597 | grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e |
598 | grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w |
e22105a9 |
599 | |
ea991a6e |
600 | incr aCheckRowIter |
910970ab |
601 | if { "$::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 |
607 | grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 6 -sticky e |
608 | grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 7 -sticky w |
609 | incr aCheckRowIter |
610 | |
910970ab |
611 | # Additional headers search paths |
612 | grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
613 | incr aRowIter |
614 | grid .myFrame.myIncList -row $aRowIter -column 0 -rowspan 4 -columnspan 5 |
615 | grid .myFrame.myIncScrl -row $aRowIter -column 5 -rowspan 4 |
616 | grid .myFrame.myIncAdd -row $aRowIter -column 6 |
617 | incr aRowIter |
618 | #grid .myFrame.myIncEdit -row $aRowIter -column 6 |
619 | incr aRowIter |
620 | grid .myFrame.myIncRemove -row $aRowIter -column 6 |
621 | incr aRowIter |
622 | grid .myFrame.myIncClear -row $aRowIter -column 6 |
623 | incr aRowIter |
624 | grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w |
625 | incr aRowIter |
626 | |
627 | # Additional 32-bit search paths |
628 | if { "$ARCH" == "32" } { |
629 | wokdep:gui:Show32Bitness aRowIter |
630 | } |
631 | |
632 | # Additional 64-bit search paths |
633 | if { "$ARCH" == "64" } { |
634 | wokdep:gui:Show64Bitness aRowIter |
635 | } |
636 | |
637 | # Bottom section |
638 | grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2 |
639 | grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2 |
640 | |
641 | # Bind events |
aafe169f |
642 | bind .myFrame.myPrjFrame.myPrjCombo <<ComboboxSelected>> { |
643 | wokdep:gui:SwitchConfig |
644 | } |
ea991a6e |
645 | bind .myFrame.myVsFrame.myVsCombo <<ComboboxSelected>> { |
910970ab |
646 | wokdep:gui:SwitchConfig |
647 | } |
ea991a6e |
648 | bind .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 | |
658 | wokdep:gui:UpdateList |