Ticket #15860: patch-base.diff
File patch-base.diff, 4.5 KB (added by luis.kop@…, 16 years ago) |
---|
-
umitCore/BasePaths.py
old new 36 36 # directory. 37 37 main_dir = os.path.abspath(os.path.dirname(sys.argv[0])) 38 38 if hasattr(sys, "frozen"): 39 main_dir = os.path.dirname(sys.executable) 39 main_dir = dirname(sys.executable) 40 41 CONFIG_DIR = "__PREFIX__/share/umit/config" 42 LOCALE_DIR = "__PREFIX__/share/locale" 43 MISC_DIR = "__PREFIX__/share/umit/misc" 44 ICONS_DIR = "__PREFIX__/share/icons/umit" 45 PIXMAPS_DIR = "__PREFIX__/share/pixmaps/umit" 46 DOCS_DIR = "__PREFIX__/share/doc/umit" 47 40 48 41 CONFIG_DIR = os.path.join(main_dir, "share", "umit", "config")42 LOCALE_DIR = os.path.join(main_dir, "share", "locale")43 MISC_DIR = os.path.join(main_dir, "share", "umit", "misc")44 ICONS_DIR = os.path.join(main_dir, "share", "icons", "umit")45 PIXMAPS_DIR = os.path.join(main_dir, "share", "pixmaps", "umit")46 DOCS_DIR = os.path.join(main_dir, "share", "doc", "umit")47 49 48 50 base_paths = dict(config_file = 'umit.conf', 49 51 config_dir = '.umit', … … 56 58 options = 'options.xml', 57 59 umit_opf = 'umit.opf', 58 60 umit_opt = 'umit.opt', 59 pixmaps_dir = PIXMAPS_DIR,60 i18n_dir = LOCALE_DIR,61 pixmaps_dir = os.path.join('share', 'pixmaps'), 62 i18n_dir = os.path.join('share','locale'), 61 63 i18n_message_file = 'umit.mo', 62 64 scan_results_extension = 'usr', # comes from umit scan result 63 65 scan_profile_extension = 'usp', # comes from umit scan profile 64 66 user_home = HOME, 65 67 basic_search_sequence = [HOME, CURRENT_DIR], 66 68 config_search_sequence = [HOME, CURRENT_DIR], 67 pixmaps_search_sequence = [os.path.join(CURRENT_DIR, PIXMAPS_DIR),69 pixmaps_search_sequence = [os.path.join(CURRENT_DIR, 'share', 'pixmaps'), 68 70 HOME], 69 i18n_search_sequence = [os.path.join(CURRENT_DIR, LOCALE_DIR), HOME],71 i18n_search_sequence = [os.path.join(CURRENT_DIR, 'share', 'locale'), HOME], 70 72 umitdb = "umit.db", 71 73 services = "nmap-services", 72 74 services_dump = "services.dmp", … … 83 85 '/opt/umit', HOME, CURRENT_DIR], 84 86 config_search_sequence = [os.path.join(HOME, base_paths['config_dir']), 85 87 CURRENT_DIR, '/etc'], 86 pixmaps_search_sequence = [os.path.join(CURRENT_DIR, PIXMAPS_DIR), 87 '/usr/share/pixmaps/umit', 88 pixmaps_search_sequence = [os.path.join(CURRENT_DIR, 89 'share', 90 'pixmaps'), 91 '/usr/share/pixmaps', 88 92 '/opt/umit', HOME], 89 i18n_search_sequence = [os.path.join(CURRENT_DIR, LOCALE_DIR),93 i18n_search_sequence = [os.path.join(CURRENT_DIR, 'share', 'locale'), 90 94 '/usr/share/locale', 91 95 HOME, CURRENT_DIR])) 92 96 elif PLATFORM == 'win32': 93 97 PROGRAM_FILES = os.environ.get("PROGRAMFILES", "\\") 94 98 UMIT_DIR = os.path.join(PROGRAM_FILES, "Umit") 95 PIXMAPS_DIR = os.path.join(UMIT_DIR, PIXMAPS_DIR)99 PIXMAPS_DIR = os.path.join(UMIT_DIR, 'share', 'pixmaps') 96 100 97 101 base_paths.update(dict(\ 98 102 basic_search_sequence = [UMIT_DIR, PROGRAM_FILES, HOME, CURRENT_DIR], 99 103 config_search_sequence = [UMIT_DIR, PROGRAM_FILES, HOME, CURRENT_DIR], 100 104 pixmaps_search_sequence = [PIXMAPS_DIR, PROGRAM_FILES, 101 os.path.join(CURRENT_DIR, PIXMAPS_DIR),105 os.path.join(CURRENT_DIR, 'share', 'pixmaps'), 102 106 HOME], 103 107 i18n_search_sequence = [UMIT_DIR, PROGRAM_FILES, 104 os.path.join(CURRENT_DIR, LOCALE_DIR), HOME],))108 os.path.join(CURRENT_DIR, 'share', 'locale'), HOME],)) 105 109 106 110 elif PLATFORM == 'darwin': 107 111 base_paths.update(dict(user_home = HOME,