Fix: Use proper entitlements for thumbnailer #10
@ -129,7 +129,7 @@ def pack_mac(builder: worker.blender.CodeBuilder) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Sign
|
# Sign
|
||||||
worker.blender.sign.sign_darwin_files(builder, [package_file_path])
|
worker.blender.sign.sign_darwin_files(builder, [package_file_path], "entitlements.plist")
|
||||||
|
|
||||||
# Notarize
|
# Notarize
|
||||||
worker_config = builder.get_worker_config()
|
worker_config = builder.get_worker_config()
|
||||||
|
@ -95,9 +95,12 @@ def sign_windows(service_env_id: str, install_path: pathlib.Path) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def sign_darwin_files(
|
def sign_darwin_files(
|
||||||
builder: worker.blender.CodeBuilder, file_paths: Sequence[pathlib.Path]
|
builder: worker.blender.CodeBuilder,
|
||||||
|
file_paths: Sequence[pathlib.Path],
|
||||||
|
entitlements_file_name: str
|
||||||
) -> None:
|
) -> None:
|
||||||
entitlements_path = builder.code_path / "release" / "darwin" / "entitlements.plist"
|
entitlements_path = builder.code_path / "release" / "darwin" / entitlements_file_name
|
||||||
|
|
||||||
if not entitlements_path.exists():
|
if not entitlements_path.exists():
|
||||||
raise Exception(f"File {entitlements_path} not found, aborting")
|
raise Exception(f"File {entitlements_path} not found, aborting")
|
||||||
|
|
||||||
@ -157,17 +160,14 @@ def sign_darwin(builder: worker.blender.CodeBuilder) -> None:
|
|||||||
# Executables
|
# Executables
|
||||||
sign_path = bundle_path / "Contents" / "MacOS"
|
sign_path = bundle_path / "Contents" / "MacOS"
|
||||||
worker.utils.info(f"Collecting files to process in {sign_path}")
|
worker.utils.info(f"Collecting files to process in {sign_path}")
|
||||||
sign_darwin_files(builder, list(sign_path.rglob("*")))
|
sign_darwin_files(builder, list(sign_path.rglob("*")), "entitlements.plist")
|
||||||
|
|
||||||
# App extensions in plugins.
|
# Thumbnailer app extension.
|
||||||
plugins_path = bundle_path / "Contents" / "PlugIns"
|
thumbnailer_appex_path = bundle_path / "Contents" / "PlugIns" / "blender-thumbnailer.appex"
|
||||||
if plugins_path.exists():
|
if thumbnailer_appex_path.exists():
|
||||||
for appex_path in plugins_path.iterdir():
|
sign_path = thumbnailer_appex_path / "Contents" / "MacOS"
|
||||||
if not appex_path.is_dir():
|
|
||||||
continue
|
|
||||||
sign_path = appex_path / "Contents" / "MacOS"
|
|
||||||
worker.utils.info(f"Collecting files to process in {sign_path}")
|
worker.utils.info(f"Collecting files to process in {sign_path}")
|
||||||
sign_darwin_files(builder, list(sign_path.rglob("*")))
|
sign_darwin_files(builder, list(sign_path.rglob("*")), "thumbnailer_entitlements.plist")
|
||||||
|
|
||||||
# Shared librarys and Python
|
# Shared librarys and Python
|
||||||
sign_path = bundle_path / "Contents" / "Resources"
|
sign_path = bundle_path / "Contents" / "Resources"
|
||||||
@ -177,11 +177,11 @@ def sign_darwin(builder: worker.blender.CodeBuilder) -> None:
|
|||||||
| set(sign_path.rglob("*.so"))
|
| set(sign_path.rglob("*.so"))
|
||||||
| set(sign_path.rglob("python3.*"))
|
| set(sign_path.rglob("python3.*"))
|
||||||
)
|
)
|
||||||
sign_darwin_files(builder, file_paths)
|
sign_darwin_files(builder, file_paths, "entitlements.plist")
|
||||||
|
|
||||||
# Bundle
|
# Bundle
|
||||||
worker.utils.info(f"Signing app bundle {bundle_path}")
|
worker.utils.info(f"Signing app bundle {bundle_path}")
|
||||||
sign_darwin_files(builder, [bundle_path])
|
sign_darwin_files(builder, [bundle_path], "entitlements.plist")
|
||||||
|
|
||||||
|
|
||||||
def sign(builder: worker.blender.CodeBuilder) -> None:
|
def sign(builder: worker.blender.CodeBuilder) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user