summarylogtreecommitdiffstats
path: root/directories.patch
blob: fedb972aa7891079858348a15ec663f21ee71746 (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
70
71
72
73
74
75
76
77
78
79
80
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