summaryrefslogtreecommitdiff
blob: 130567312b83f10af628e803ea95831916c8ce8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- usr/local/lib/qemulator/qemulator.py.orig	2007-06-03 15:32:03.000000000 +0200
+++ usr/local/lib/qemulator/qemulator.py	2007-06-03 15:49:08.000000000 +0200
@@ -72,21 +72,16 @@
     
 #for param in os.environ.keys():
 #    print "%20s %s" % (param,os.environ[param])
-    
-current_path = os.path.realpath(__file__)
-basedir = os.path.dirname(os.path.realpath(__file__))
-if not os.path.exists(os.path.join(basedir, "main.py")):
-    if os.path.exists(os.path.join(os.getcwd(), "main.py")):
-        basedir = os.getcwd()
-sys.path.insert(0, basedir)
-os.chdir(basedir)  
+_libdir = "@GENTOO_LIBDIR@"
+basedir = "/usr"
+
+
+
 #print "basedir: " + basedir
-basedir = basedir.replace ( '/bin', '' ) 
-basedir = basedir.replace ( '/lib/qemulator', '' ) 
-sys.path.append(basedir)   
+sys.path.append(basedir)
 bindir = basedir + "/bin"
 #print "bindir: " + bindir
-libdir = basedir + "/lib/qemulator"
+libdir = basedir + "/" + _libdir + "/qemulator"
 #print "libdir: " + libdir
 sharedir = basedir + "/share/qemulator"
 #print "sharedir: " + sharedir
@@ -96,7 +91,8 @@
 configdir = homedir + "/config"
 #print "configdir: " + configdir           
 icondirs = [sharedir + "/icons",homedir + "/icons"] 
-
+sys.path.insert(0, libdir)
+os.chdir(libdir)
 ## Import all Qemulator classes 
 import qml_network
 import qml_controlmon