mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-17 02:59:25 -04:00
Various fixes for MacOS build
This commit is contained in:
parent
96b838ec3e
commit
e76511aaa9
4 changed files with 21 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
import os
|
||||
import inspect
|
||||
import click
|
||||
import platform
|
||||
import subprocess
|
||||
import shutil
|
||||
import glob
|
||||
|
@ -16,7 +17,7 @@ root = os.path.dirname(
|
|||
)
|
||||
desktop_dir = os.path.join(root, "desktop")
|
||||
|
||||
identity_name_application = "Developer ID Application: Micah Lee (N9B95FDWH4)"
|
||||
identity_name_application = "Developer ID Application: Science & Design, Inc. (7WLJ4UBL5L)"
|
||||
entitlements_plist_path = f"{desktop_dir}/package/Entitlements.plist"
|
||||
|
||||
|
||||
|
@ -122,7 +123,6 @@ def cleanup_build():
|
|||
"QtQuickShapes",
|
||||
"QtQuickTest",
|
||||
"QtNetwork",
|
||||
"QtSvg",
|
||||
"QtDesignerComponents",
|
||||
"QtMultimediaWidgets",
|
||||
"QtQmlModels",
|
||||
|
@ -228,6 +228,18 @@ def cleanup_build():
|
|||
else:
|
||||
print(f"Cannot delete, filename not found: {filename}")
|
||||
|
||||
# Set a symlink for Qt's platforms and imageformats plugins, which seems to be necessary only on arm
|
||||
if platform.system() == "Darwin" and platform.processor() == "arm":
|
||||
platforms_target_path = os.path.join("..", "Resources", "lib", "PySide6", "Qt", "plugins", "platforms")
|
||||
platforms_symlink_path = os.path.join(app_path, "Contents", "MacOS", "platforms")
|
||||
|
||||
os.symlink(platforms_target_path, platforms_symlink_path)
|
||||
|
||||
imageformats_target_path = os.path.join("..", "Resources", "lib", "PySide6", "Qt", "plugins", "imageformats")
|
||||
imageformats_symlink_path = os.path.join(app_path, "Contents", "MacOS", "imageformats")
|
||||
os.symlink(imageformats_target_path, imageformats_symlink_path)
|
||||
|
||||
|
||||
after_size = get_size(f"{app_path}")
|
||||
freed_bytes = before_size - after_size
|
||||
freed_mb = int(freed_bytes / 1024 / 1024)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue