Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.103 -r1.104 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 20 Jan 2008 19:31:37 -0000 1.103 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 21 Jan 2008 13:21:25 -0000 1.104 @@ -4423,11 +4423,37 @@ or otherwise empty string } { - foreach p [split $::env(PATH) :] { - set fullname [file join $p $prog] - if {[file executable $fullname]} { - return $fullname + switch $::tcl_platform(platform) { + windows { + # + # Notice: Windows has an alternative search environment + # via registry. Maybe it is necessary in the future + # to locate the program via registry (sketch below) + # + # package require registry + # set key {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths} + # set entries [registry keys $key $prog.*] + # if {[llength $entries]>0} { + # set fullkey "$key\\[lindex $entries 0]" + # return [registry get $fullkey ""] + # } + # return "" + # + set searchdirs [split $::env(PATH) \;] + set exts [list .exe .dll .com .bat] } + default { + set searchdirs [split $::env(PATH) :] + set exts [list ""] + } } + foreach dir $searchdirs { + set fullname [file join $dir $prog] + foreach ext $exts { + if {[file executable $fullname$ext]} { + return $fullname$ext + } + } + } return "" } Index: openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl 20 Jan 2008 19:31:37 -0000 1.15 +++ openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl 21 Jan 2008 13:21:26 -0000 1.16 @@ -26,7 +26,10 @@ # aspell or ispell? set dicts "" set default_lang "" -if { [string match "*aspell" $bin] } { +# +# GN: note, that under windows, the binary will be called aspell.exe +# +if { [string match "*aspell*" $bin] } { # aspell with_catch errmsg { set dicts [exec $bin dump dicts] @@ -41,7 +44,7 @@ ns_log Warning "Gettings dicts and default_lang for aspell failed with error message: \"$errmsg\"" ns_log Notice "You might want to upgrade to a more recent version of Aspell ... http://aspell.sourceforge.net/" } -} elseif { [string match "*ispell" $bin] } { +} elseif { [string match "*ispell*" $bin] } { # ispell - if someone knows how to get the available dictionaries and the # default language from ispell, please add it here :-) set dicts ""