summarylogtreecommitdiffstats
path: root/paths-in-opt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'paths-in-opt.patch')
-rw-r--r--paths-in-opt.patch47
1 files changed, 23 insertions, 24 deletions
diff --git a/paths-in-opt.patch b/paths-in-opt.patch
index 80ad33684de4..72d6fe795fca 100644
--- a/paths-in-opt.patch
+++ b/paths-in-opt.patch
@@ -1,23 +1,10 @@
-diff --git a/hydrus/client/gui/ClientGUI.py b/hydrus/client/gui/ClientGUI.py
-index db9fd6f..c925431 100644
---- a/hydrus/client/gui/ClientGUI.py
-+++ b/hydrus/client/gui/ClientGUI.py
-@@ -792,7 +792,7 @@ class FrameGUI( ClientGUITopLevelWindows.MainFrameThatResizes ):
- python_executable = python_executable.replace( 'pythonw', 'python' )
-
-
-- server_script_path = os.path.join( HC.BASE_DIR, 'server.py' )
-+ server_script_path = '/opt/hydrus/server.py'
-
- cmd = [ python_executable, server_script_path, db_param ]
-
diff --git a/hydrus/core/HydrusConstants.py b/hydrus/core/HydrusConstants.py
-index 857715d..ff6a7ae 100644
+index d59bf1aa..8cbf8fee 100644
--- a/hydrus/core/HydrusConstants.py
+++ b/hydrus/core/HydrusConstants.py
-@@ -5,33 +5,9 @@ import typing
- # old method of getting frozen dir, doesn't work for symlinks looks like:
- # BASE_DIR = getattr( sys, '_MEIPASS', None )
+@@ -11,34 +11,9 @@ import yaml
+ RUNNING_CLIENT = False
+ RUNNING_SERVER = False
-RUNNING_FROM_FROZEN_BUILD = getattr( sys, 'frozen', False )
-
@@ -46,15 +33,16 @@ index 857715d..ff6a7ae 100644
-
- BASE_DIR = os.getcwd()
-
+-
+RUNNING_FROM_FROZEN_BUILD = False
+HYDRUS_MODULE_DIR = '/opt/hydrus/hydrus'
+BASE_DIR = os.path.expanduser("~/.local/share/hydrus")
- PLATFORM_WINDOWS = sys.platform == 'win32'
- PLATFORM_MACOS = sys.platform == 'darwin'
-@@ -41,23 +17,16 @@ PLATFORM_HAIKU = sys.platform == 'haiku1'
- RUNNING_FROM_SOURCE = sys.argv[0].endswith( '.py' ) or sys.argv[0].endswith( '.pyw' )
- RUNNING_FROM_MACOS_APP = os.path.exists( os.path.join( BASE_DIR, 'running_from_app' ) )
+ muh_platform = sys.platform.lower()
+
+@@ -69,34 +44,18 @@ elif RUNNING_FROM_FROZEN_BUILD:
+ elif RUNNING_FROM_MACOS_APP:
+ NICE_RUNNING_AS_STRING = 'from App'
-BIN_DIR = os.path.join( BASE_DIR, 'bin' )
-HELP_DIR = os.path.join( BASE_DIR, 'help' )
@@ -69,14 +57,25 @@ index 857715d..ff6a7ae 100644
-if PLATFORM_MACOS:
-
-- USERPATH_DB_DIR = os.path.join( os.path.expanduser( '~' ), 'Library', 'Hydrus' )
+- desired_userpath_db_dir = os.path.join( '~', 'Library', 'Hydrus' )
-
-else:
-
-- USERPATH_DB_DIR = os.path.join( os.path.expanduser( '~' ), 'Hydrus' )
+- desired_userpath_db_dir = os.path.join( '~', 'Hydrus' )
+-
+-
+-USERPATH_DB_DIR = os.path.expanduser( desired_userpath_db_dir )
+-
+-if USERPATH_DB_DIR == desired_userpath_db_dir:
+-
+- # could not figure it out, probably a crazy user situation atm
+-
+- USERPATH_DB_DIR = None
-
+USERPATH_DB_DIR = DEFAULT_DB_DIR
+ WE_SWITCHED_TO_USERPATH = False
+
-LICENSE_PATH = os.path.join( BASE_DIR, 'license.txt' )
+LICENSE_PATH = "/usr/share/licenses/hydrus/license.txt"