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