From 25f9df4c845cee5bd9af91b08a4ffe31136cd13e Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 23 Dec 2021 11:58:07 -0800 Subject: [PATCH] Start adding cx_Freeze linux support --- desktop/setup-freeze.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/desktop/setup-freeze.py b/desktop/setup-freeze.py index 0a26620b..5dc1728f 100644 --- a/desktop/setup-freeze.py +++ b/desktop/setup-freeze.py @@ -19,16 +19,17 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ import os +import sys import platform +import shutil import cx_Freeze from cx_Freeze import setup, Executable # There's an obscure cx_Freeze bug that I'm hitting that's preventing the macOS # package from getting built. This is some monkeypatching to fix it. -if platform.system() == "Darwin": +if platform.system() == "Darwin" or platform.system() == "Linux": import importlib_metadata - import shutil import pathlib from pathlib import Path from tempfile import TemporaryDirectory @@ -134,6 +135,15 @@ elif platform.system() == "Darwin": ), ] +elif platform.system() == "Linux": + include_msvcr = False + gui_base = None + exec_icon = None + + if not shutil.which("patchelf"): + print("Install the patchelf package") + sys.exit() + setup( name="onionshare", version=version,