summarylogtreecommitdiffstats
path: root/paths-in-opt.patch
blob: c664fb58c4f89e11443f24fc2f4874b80988c2eb (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff --git a/include/ClientGUI.py b/include/ClientGUI.py
index c0825bb..49483a4 100755
--- a/include/ClientGUI.py
+++ b/include/ClientGUI.py
@@ -153,7 +153,7 @@ class FrameGUI( ClientGUITopLevelWindows.FrameThatResizes ):
         aboutinfo.SetVersion( str( HC.SOFTWARE_VERSION ) + ', using network version ' + str( HC.NETWORK_VERSION ) )
         aboutinfo.SetDescription( CC.CLIENT_DESCRIPTION )
         
-        with open( os.path.join( HC.BASE_DIR, 'license.txt' ), 'rb' ) as f: license = f.read()
+        with open( '/usr/share/licenses/hydrus/license.txt', 'rb' ) as f: license = f.read()
         
         aboutinfo.SetLicense( license )
         
@@ -309,7 +309,7 @@ class FrameGUI( ClientGUITopLevelWindows.FrameThatResizes ):
                             server_executable = server_executable.replace( 'pythonw', 'python' )
                             
                         
-                        subprocess.Popen( [ server_executable, os.path.join( HC.BASE_DIR, 'server.py' ) ] )
+                        subprocess.Popen( [ server_executable, '/opt/hydrus/server.py' ] )
                         
                     
                     time_waited = 0
diff --git a/include/HydrusConstants.py b/include/HydrusConstants.py
index 0949f90..0c88472 100755
--- a/include/HydrusConstants.py
+++ b/include/HydrusConstants.py
@@ -3,33 +3,21 @@ import sys
 
 # dirs
 
-BASE_DIR = sys.path[0]
-
-if BASE_DIR == '':
-    
-    BASE_DIR = os.getcwdu()
-    
-else:
-    
-    try:
-        
-        BASE_DIR = BASE_DIR.decode( 'utf-8' )
-        
-    except:
-        
-        pass
-        
-    
-BIN_DIR = os.path.join( BASE_DIR, 'bin' )
+BASE_DIR = os.path.expanduser("~/.local/share/hydrus")
+
+BIN_DIR = "/opt/hydrus/bin"
 DB_DIR = os.path.join( BASE_DIR, 'db' )
 SERVER_FILES_DIR = os.path.join( DB_DIR, 'server_files' )
 CLIENT_UPDATES_DIR = os.path.join( DB_DIR, 'client_updates' )
 SERVER_UPDATES_DIR = os.path.join( DB_DIR, 'server_updates' )
-HELP_DIR = os.path.join( BASE_DIR, 'help' )
+HELP_DIR = "/opt/hydrus/help"
 INCLUDE_DIR = os.path.join( BASE_DIR, 'include' )
-STATIC_DIR = os.path.join( BASE_DIR, 'static' )
+STATIC_DIR = "/opt/hydrus/static"
 
-#
+try:
+    os.makedirs(DB_DIR)
+except os.error:
+    pass
 
 PLATFORM_WINDOWS = False
 PLATFORM_OSX  = False