diff --git a/desktop/README.md b/desktop/README.md index 06ca9067..92412146 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -9,7 +9,7 @@ git clone https://github.com/onionshare/onionshare.git cd onionshare/desktop ``` -Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.10.1 [from python.org](https://www.python.org/downloads/release/python-3101/). For Windows, make sure to install the 32-bit (x86) version, and to check the box to add python to the path on the first page of the installer. +Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.9.9 [from python.org](https://www.python.org/downloads/release/python-399/). For Windows, make sure to install the 32-bit (x86) version, and to check the box to add python to the path on the first page of the installer. Make sure you have [poetry installed](https://python-poetry.org/docs/#installation), and then install the dependencies: @@ -51,7 +51,7 @@ poetry run python scripts\get-tor-windows.py ### Compile dependencies -Install Go. The simplest way to make sure everything works is to install Go by following [these instructions](https://golang.org/doc/install). (In Windows, make sure to install the 32-bit version of Go, such as `go1.17.3.windows-386.msi`.) +Install Go. The simplest way to make sure everything works is to install Go by following [these instructions](https://golang.org/doc/install). (In Windows, make sure to install the 32-bit version of Go, such as `go1.17.5.windows-386.msi`.) Download and compile `meek-client`: diff --git a/desktop/package/onionshare-cli.py b/desktop/package/onionshare-cli.py new file mode 100644 index 00000000..3cb03d59 --- /dev/null +++ b/desktop/package/onionshare-cli.py @@ -0,0 +1,3 @@ +import onionshare_cli + +onionshare_cli.main() diff --git a/desktop/package/onionshare.py b/desktop/package/onionshare.py new file mode 100644 index 00000000..f9b7c4c8 --- /dev/null +++ b/desktop/package/onionshare.py @@ -0,0 +1,3 @@ +import onionshare + +onionshare.main() diff --git a/desktop/setup-freeze.py b/desktop/setup-freeze.py new file mode 100644 index 00000000..d05cc18b --- /dev/null +++ b/desktop/setup-freeze.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +OnionShare | https://onionshare.org/ + +Copyright (C) 2014-2021 Micah Lee, et al. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +""" +import os +from cx_Freeze import setup, Executable + +with open(os.path.join("..", "cli", "onionshare_cli", "resources", "version.txt")) as f: + version = f.read().strip() + +setup( + name="onionshare", + version=version, + description="Securely and anonymously share files, host websites, and chat with friends using the Tor network", + options={ + "build_exe": { + "packages": [ + "cffi", # required + "engineio", # required + "engineio.async_drivers.gevent", # required + "engineio.async_drivers.gevent_uwsgi", # required + "eventlet", # required + "eventlet.wsgi", # required + "jinja2.ext", # required + "onionshare", # required + "onionshare_cli", # required + # "engineio.async_drivers.aiohttp", + # "engineio.async_drivers.sanic", + # "engineio.async_drivers.threading", + # "engineio.async_drivers.tornado", + # "engineio.asyncio_client", + # "eventlet.green.OpenSSL.SSL", + # "eventlet.green.OpenSSL.crypto", + # "eventlet.green.OpenSSL.tsafe", + # "eventlet.green.OpenSSL.version", + # "eventlet.green.thread", + # "eventlet.greenio.base", + # "eventlet.hubs.hub", + # "eventlet.hubs.pyevent", + # "eventlet.queue", + # "eventlet.support.pylib", + # "eventlet.support.stacklesspypys", + # "eventlet.support.stacklesss", + # "eventlet.websocket", + # "eventlet.zipkin._thrift.zipkinCore.constants", + # "eventlet.zipkin._thrift.zipkinCore.ttypes", + # "eventlet.zipkin.client", + # "flask.cli", + # "flask.signals", + # "flask_socketio", + # "itsdangerous._json", + # "jinja2._compat", + # "jinja2.utils", + # "requests.compat", + # "requests.packages", + # "requests.utils", + # "six", + # "socketio.asyncio_aiopika_manager", + # "socketio.asyncio_redis_manager", + # "socketio.kafka_manager", + # "socketio.kombu_manager", + # "socketio.msgpack_packet", + # "socketio.redis_manager", + # "urllib.request", + # "urllib3._collections", + # "urllib3.connection", + # "urllib3.connectionpool", + # "urllib3.contrib.pyopenssl", + # "urllib3.exceptions", + # "urllib3.packages.six", + # "urllib3.packages.ssl_match_hostname", + # "urllib3.poolmanager", + # "urllib3.request", + # "urllib3.response", + # "urllib3.util.queue", + # "urllib3.util.request", + # "urllib3.util.response", + # "werkzeug._compat", + # "werkzeug._reloader", + # "werkzeug.debug.tbtools", + # "werkzeug.http", + # "werkzeug.serving", + # "werkzeug.test", + # "werkzeug.utils", + # "werkzeug.wrappers.json", + ], + "excludes": ["test", "tkinter"], + "include_files": [("..\LICENSE", "LICENSE")], + "include_msvcr": True, + } + }, + executables=[ + Executable( + "package/onionshare.py", + # base="Win32GUI", + base=None, + icon=os.path.join("onionshare", "resources", "onionshare.ico"), + ), + Executable( + "package/onionshare-cli.py", + base=None, + icon=os.path.join("onionshare", "resources", "onionshare.ico"), + ), + ], +) diff --git a/desktop/setup.py b/desktop/setup.py index 95cad942..3052e25e 100644 --- a/desktop/setup.py +++ b/desktop/setup.py @@ -1,36 +1,14 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -OnionShare | https://onionshare.org/ - -Copyright (C) 2014-2021 Micah Lee, et al. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -""" import setuptools +import os -version = "2.4" +with open(os.path.join("..", "cli", "onionshare_cli", "resources", "version.txt")) as f: + version = f.read().strip() setuptools.setup( name="onionshare", version=version, - description=( - "OnionShare lets you securely and anonymously send and receive files. It works by starting a web " - "server, making it accessible as a Tor onion service, and generating an unguessable web address so " - "others can download files from you, or upload files to you. It does _not_ require setting up a " - "separate server or using a third party file-sharing service." - ), + description="Securely and anonymously share files, host websites, and chat with friends using the Tor network", author="Micah Lee", author_email="micah@micahflee.com", maintainer="Micah Lee",