diff --git a/EDMarketConnector.wxs b/EDMarketConnector.wxs
index 51a3f5dd..1803e57a 100644
--- a/EDMarketConnector.wxs
+++ b/EDMarketConnector.wxs
@@ -120,12 +120,6 @@
-
-
-
-
-
-
@@ -135,60 +129,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -207,9 +165,6 @@
-
-
-
@@ -219,6 +174,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config.py b/config.py
index 1dc2b966..ca3c5060 100644
--- a/config.py
+++ b/config.py
@@ -123,7 +123,7 @@ class Config:
if not isdir(self.plugin_dir):
mkdir(self.plugin_dir)
- self.internal_plugin_dir = getattr(sys, 'frozen', False) and normpath(join(dirname(sys.executable), pardir, 'Resources')) or join(dirname(__file__), 'plugins')
+ self.internal_plugin_dir = getattr(sys, 'frozen', False) and normpath(join(dirname(sys.executable), pardir, 'Library', 'plugins')) or join(dirname(__file__), 'plugins')
self.default_journal_dir = join(NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, True)[0], 'Frontier Developments', 'Elite Dangerous')
@@ -185,7 +185,7 @@ class Config:
if not isdir(self.plugin_dir):
mkdir(self.plugin_dir)
- self.internal_plugin_dir = getattr(sys, 'frozen', False) and dirname(sys.executable) or join(dirname(__file__), 'plugins')
+ self.internal_plugin_dir = join(dirname(getattr(sys, 'frozen', False) and sys.executable or __file__), 'plugins')
# expanduser in Python 2 on Windows doesn't handle non-ASCII - http://bugs.python.org/issue13207
self.home = KnownFolderPath(FOLDERID_Profile) or u'\\'
diff --git a/l10n.py b/l10n.py
index bcc4ed94..c988007f 100755
--- a/l10n.py
+++ b/l10n.py
@@ -129,7 +129,7 @@ class Translations:
if platform=='darwin':
return normpath(join(dirname(sys.executable), os.pardir, 'Resources'))
else:
- return dirname(sys.executable)
+ return join(dirname(sys.executable), 'L10n')
elif __file__:
return join(dirname(__file__), 'L10n')
else:
diff --git a/plug.py b/plug.py
index a4b530ca..d4f6ada6 100644
--- a/plug.py
+++ b/plug.py
@@ -11,7 +11,7 @@ from traceback import print_exc
import Tkinter as tk
import myNotebook as nb
-from config import config, appname
+from config import config
# List of loaded Plugins
@@ -41,7 +41,7 @@ class Plugin(object):
if loadfile:
sys.stdout.write('loading plugin %s from "%s"\n' % (name, loadfile.encode('utf-8')))
with open(loadfile, 'rb') as plugfile:
- module = imp.load_module(name, plugfile, loadfile.encode(sys.getfilesystemencoding()),
+ module = imp.load_module('plugin_%s' % name, plugfile, loadfile.encode(sys.getfilesystemencoding()),
('.py', 'r', imp.PY_SOURCE))
newname = module.plugin_start()
self.name = newname and unicode(newname) or name
@@ -112,7 +112,7 @@ def load_plugins(master):
internal = []
for name in os.listdir(config.internal_plugin_dir):
- if name.endswith('.py') and not name[0] in ['.', '_'] and not name.startswith(appname):
+ if name.endswith('.py') and not name[0] in ['.', '_']:
try:
plugin = Plugin(name[:-3], os.path.join(config.internal_plugin_dir, name))
plugin.folder = None # Suppress listing in Plugins prefs tab
diff --git a/setup.py b/setup.py
index 4d7e9dc3..312895f0 100755
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,7 @@ if sys.platform=='darwin':
'frameworks': [ 'Sparkle.framework' ],
'excludes': [ 'certifi', 'PIL', 'simplejson' ],
'iconfile': '%s.icns' % APPNAME,
- 'extra_scripts': PLUGINS,
+ 'include_plugins': [('plugins', x) for x in PLUGINS],
'resources': ['snd_good.wav', 'snd_bad.wav', 'modules.p', 'ships.p', 'stations.p', 'systems.p'],
'semi_standalone': True,
'site_packages': False,
@@ -108,19 +108,23 @@ elif sys.platform=='win32':
}
import requests
- DATA_FILES = [ ('', [requests.certs.where(),
- 'WinSparkle.dll',
- 'WinSparkle.pdb', # For debugging - don't include in package
- 'snd_good.wav',
- 'snd_bad.wav',
- 'modules.p',
- 'ships.p',
- 'stations.p',
- 'systems.p',
- '%s.VisualElementsManifest.xml' % APPNAME,
- '%s.ico' % APPNAME ] +
- PLUGINS +
- [join('L10n',x) for x in os.listdir('L10n') if x.endswith('.strings')] ) ]
+ DATA_FILES = [
+ ('', [
+ requests.certs.where(),
+ 'WinSparkle.dll',
+ 'WinSparkle.pdb', # For debugging - don't include in package
+ 'snd_good.wav',
+ 'snd_bad.wav',
+ 'modules.p',
+ 'ships.p',
+ 'stations.p',
+ 'systems.p',
+ '%s.VisualElementsManifest.xml' % APPNAME,
+ '%s.ico' % APPNAME
+ ]),
+ ('L10n', [join('L10n',x) for x in os.listdir('L10n') if x.endswith('.strings')]),
+ ('plugins', PLUGINS),
+ ]
setup(
name = APPLONGNAME,