From fc47bf606a8e18b2c235e90577a75d64b144975b Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 27 Nov 2013 11:09:36 +0000 Subject: [PATCH] Print platform information --- runInstall | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/runInstall b/runInstall index a69b836..37da557 100755 --- a/runInstall +++ b/runInstall @@ -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) @@ -1020,6 +1020,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 +1161,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 ---------------- -- 2.39.2