aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaptak S <saptak013@gmail.com>2024-02-27 02:17:56 +0530
committerSaptak S <saptak013@gmail.com>2024-02-28 01:51:52 +0530
commitd6d8298bef350e0cf1497f9be4f1cfab36019630 (patch)
tree32b2b221df992f3b76d5339d49cfa401c34f3c45
parent44fcb6cfdb28dbd18e6d13435a695e2bf0b89d17 (diff)
downloadonionshare-d6d8298bef350e0cf1497f9be4f1cfab36019630.tar.gz
onionshare-d6d8298bef350e0cf1497f9be4f1cfab36019630.zip
Adds condition to add zip_packages only in Apple Silicion
-rw-r--r--desktop/setup-freeze.py154
1 files changed, 81 insertions, 73 deletions
diff --git a/desktop/setup-freeze.py b/desktop/setup-freeze.py
index 2c8606dc..d311a942 100644
--- a/desktop/setup-freeze.py
+++ b/desktop/setup-freeze.py
@@ -57,6 +57,86 @@ elif platform.system() == "Linux":
print("Install the patchelf package")
sys.exit()
+
+build_exe_options = {
+ "packages": [
+ "cffi",
+ "engineio",
+ "engineio.async_drivers.gevent",
+ "engineio.async_drivers.gevent_uwsgi",
+ "gevent",
+ "jinja2.ext",
+ "onionshare",
+ "onionshare_cli",
+ "PySide6",
+ "shiboken6",
+ "PySide6.QtCore",
+ "PySide6.QtGui",
+ "PySide6.QtWidgets",
+ ],
+ "excludes": [
+ "test",
+ "tkinter",
+ "PySide6.Qt3DAnimation",
+ "PySide6.Qt3DCore",
+ "PySide6.Qt3DExtras",
+ "PySide6.Qt3DInput",
+ "PySide6.Qt3DLogic",
+ "PySide6.Qt3DRender",
+ "PySide6.QtCharts",
+ "PySide6.QtConcurrent",
+ "PySide6.QtDataVisualization",
+ "PySide6.QtHelp",
+ "PySide6.QtLocation",
+ "PySide6.QtMultimedia",
+ "PySide6.QtMultimediaWidgets",
+ "PySide6.QtNetwork",
+ "PySide6.QtOpenGL",
+ "PySide6.QtOpenGLFunctions",
+ "PySide6.QtPositioning",
+ "PySide6.QtPrintSupport",
+ "PySide6.QtQml",
+ "PySide6.QtQuick",
+ "PySide6.QtQuickControls2",
+ "PySide6.QtQuickWidgets",
+ "PySide6.QtRemoteObjects",
+ "PySide6.QtScript",
+ "PySide6.QtScriptTools",
+ "PySide6.QtScxml",
+ "PySide6.QtSensors",
+ "PySide6.QtSerialPort",
+ "PySide6.QtSql",
+ "PySide6.QtTest",
+ "PySide6.QtTextToSpeech",
+ "PySide6.QtUiTools",
+ "PySide6.QtWebChannel",
+ "PySide6.QtWebEngine",
+ "PySide6.QtWebEngineCore",
+ "PySide6.QtWebEngineWidgets",
+ "PySide6.QtWebSockets",
+ "PySide6.QtXml",
+ "PySide6.QtXmlPatterns",
+ ],
+ "include_files": include_files,
+ "include_msvcr": include_msvcr,
+}
+
+# If Mac Silicon, the dependencies need to be in zip_include_packages
+if platform.system() == "Darwin" and platform.processor() == "arm":
+ build_exe_options["zip_include_packages"] = [
+ "cffi",
+ "engineio",
+ "engineio.async_drivers.gevent",
+ "engineio.async_drivers.gevent_uwsgi",
+ "gevent",
+ "jinja2.ext",
+ "PySide6",
+ "shiboken6",
+ "PySide6.QtCore",
+ "PySide6.QtGui",
+ "PySide6.QtWidgets",
+ ]
+
setup(
name="onionshare",
version=version,
@@ -68,79 +148,7 @@ setup(
),
options={
# build_exe, for Windows and macOS
- "build_exe": {
- "packages": [
- "cffi",
- "engineio",
- "engineio.async_drivers.gevent",
- "engineio.async_drivers.gevent_uwsgi",
- "gevent",
- "jinja2.ext",
- "onionshare",
- "onionshare_cli",
- "PySide6",
- "PySide6.QtCore",
- "PySide6.QtGui",
- "PySide6.QtWidgets",
- ],
- "zip_include_packages": [
- "cffi",
- "engineio",
- "engineio.async_drivers.gevent",
- "engineio.async_drivers.gevent_uwsgi",
- "gevent",
- "jinja2.ext",
- "PySide6",
- "PySide6.QtCore",
- "PySide6.QtGui",
- "PySide6.QtWidgets",
- ],
- "excludes": [
- "test",
- "tkinter",
- "PySide6.Qt3DAnimation",
- "PySide6.Qt3DCore",
- "PySide6.Qt3DExtras",
- "PySide6.Qt3DInput",
- "PySide6.Qt3DLogic",
- "PySide6.Qt3DRender",
- "PySide6.QtCharts",
- "PySide6.QtConcurrent",
- "PySide6.QtDataVisualization",
- "PySide6.QtHelp",
- "PySide6.QtLocation",
- "PySide6.QtMultimedia",
- "PySide6.QtMultimediaWidgets",
- "PySide6.QtNetwork",
- "PySide6.QtOpenGL",
- "PySide6.QtOpenGLFunctions",
- "PySide6.QtPositioning",
- "PySide6.QtPrintSupport",
- "PySide6.QtQml",
- "PySide6.QtQuick",
- "PySide6.QtQuickControls2",
- "PySide6.QtQuickWidgets",
- "PySide6.QtRemoteObjects",
- "PySide6.QtScript",
- "PySide6.QtScriptTools",
- "PySide6.QtScxml",
- "PySide6.QtSensors",
- "PySide6.QtSerialPort",
- "PySide6.QtSql",
- "PySide6.QtTest",
- "PySide6.QtTextToSpeech",
- "PySide6.QtUiTools",
- "PySide6.QtWebChannel",
- "PySide6.QtWebEngine",
- "PySide6.QtWebEngineCore",
- "PySide6.QtWebEngineWidgets",
- "PySide6.QtWebSockets",
- "PySide6.QtXml",
- "PySide6.QtXmlPatterns",
- ],
- "include_files": include_files,
- "include_msvcr": include_msvcr,
- },
+ "build_exe": build_exe_options,
# bdist_mac, making the macOS app bundle
"bdist_mac": {
"iconfile": os.path.join("onionshare", "resources", "onionshare.icns"),