--- umitCore/BasePaths.py.orig	2008-07-03 17:30:17.000000000 +0100
+++ umitCore/BasePaths.py	2008-07-03 17:48:56.000000000 +0100
@@ -36,14 +36,16 @@
 # directory.
 main_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
 if hasattr(sys, "frozen"):
-    main_dir = os.path.dirname(sys.executable)
+    main_dir = dirname(sys.executable)
+
+CONFIG_DIR = "__PREFIX__/share/umit/config"
+LOCALE_DIR = "__PREFIX__/share/locale"
+MISC_DIR = "__PREFIX__/share/umit/misc"
+ICONS_DIR = "__PREFIX__/share/icons/umit"
+PIXMAPS_DIR = "__PREFIX__/share/pixmaps/umit"
+DOCS_DIR = "__PREFIX__/share/doc/umit"
+
 
-CONFIG_DIR = os.path.join(main_dir, "share", "umit", "config")
-LOCALE_DIR = os.path.join(main_dir, "share", "locale")
-MISC_DIR = os.path.join(main_dir, "share", "umit", "misc")
-ICONS_DIR = os.path.join(main_dir, "share", "icons", "umit")
-PIXMAPS_DIR = os.path.join(main_dir, "share", "pixmaps", "umit")
-DOCS_DIR = os.path.join(main_dir, "share", "doc", "umit")
 
 base_paths = dict(config_file = 'umit.conf',
                   config_dir = '.umit',
@@ -56,17 +58,17 @@
                   options = 'options.xml',
                   umit_opf = 'umit.opf',
                   umit_opt = 'umit.opt',
-                  pixmaps_dir = PIXMAPS_DIR,
-                  i18n_dir = LOCALE_DIR,
+                  pixmaps_dir = os.path.join('share', 'pixmaps'),
+                  i18n_dir = os.path.join('share','locale'),
                   i18n_message_file = 'umit.mo',
                   scan_results_extension = 'usr',  # comes from umit scan result
                   scan_profile_extension = 'usp',  # comes from umit scan profile
                   user_home = HOME,
                   basic_search_sequence = [HOME, CURRENT_DIR],
                   config_search_sequence = [HOME, CURRENT_DIR],
-                  pixmaps_search_sequence = [os.path.join(CURRENT_DIR, PIXMAPS_DIR),
+                  pixmaps_search_sequence = [os.path.join(CURRENT_DIR, 'share', 'pixmaps'),
                                              HOME],
-                  i18n_search_sequence = [os.path.join(CURRENT_DIR, LOCALE_DIR), HOME],
+                  i18n_search_sequence = [os.path.join(CURRENT_DIR, 'share', 'locale'), HOME],
                   umitdb = "umit.db",
                   services = "nmap-services",
                   services_dump = "services.dmp",
@@ -83,25 +85,27 @@
                                                     '/opt/umit', HOME, CURRENT_DIR],
                            config_search_sequence = [os.path.join(HOME, base_paths['config_dir']),
                                                      CURRENT_DIR, '/etc'],
-                           pixmaps_search_sequence = [os.path.join(CURRENT_DIR, PIXMAPS_DIR),
-                                                      '/usr/share/pixmaps/umit',
+                           pixmaps_search_sequence = [os.path.join(CURRENT_DIR,
+                                                                   'share',
+                                                                   'pixmaps'),
+                                                      '/usr/share/pixmaps',
                                                       '/opt/umit', HOME],
-                           i18n_search_sequence = [os.path.join(CURRENT_DIR, LOCALE_DIR),
+                           i18n_search_sequence = [os.path.join(CURRENT_DIR, 'share', 'locale'),
                                                    '/usr/share/locale',
                                                    HOME, CURRENT_DIR]))
 elif PLATFORM == 'win32':
     PROGRAM_FILES = os.environ.get("PROGRAMFILES", "\\")
     UMIT_DIR = os.path.join(PROGRAM_FILES, "Umit")
-    PIXMAPS_DIR = os.path.join(UMIT_DIR, PIXMAPS_DIR)
+    PIXMAPS_DIR = os.path.join(UMIT_DIR, 'share', 'pixmaps')
     
     base_paths.update(dict(\
         basic_search_sequence = [UMIT_DIR, PROGRAM_FILES, HOME, CURRENT_DIR],
         config_search_sequence = [UMIT_DIR, PROGRAM_FILES, HOME, CURRENT_DIR],
         pixmaps_search_sequence = [PIXMAPS_DIR, PROGRAM_FILES,
-                                   os.path.join(CURRENT_DIR, PIXMAPS_DIR),
+                                   os.path.join(CURRENT_DIR, 'share', 'pixmaps'),
                                    HOME],
         i18n_search_sequence = [UMIT_DIR, PROGRAM_FILES,
-                                os.path.join(CURRENT_DIR, LOCALE_DIR), HOME],))
+                                os.path.join(CURRENT_DIR, 'share', 'locale'), HOME],))
 
 elif PLATFORM == 'darwin':
     base_paths.update(dict(user_home = HOME,
