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