summarylogtreecommitdiffstats
path: root/directories.patch
diff options
context:
space:
mode:
Diffstat (limited to 'directories.patch')
-rwxr-xr-xdirectories.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/directories.patch b/directories.patch
new file mode 100755
index 000000000000..fedb972aa789
--- /dev/null
+++ b/directories.patch
@@ -0,0 +1,81 @@
+# Just hardcoded path for everyday Arch use
+
+--- directories.py.orig 2018-02-14 14:21:29.914005138 -0700
++++ directories.py 2018-02-14 14:24:53.049999361 -0700
+@@ -91,7 +91,7 @@
+ # Linux bundle uses 'sys.frozen'
+ return os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), *args)
+ elif not getattr(sys, 'frozen', False):
+- return os.path.join(os.path.dirname(os.path.abspath(__file__)), *args)
++ return os.path.join(getDataDir(), *args)
+
+ if executable_lookup:
+ return os.path.join(os.path.dirname(sys.executable), *args)
+@@ -127,7 +127,10 @@
+ # dataDir = os.path.dirname(__file__)
+ # """ #
+ # else:
+- dataDir = os.getcwdu()
++ if sys.platform.startswith("linux"):
++ dataDir = "/usr/share/mcedit"
++ else:
++ dataDir = os.getcwdu()
+ if len(path) > 0:
+ return os.path.join(dataDir, path)
+ return dataDir
+
+--- splash.py.orig 2018-02-14 14:43:30.832967572 -0700
++++ splash.py 2018-02-14 14:44:54.798965185 -0700
+@@ -16,7 +16,7 @@
+ no_splash = False
+ #cur_dir = directories.getDataDir()
+ #splash_name = os.path.join(cur_dir, 'splash')
+-splash_name = directories.getDataFile('splash')
++splash_name = os.path.join(directories.getDocumentsFolder(), 'splash')
+ splash = None
+ splash_img_fp = None
+ fp = None
+
+--- albow/resource.py.orig 2018-02-14 14:26:35.612996444 -0700
++++ albow/resource.py 2018-02-14 14:30:55.736989047 -0700
+@@ -1,6 +1,7 @@
+ # -*- coding: utf-8 -*-
+ #-# Modified by D.C.-G. for translation purpose
+ import os
++import sys
+
+ import logging
+ log = logging.getLogger(__name__)
+@@ -155,6 +156,8 @@
+ names.append(fontNm)
+ # print names
+ path = _resource_path("fonts", names, **kwds)
++ if sys.platform.startswith("linux"):
++ path = os.path.join("/usr/share/fonts/TTF", *names)
+ key = (path, size)
+ font = font_cache.get(key)
+ if not font:
+
+--- mcedit.py.orig 2015-08-12 07:12:26.000000000 -0600
++++ mcedit.py 2015-12-24 16:06:54.623474504 -0700
+@@ -38,6 +38,8 @@
+ #
+ if sys.platform == "darwin":
+ logfile = os.path.expanduser("~/Library/Logs/mcedit.log")
++elif sys.platform.startswith("linux"):
++ logfile = os.path.expanduser('~/.mcedit/mcedit.log')
+ else:
+ logfile = os.path.join(os.getcwdu(), logfile)
+ fh = logging.FileHandler(logfile, mode="w")
+
+--- pymclevel/materials.py.orig 2018-02-14 13:58:46.074043924 -0700
++++ pymclevel/materials.py 2018-02-14 14:01:49.687038702 -0700
+@@ -93,7 +93,7 @@
+ self.blockstates = json.load(def_file)
+ else:
+ # In all other cases, retrieve the file directly from the file system.
+- with open(os.path.join("pymclevel", definition_file)) as def_file:
++ with open(os.path.join("/usr/lib/mcedit/pymclevel", definition_file)) as def_file:
+ self.blockstates = json.load(def_file)
+
+ self.material_map[self._mats] = self