summarylogtreecommitdiffstats
path: root/paths-in-opt.patch
diff options
context:
space:
mode:
authorScore_Under2023-04-27 04:06:41 +0100
committerScore_Under2023-04-27 04:06:41 +0100
commit819138f168e95c6cf7d5c7672db44ace15c23072 (patch)
tree400630c162fe65ebe18846a69a38a6424fbe1e85 /paths-in-opt.patch
parente8e870e6f2b0fa3d728f3b33a731051d9438e35f (diff)
downloadaur-hydrus-git.tar.gz
Update for v525a
Diffstat (limited to 'paths-in-opt.patch')
-rw-r--r--paths-in-opt.patch39
1 files changed, 20 insertions, 19 deletions
diff --git a/paths-in-opt.patch b/paths-in-opt.patch
index 64ec3007c32a..273fe4c68ddc 100644
--- a/paths-in-opt.patch
+++ b/paths-in-opt.patch
@@ -1,23 +1,23 @@
diff --git a/hydrus/client/gui/ClientGUI.py b/hydrus/client/gui/ClientGUI.py
-index 418c93e..91e2683 100644
+index 8ed3a258..a63c53ac 100644
--- a/hydrus/client/gui/ClientGUI.py
+++ b/hydrus/client/gui/ClientGUI.py
-@@ -4133,7 +4133,7 @@ class FrameGUI( ClientGUITopLevelWindows.MainFrameThatResizes ):
- python_executable = python_executable.replace( 'pythonw', 'python' )
+@@ -6153,7 +6153,7 @@ class FrameGUI( CAC.ApplicationCommandProcessorMixin, ClientGUITopLevelWindows.M
+ 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 ]
-
-- 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 db6a88b..49e5fdb 100644
+index b38f7432..4d71fbd9 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 +46,16 @@ index db6a88b..49e5fdb 100644
-
- BASE_DIR = os.getcwd()
-
+-
+RUNNING_FROM_FROZEN_BUILD = False
+HYDRUS_MODULE_DIR = '/opt/hydrus/hydrus'
+BASE_DIR = os.path.expanduser("~/.local/share/hydrus")
muh_platform = sys.platform.lower()
-@@ -43,32 +19,16 @@ PLATFORM_HAIKU = muh_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' ) )
+@@ -66,32 +41,16 @@ 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' )
@@ -75,7 +76,8 @@ index db6a88b..49e5fdb 100644
-
- desired_userpath_db_dir = os.path.join( '~', 'Hydrus' )
-
--
++USERPATH_DB_DIR = DEFAULT_DB_DIR
+
-USERPATH_DB_DIR = os.path.expanduser( desired_userpath_db_dir )
-
-if USERPATH_DB_DIR == desired_userpath_db_dir:
@@ -84,8 +86,7 @@ index db6a88b..49e5fdb 100644
-
- USERPATH_DB_DIR = None
-
-+USERPATH_DB_DIR = DEFAULT_DB_DIR
-
+-
-LICENSE_PATH = os.path.join( BASE_DIR, 'license.txt' )
+LICENSE_PATH = "/usr/share/licenses/hydrus/license.txt"