aboutsummaryrefslogtreecommitdiff
path: root/desktop/setup-freeze.py
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2021-12-23 11:58:07 -0800
committerMicah Lee <micah@micahflee.com>2021-12-23 11:58:07 -0800
commit159540f06b3cf4697bb7defac5610275aa5618ff (patch)
treeaacb683d28a6c7606e55d883330d7dbd9da1bd40 /desktop/setup-freeze.py
parent8a04472022a7ddc37d40acc2b71247aed08ebc8f (diff)
downloadonionshare-159540f06b3cf4697bb7defac5610275aa5618ff.tar.gz
onionshare-159540f06b3cf4697bb7defac5610275aa5618ff.zip
Start adding cx_Freeze linux support
Diffstat (limited to 'desktop/setup-freeze.py')
-rw-r--r--desktop/setup-freeze.py14
1 files 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 <http://www.gnu.org/licenses/>.
"""
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,