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