mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-26 11:18:20 +00:00
Change windows packager to download and install latest plugins
This commit is contained in:
19
setup.py
19
setup.py
@@ -419,7 +419,7 @@ try:
|
||||
# cannot use super() with old-style parent class
|
||||
babel.extract_messages.initialize_options(self)
|
||||
self.output_file = 'po/picard.pot'
|
||||
self.input_dirs = 'picard'
|
||||
self.input_dirs = 'contrib, picard'
|
||||
if self.input_dirs and input_dirs_workaround:
|
||||
self._input_dirs = self.input_dirs
|
||||
|
||||
@@ -665,6 +665,22 @@ def generate_file(infilename, outfilename, variables):
|
||||
f_out.write(f_in.read() % variables)
|
||||
|
||||
|
||||
def contrib_plugin_files():
|
||||
plugin_files = {}
|
||||
dist_root = os.path.join("contrib", "plugins")
|
||||
for root, dirs, files in os.walk(dist_root):
|
||||
file_root = os.path.join('plugins', os.path.relpath(root, dist_root)) \
|
||||
if root != dist_root else 'plugins'
|
||||
for file in files:
|
||||
if file.endswith(".py"):
|
||||
if file_root in plugin_files:
|
||||
plugin_files[file_root].append(os.path.join(root, file))
|
||||
else:
|
||||
plugin_files[file_root] = [os.path.join(root, file)]
|
||||
data_files = [(x, sorted(y)) for x, y in plugin_files.iteritems()]
|
||||
return sorted(data_files, key=lambda x: x[0])
|
||||
|
||||
|
||||
try:
|
||||
from py2exe.build_exe import py2exe
|
||||
|
||||
@@ -684,6 +700,7 @@ try:
|
||||
find_file_in_path("PyQt4/plugins/imageformats/qtiff4.dll")]))
|
||||
self.distribution.data_files.append(
|
||||
("accessible", [find_file_in_path("PyQt4/plugins/accessible/qtaccessiblewidgets4.dll")]))
|
||||
self.distribution.data_files += contrib_plugin_files()
|
||||
|
||||
py2exe.run(self)
|
||||
print("*** creating the NSIS setup script ***")
|
||||
|
||||
Reference in New Issue
Block a user