Index: openacs-4/tcl/0-acs-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/tcl/0-acs-init.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/tcl/0-acs-init.tcl 10 Jan 2007 21:22:14 -0000 1.6 +++ openacs-4/tcl/0-acs-init.tcl 27 Oct 2014 16:42:09 -0000 1.7 @@ -7,27 +7,36 @@ # # $Id$ +# handling NaviServer deprecated ns_info subcommands. +namespace eval acs { + set ::acs::pageroot [expr {[catch {ns_server pagedir}] ? [ns_info pageroot] : [ns_server pagedir]}] + set ::acs::tcllib [expr {[catch {ns_server tcllib}] ? [ns_info tcllib] : [ns_server tcllib]}] + set ::acs::rootdir [file dirname [string trimright $::acs::tcllib "/"]] +} + # Determine the OpenACS root directory, which is the directory right above the -# Tcl library directory [ns_info tcllib]. -set root_directory [file dirname [string trimright [ns_info tcllib] "/"]] -nsv_set acs_properties root_directory $root_directory +# Tcl library directory ::acs::tcllib. -ns_log "Notice" "Loading OpenACS, rooted at $root_directory" -set bootstrap_file "$root_directory/packages/acs-bootstrap-installer/bootstrap.tcl" -ns_log "Notice" "Sourcing $bootstrap_file" +nsv_set acs_properties root_directory $::acs::rootdir +ns_log "Notice" "Loading OpenACS, rooted at $::acs::rootdir" +set bootstrap_file "$::acs::rootdir/packages/acs-bootstrap-installer/bootstrap.tcl" + if { [file isfile $bootstrap_file] } { - # Check that the appropriate version of tDom (http://www.tdom.org) is installed - # and spit out a comment or try to install it if not. - if {{} eq [info commands domNode]} { + ns_log "Notice" "Sourcing $bootstrap_file" + # + # Check that the appropriate version of tDom (http://www.tdom.org) + # is installed and spit out a comment or try to install it if not. + # + if {[info commands domNode] eq ""} { if {[ns_info version] < 4} { ns_log Error "0-acs-init.tcl: domNode command not found -- libtdom.so not loaded?" } elseif {[ns_info version] >= 4} { if {[catch {set version [package require tdom]} errmsg]} { ns_log Error "0-acs-init.tcl: error loading tdom: $errmsg" } else { - foreach {major minor point} [split $version .] { break } + lassign [split $version .] major minor point if {$major == 0 && ( $minor < 7 || ($minor == 7 && $point < 8))} { ns_log Error "0-acs-init.tcl: please use tdom version 0.7.8 or greater (you have version $version)"