Restore pynavlib path before bundle

CURA-12261
This should allow us not to have to re-sign the file manually
This commit is contained in:
Erwan MATHIEU 2025-02-10 08:56:42 +01:00
parent f23e881478
commit c072c11052

View file

@ -1,5 +1,6 @@
# -*- mode: python ; coding: utf-8 -*-
import os
import subprocess
from pathlib import Path
from PyInstaller.utils.hooks import collect_all
@ -71,6 +72,9 @@ coll = COLLECT(
)
{% if macos == true %}
# Restore the path from embedded pynavlib to system-wide-installed 3DconnexionNavlib
subprocess.run(['install_name_tool', '-change', '@rpath/3DconnexionNavlib', '/Library/Frameworks/3DconnexionNavlib.framework/3DconnexionNavlib', 'dist/UltiMaker Cura.app/Contents/Frameworks/pynavlib/_pynavlib.cpython-312-darwin.so'], check=True)
app = BUNDLE(
coll,
name='{{ display_name }}.app',