From 4d8517793d4803cd0794b6942ae58a938f4395e5 Mon Sep 17 00:00:00 2001 From: akl Date: Thu, 19 Jun 2008 13:07:00 +0000 Subject: [PATCH] Add --single-directory(-s) option. Update the help information. --- README | 71 ++++++++++++++++++++++++++++++++++-------------------- runInstall | 36 +++++++++++++++++++++++---- 2 files changed, 76 insertions(+), 31 deletions(-) diff --git a/README b/README index b2b51ac..966c0b2 100644 --- a/README +++ b/README @@ -24,16 +24,14 @@ 1. Running of the Installation Wizard - Currently the Installation Wizard can be launched only in the - GUI mode. The batch mode is unavailable in this version, but - eventually it will become available. The root directory of - the Installation Wizard contains Python script runInstall. - To run the Installation Wizard type runInstall in the terminal - window: + The Installation Wizard can be launched in two modes: GUI and batch. + The root directory of the Installation Wizard contains Python + script runInstall. To run the Installation Wizard just type + runInstall in the terminal window: [ python ] runInstall [] - Without any options this script will launch the SALOME Installation + Without any option this script will launch the SALOME Installation Wizard in the default mode (GUI) with the default installation parameters. The default mode can be overridden by using command line options. Each option has short and long notations: @@ -43,28 +41,44 @@ Runs the Installation Wizard in the GUI mode (this is the default mode). - -f FILE / --file=FILE + -b / --batch + + Runs the Installation Wizard in command-line mode. - Defines the XML configuration file to be used by the Installation - Wizard. If the appropriate file is not found, the warning message - box is shown (in GUI mode). If this option is not used, the - installation script tries to define the Linux version and use the - corresponding XML file. + -f FILE / --file=FILE + + Defines the XML configuration file to be used by the Installation Wizard. + If the appropriate file is not found, the warning message is shown. + If this option is not used then the installation script tries to + define the Linux version and use the corresponding XML file. + For example, for the Linux Mandriva 2006.0 the config_Mandriva_2006.0.xml + file will be used by default. -d DIR / --target=DIR Defines the target directory for SALOME platform installation. If used, this option overrides the default target directory, indicated in the configuration XML file (usually - ${HOME}/salome_, see here for more details). + ${HOME}/salome_). -t DIR / --tmp=DIR Defines the directory for temporary files. If used, this option overrides the default temporary directory, indicated in - the configuration xml file (usually /tmp, see here for more - details). + the configuration xml file (usually /tmp). + + -a / --all-from-sources + + Forces all products to be installed from sources including SALOME + modules. If this option is used all the default installation modes + are ignored. + -s / --single-directory + + Install all SALOME binaries packages to one directory (SALOME_, + where is SALOME version). + Note: this option is ignored when --all-from-sources (-a) option is used. + -h / --help Prints help information about available options. @@ -108,13 +122,13 @@ source salome.csh where is KERNEL binaries directory, e.g. - KERNEL_4.0.0 for the 4.0.0 version. + KERNEL_4.1.3 for the 4.1.3 version. 2.2. Launching of SALOME After you set environment you can start SALOME. Go to the KERNEL - module's binaries directory (KERNEL_4.0.0/bin/salome for the version - 4.0.0) by using of 'cd' command and then type: + module's binaries directory (KERNEL_4.1.3/bin/salome for the version + 4.1.3) by using of 'cd' command and then type: runSalome [] @@ -196,10 +210,10 @@ then builds each product using the product's own compilation procedure. The installation time also depends on the computer and platform used. - For example, to install SALOME on Pentium IV-2GHz, Linux Mandrake 10.1, + For example, to install SALOME on Pentium IV-3GHz, Linux Mandriva 2006.0, time of the installation is: - - from binaries: ~1 hour; + - from binaries: ~15 minutes; - from sources: more than 24 hours. 3.2. Log files @@ -248,10 +262,10 @@ In this scenario it is supposed that you have installed SALOME modules sources in the /home/salome directory. The name of each module sources directory depends on the version of the platform, for example, - KERNEL_SRC_4.0.0 for KERNEL module of SALOME version 4.0.0. + KERNEL_SRC_4.1.3 for KERNEL module of SALOME version 4.1.3. Compilation and installation should be performed according to - the dependancies between modules: + the dependencies between modules: Main SALOME modules: @@ -267,6 +281,9 @@ * NETGENPLUGIN -> KERNEL, GUI, SMESH * GHS3DPLUGIN -> KERNEL, GUI, SMESH + * GHS3DPRLPLUGIN -> KERNEL, GUI, SMESH + * HexoticPLUGIN -> KERNEL, GUI, SMESH + * BLSURFPLUGIN -> KERNEL, GUI, SMESH Sample modules: @@ -276,6 +293,8 @@ * HELLO -> KERNEL, GUI * PYHELLO -> KERNEL * LIGHT -> KERNEL, GUI + * RANDOMIZER -> KERNEL, GUI + * SIERPINSKY -> KERNEL, GUI, VISU, RANDOMIZER Note: SMESH plugins and sample modules are optional. You may skip compiling them if you do not plan to use NETGEN and/or GHS3D meshing @@ -306,12 +325,12 @@ - create a configuration script by typing - ../KERNEL_SRC_4.0.0/build_configure + ../KERNEL_SRC_4.1.3/build_configure - run configure script which will check the environment and create Makefile files: - ../KERNEL_SRC_4.0.0/configure --prefix=/home/salome/KERNEL_install + ../KERNEL_SRC_4.1.3/configure --prefix=/home/salome/KERNEL_install Note, that --prefix option defines the directory where you want to install KERNEL module after 'make install' procedure. configure script @@ -413,7 +432,7 @@ Note: please, take into your account that 'make install' step is obligatory for the KERNEL module. Build directory of KERNEL can not be indicated as KERNEL_ROOT_DIR. This is an exception - for the SALOME modules. So you should use either options -i + for the SALOME modules. So you should use either option -i or -p of build.sch script when building KERNEL module. Note: build.(c)sh scripts do not modify the environment files diff --git a/runInstall b/runInstall index 7f52c91..463f8eb 100755 --- a/runInstall +++ b/runInstall @@ -10,7 +10,7 @@ Copyright : 2002-2008 CEA """ -__version__ = "1.1.4" +__version__ = "1.1.5" # --- avoid "deprecation" warnings --- # import warnings @@ -700,6 +700,14 @@ def parse_parameters(): dest="force_sources", default=False, help=help_str) + help_str = "Install all SALOME binaries packages to one directory.\n" + help_str += "This option is ignored when --all-from-sources (-a) option is used." + opt_parser.add_option("-s", + "--single-directory", + action="store_true", + dest="single_dir", + default=False, + help=help_str) help_str = "Prints version information and quits." opt_parser.add_option("-v", "--version", @@ -724,7 +732,7 @@ def parse_parameters(): os.system(cmd) print "" sys.exit(0) - return [options.xmlfile, options.target_dir, options.tmp_dir, options.gui, options.force_sources] + return [options.xmlfile, options.target_dir, options.tmp_dir, options.gui, options.force_sources, options.single_dir] #================================================================= # strip : removes spaces at the beginning and at the end of the @@ -1039,7 +1047,7 @@ def get_supported_platforms(xml_file=None): if __name__ == "__main__": # parse command line - [xml_file, target_dir, tmp_dir, is_gui, is_force_src] = parse_parameters() + [xml_file, target_dir, tmp_dir, is_gui, is_force_src, is_single_dir] = parse_parameters() if xml_file: xml_file = os.path.abspath(xml_file) if target_dir: target_dir = os.path.abspath(target_dir) if tmp_dir: tmp_dir = os.path.abspath(tmp_dir) @@ -1067,6 +1075,8 @@ if __name__ == "__main__": cmd += " --tmp %s"%tmp_dir if is_force_src: cmd += " --all-from-sources" + if is_single_dir: + cmd += " --single-directory" cmd += "&" sys.exit(os.system(cmd)) @@ -1191,11 +1201,22 @@ if __name__ == "__main__": rm_src_tmp, source_dir, subdir[__BINARIES__] ) - if product.woguiinst is not None and product.woguiinst != "": cmd += ' TRUE' + # install all modules with GUI + if product.woguiinst is not None and product.woguiinst != "": + cmd += ' TRUE' + # use single directory or not + if product.whattodo == __BINARIES__ and product.type == __CTX__COMPONENT__ and is_single_dir: + cmd += ' TRUE' res = os.system(cmd) rm_src_tmp = "FALSE" pass + # modify *.la files, if --single-directory option was ----------- + if is_single_dir: + message("Modifying of *.la files of SALOME modules...") + cmd = '%s/modifyLaFiles.sh modify_la_files %s' % (scripts_dir, target_dir) + res = os.system(cmd) + # pickup environment ----------- message("Creating environment files") for product in parser.products : @@ -1212,7 +1233,12 @@ if __name__ == "__main__": rm_src_tmp, source_dir, subdir[__BINARIES__] ) - if product.woguiinst is not None and product.woguiinst != "": cmd += ' TRUE' + # install all modules with GUI + if product.woguiinst is not None and product.woguiinst != "": + cmd += ' TRUE' + # use single directory or not + if product.whattodo == __BINARIES__ and product.type == __CTX__COMPONENT__ and is_single_dir: + cmd += ' TRUE' res = os.system(cmd) pass pass -- 2.39.2