Skip to content

Commit

Permalink
Improve kaleido pyinstaller hook. Fix path to pyside compiler tools o…
Browse files Browse the repository at this point in the history
…n macos.
  • Loading branch information
hsorby committed Apr 7, 2024
1 parent 7f38c40 commit 5670b45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions res/pyinstaller/create_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ def main(variant):

pyside_dir = os.path.dirname(RefMod.__file__)

pyside_resource_tool_dir = ['PySide6']
if platform.system() == 'Darwin':
rcc_exe = os.path.join(pyside_dir, 'Qt', 'libexec', "rcc")
uic_exe = os.path.join(pyside_dir, 'Qt', 'libexec', "uic")

pyside_resource_tool_dir.extend(['Qt', 'libexec'])

macos_icon = os.path.join('..', 'macos', 'MAP-Client.icns')
run_command.append(f'--icon={macos_icon}')

Expand All @@ -63,8 +66,8 @@ def main(variant):
else:
raise NotImplementedError("Platform is not supported for creating a MAP Client application.")

run_command.append(os.pathsep.join([f'--add-binary={rcc_exe}', 'PySide6/']))
run_command.append(os.pathsep.join([f'--add-binary={uic_exe}', 'PySide6/']))
run_command.append(os.pathsep.join([f'--add-binary={rcc_exe}', os.path.join(*pyside_resource_tool_dir, '')]))
run_command.append(os.pathsep.join([f'--add-binary={uic_exe}', os.path.join(*pyside_resource_tool_dir, '')]))

externally_specified_internal_workflows_zip = os.environ.get('INTERNAL_WORKFLOWS_ZIP', '<not-a-file>')
if os.path.isfile(externally_specified_internal_workflows_zip):
Expand Down
3 changes: 3 additions & 0 deletions res/pyinstaller/hooks/hook-kaleido.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

datas = collect_data_files('kaleido')
hiddenimports = collect_submodules('kaleido.scopes')
module_collection_mode = {
'kaleido.scopes': 'py',
}

0 comments on commit 5670b45

Please sign in to comment.