mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-11 10:55:10 -04:00
Start adding cx_Freeze linux support
This commit is contained in:
parent
f51d3770bc
commit
25f9df4c84
1 changed files with 12 additions and 2 deletions
|
@ -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/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import platform
|
import platform
|
||||||
|
import shutil
|
||||||
import cx_Freeze
|
import cx_Freeze
|
||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
|
|
||||||
# There's an obscure cx_Freeze bug that I'm hitting that's preventing the macOS
|
# 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.
|
# 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 importlib_metadata
|
||||||
import shutil
|
|
||||||
import pathlib
|
import pathlib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tempfile import TemporaryDirectory
|
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(
|
setup(
|
||||||
name="onionshare",
|
name="onionshare",
|
||||||
version=version,
|
version=version,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue