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
82
83
84
85
86
87
88
89
90
91
|
# Just hardcoded path for everyday Arch use
--- directories.py.orig 2015-12-24 14:50:26.516671121 -0700
+++ directories.py 2015-12-24 14:50:43.963338308 -0700
@@ -83,7 +83,10 @@
# '''
#
# 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
--- albow/resource.py.orig 2012-03-15 19:48:27.844000304 +0100
+++ albow/resource.py 2012-03-15 19:52:56.671251316 +0100
@@ -73,6 +73,8 @@
def get_font(size, *names, **kwds):
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")
--- resource_packs.py.orig 2015-08-12 07:12:26.000000000 -0600
+++ resource_packs.py 2015-12-24 21:13:54.257356703 -0700
@@ -537,7 +537,7 @@
def __init__(self):
self.__stop = False
- texture_path = os.path.join(directories.parentDir, "textures", self._pack_name)
+ texture_path = os.path.join(directories.getDocumentsFolder(), "textures", self._pack_name)
self.texture_path = texture_path
self._isEmpty = False
self._too_big = False
@@ -727,7 +727,7 @@
self._pack_name = self._folder.replace(" ", "_")
IResourcePack.__init__(self)
self._full_path = os.path.join(directories.getMinecraftProfileDirectory(directories.getSelectedProfile()), "resourcepacks", self._folder)
- self.texture_path = os.path.join(directories.parentDir, "textures", self._pack_name)
+ self.texture_path = os.path.join(directories.getDocumentsFolder(), "textures", self._pack_name)
if not os.path.exists(self._terrain_path):
self.add_textures()
@@ -837,7 +837,7 @@
if not os.path.exists(pack.terrain_path()):
del terrains[tex]
try:
- shutil.rmtree(os.path.join(directories.parentDir, "textures"))
+ shutil.rmtree(os.path.join(directories.getDocumentsFolder(), "textures"))
except:
print "Could not remove \"textures\" directory"
pass
@@ -851,7 +851,7 @@
def __init__(self):
try:
- os.mkdir(os.path.join(directories.parentDir, "textures"))
+ os.mkdir(os.path.join(directories.getDocumentsFolder(), "textures"))
except OSError:
pass
self._resource_packs = setup_resource_packs()
--- splash.py.orig 2016-01-03 17:30:26.530655811 -0600
+++ splash.py 2016-01-03 17:32:52.887326839 -0600
@@ -26,7 +26,7 @@
screen.blit(splash, (0, 0))
except IOError:
try:
- font = pygame.font.Font(open(os.path.join(cur_dir, 'fonts', 'DejaVuSans-Bold.ttf'), 'rb'), 48)
+ font = pygame.font.Font(open(os.path.join("/usr/share/fonts/TTF", 'DejaVuSans-Bold.ttf'), 'rb'), 48)
buf = font.render("MCEDit is loading...", True, (128, 128, 128))
screen = pygame.display.set_mode((buf.get_width() + 20, buf.get_height() + 20), pygame.NOFRAME)
screen.blit(buf, (10, 10))
|