mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-05-08 01:39:50 +00:00
Fixed Windows packaging
This commit is contained in:
parent
6ce0f66601
commit
c6ea1c62d4
13
package.py
13
package.py
@ -18,7 +18,7 @@ import glob
|
|||||||
from hscommon.plat import ISWINDOWS, ISLINUX
|
from hscommon.plat import ISWINDOWS, ISLINUX
|
||||||
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, build_debian_changelog,
|
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, build_debian_changelog,
|
||||||
copy_qt_plugins, get_module_version, filereplace, copy, setup_package_argparser,
|
copy_qt_plugins, get_module_version, filereplace, copy, setup_package_argparser,
|
||||||
package_cocoa_app_in_dmg, copy_all)
|
package_cocoa_app_in_dmg, copy_all, find_in_path)
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
@ -38,6 +38,7 @@ def package_windows(edition, dev):
|
|||||||
print("Qt packaging only works under Windows.")
|
print("Qt packaging only works under Windows.")
|
||||||
return
|
return
|
||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
|
from PyQt5.QtCore import QLibraryInfo
|
||||||
add_to_pythonpath('.')
|
add_to_pythonpath('.')
|
||||||
app_version = get_module_version('core_{}'.format(edition))
|
app_version = get_module_version('core_{}'.format(edition))
|
||||||
distdir = 'dist'
|
distdir = 'dist'
|
||||||
@ -80,13 +81,15 @@ def package_windows(edition, dev):
|
|||||||
executables=executables
|
executables=executables
|
||||||
)
|
)
|
||||||
|
|
||||||
print("Removing useless DLLs")
|
print("Removing useless files")
|
||||||
# Huge useless dll that appeared with Qt5
|
|
||||||
for fn in glob.glob(op.join(distdir, 'icu*.dll')):
|
|
||||||
os.remove(fn)
|
|
||||||
# Debug info that cx_freeze brings in.
|
# Debug info that cx_freeze brings in.
|
||||||
for fn in glob.glob(op.join(distdir, '*', '*.pdb')):
|
for fn in glob.glob(op.join(distdir, '*', '*.pdb')):
|
||||||
os.remove(fn)
|
os.remove(fn)
|
||||||
|
print("Copying forgotten DLLs")
|
||||||
|
qtlibpath = QLibraryInfo.location(QLibraryInfo.LibrariesPath)
|
||||||
|
shutil.copy(op.join(qtlibpath, 'libEGL.dll'), distdir)
|
||||||
|
shutil.copy(find_in_path('msvcp110.dll'), distdir)
|
||||||
|
print("Copying the rest")
|
||||||
help_path = op.join('build', 'help')
|
help_path = op.join('build', 'help')
|
||||||
print("Copying {} to dist\\help".format(help_path))
|
print("Copying {} to dist\\help".format(help_path))
|
||||||
shutil.copytree(help_path, op.join(distdir, 'help'))
|
shutil.copytree(help_path, op.join(distdir, 'help'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user