X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=runInstall;h=b7f7f210945bab4d94f077e9603471fd158294ca;hb=7f5d0a5cc6d875d6a1da432c678a3430f3019f87;hp=70bfc6c47c4ea60d983f5601fc599020c4c9fee5;hpb=09ffb8d23c683774f65b659c920d4dc9a24cf4b1;p=tools%2Finstall.git diff --git a/runInstall b/runInstall index 70bfc6c..b7f7f21 100755 --- a/runInstall +++ b/runInstall @@ -6,7 +6,7 @@ Installation Wizard launching script. This script is the part of the SALOME installation procedure. Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) Created : Thu Dec 18 12:01:00 2002 -Copyright : 2002-2008 CEA +Copyright : 2002-2013 CEA """ @@ -750,7 +750,7 @@ def parse_parameters(): (options, args) = opt_parser.parse_args() if options.help: # print help info and quit - print "\nSALOME Installation Wizard\n" + print "\nSALOME Installation Wizard (running on %s)\n" % get_os_name() opt_parser.print_help() print "" sys.exit(0) @@ -987,10 +987,13 @@ def get_os_release(): # --- regvar = re.compile("(.*)\s+[^\s]*[R|r]elease[^\s]*\s+([\d.]*)") regvar1 = re.compile("(.*)\s+[^\s]*[L|l][I|i][N|n][U|u][X|x][^\s]*(.*)\s+([\d.]*)\s+") + regvar2 = re.compile("([A-Za-z]+)\s+([0-9.]+)\s+.*") for l in lines: res = re.search(regvar, l) if not res: res = re.search(regvar1, l) + if not res: + res = re.search(regvar2, l) if res: plt_name = " ".join(" ".join(res.groups()[:len(res.groups())-1]).split()) # workaround for Mandrake and other platforms @@ -1020,6 +1023,18 @@ def get_os_release(): return plt_name, plt_ver, plt_arch +#============================================================== +# get_os_name : gets qualified OS name +# For example: +# Mandriva 2010.0 64bit +#=============================================================== +def get_os_name(): + plt_name, plt_ver, plt_arch = get_os_release() + data = [] + for i in plt_name, plt_ver, plt_arch: + if i: data.append(i) + return " ".join(data) + #============================================================== # check_xml_file : checks XML file existence and readability #=============================================================== @@ -1149,13 +1164,13 @@ def check_not_found_libs(filepath, optlibs): #------------------------------------------------------------------# if __name__ == "__main__": + # get program dir + cur_dir = get_program_path() # parse command line [xml_file, target_dir, tmp_dir, is_gui, is_force_src, is_single_dir, pltname] = 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) - # get program dir - cur_dir = get_program_path() #---- GUI ----------------