Index: openacs-4/packages/acs-bootstrap-installer/installer/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/index.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-bootstrap-installer/installer/index.tcl 29 Aug 2003 07:15:29 -0000 1.12 +++ openacs-4/packages/acs-bootstrap-installer/installer/index.tcl 19 Sep 2003 12:48:38 -0000 1.13 @@ -59,22 +59,19 @@ " -if { [file exists [acs_root_dir]/install.xml] } { +if { [file exists [apm_install_xml_file_path]] } { # Parse the xml document - set file [open "[acs_root_dir]/install.xml"] - set root_node [xml_doc_get_first_node [xml_parse -persist [read $file]]] - close $file + set root_node [apm_load_install_xml_file] if { ![string equal [xml_node_get_name $root_node] application] } { error "Installer: Could not find root node application in install.xml file" } - nsv_set acs_application node $root_node - nsv_set acs_application name [apm_required_attribute_value [nsv_get acs_application node] name] + nsv_set acs_application name [apm_required_attribute_value $root_node name] nsv_set acs_application pretty_name \ - [apm_attribute_value -default [nsv_get acs_application name] [nsv_get acs_application node] pretty-name] - nsv_set acs_application home [apm_attribute_value -default "" [nsv_get acs_application node] home] + [apm_attribute_value -default [nsv_get acs_application name] $root_node pretty-name] + nsv_set acs_application home [apm_attribute_value -default "" $root_node home] append body "

The installer will automatically install the [nsv_get acs_application pretty_name] Index: openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/packages-install.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 11 Sep 2003 09:08:35 -0000 1.10 +++ openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 19 Sep 2003 12:48:38 -0000 1.11 @@ -62,11 +62,12 @@ # Now process the application bundle if an install.xml file was found. - if { [nsv_exists acs_application node] } { + if { [file exists [apm_install_xml_file_path]] } { + set root_node [apm_load_install_xml_file] ns_write "

Loading packages for the [nsv_get acs_application pretty_name] application.

" - set actions [xml_node_get_children_by_name [nsv_get acs_application node] actions] + set actions [xml_node_get_children_by_name $root_node actions] if { [llength $actions] > 1 } { ns_log Error "Error in \"install.xml\": only one action node is allowed" ns_write "

Error in \"install.xml\": only one action node is allowed

" Index: openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl,v diff -u -N -r1.25 -r1.26 --- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 18 Sep 2003 17:16:03 -0000 1.25 +++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 19 Sep 2003 12:48:38 -0000 1.26 @@ -487,3 +487,29 @@ } } } + +ad_proc -private apm_load_install_xml_file {} { + Loads any install.xml file and returns the root node. Returns + the empty string if there is no install.xml file. + + @author Peter Marklund +} { + # Abort if there is no install.xml file + if { ![file exists [apm_install_xml_file_path]] } { + return "" + } + + set file [open [apm_install_xml_file_path]] + set root_node [xml_doc_get_first_node [xml_parse -persist [read $file]]] + close $file + + return $root_node +} + +ad_proc -private apm_install_xml_file_path {} { + Get the path of the install.xml file. + + @author Peter Marklund +} { + return "[acs_root_dir]/install.xml" +}