mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-25 15:29:42 -05:00
Building a .exe now successfully works (#35)
This commit is contained in:
parent
a05efed7f9
commit
7d537cde6f
14
BUILD.md
14
BUILD.md
@ -46,5 +46,17 @@ Now you should have `dist/OnionShare.app`.
|
|||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
*Coming soon.*
|
The first time you're setting up your dev environment:
|
||||||
|
|
||||||
|
* Download and install the latest python 2.7 from https://www.python.org/downloads/ -- make sure you install the 32-bit version.
|
||||||
|
* Right click on Computer, go to Properties. Click "Advanced system settings". Click Environment Variables. Under "System variables" double-click on Path to edit it. Add `;C:\Python27;C:\Python27\Scripts` to the end. Now you can just type `python` to run python scripts in the command prompt.
|
||||||
|
* Go to https://pip.pypa.io/en/latest/installing.html. Right-click on `get-pip.py` and Save Link As, and save it to your home folder.
|
||||||
|
* Open `cmd.exe` as an administrator. Type: `python get-pip.py`. Now you can use `pip` to install packages.
|
||||||
|
* Go to http://www.riverbankcomputing.com/software/pyqt/download and download the latest PyQt4 for Windows for python 2.7, 32-bit (I downloaded `PyQt4-4.11-gpl-Py2.7-Qt4.8.6-x32.exe`), then install it.
|
||||||
|
* Go to http://www.py2exe.org/ and download the latest py2exe for python 2.7, 32-bit (I downloaded `py2exe-0.6.9.win32-py2.7.exe`), then install it.
|
||||||
|
* Open a command prompt and type: `pip install flask stem`
|
||||||
|
* Go to `C:\Python27\Lib\site-packages\flask\` and delete the folder `testsuite`. This is necessary to work around a py2exe bug.
|
||||||
|
|
||||||
|
To make an exe:
|
||||||
|
|
||||||
|
* Open a command prompt, cd to the onionshare folder, and type: `python setup.py py2exe`. This will create a ton of files in `dist`, including `onionshare.exe`.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
import threading, json, os, time, platform
|
import threading, json, os, time, platform, sys
|
||||||
|
|
||||||
onionshare = None
|
onionshare = None
|
||||||
onionshare_port = None
|
onionshare_port = None
|
||||||
|
17
setup.py
17
setup.py
@ -38,7 +38,22 @@ if platform.system() == 'Darwin':
|
|||||||
args['setup_requires'] = 'py2app'
|
args['setup_requires'] = 'py2app'
|
||||||
|
|
||||||
elif platform.system() == 'Windows':
|
elif platform.system() == 'Windows':
|
||||||
pass
|
import py2exe
|
||||||
|
args['windows'] = [{'script':'setup/onionshare-launcher.py'}]
|
||||||
|
args['data_files'] = [
|
||||||
|
('', ['LICENSE', 'README.md', 'version']),
|
||||||
|
('onionshare', ['onionshare/index.html', 'onionshare/404.html', 'onionshare/strings.json']),
|
||||||
|
('onionshare_gui/templates', glob('onionshare_gui/templates/*')),
|
||||||
|
('onionshare_gui/static', glob('onionshare_gui/static/*'))
|
||||||
|
]
|
||||||
|
args['options'] = {
|
||||||
|
'py2exe': {
|
||||||
|
'includes': ['sip', 'PyQt4', 'PyQt4.QtNetwork'],
|
||||||
|
'dll_excludes': ['MSVCP90.dll'],
|
||||||
|
'packages': ['jinja2', 'flask', 'stem'],
|
||||||
|
'skip_archive': True
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
args['packages'] = ['onionshare', 'onionshare_gui']
|
args['packages'] = ['onionshare', 'onionshare_gui']
|
||||||
|
Loading…
Reference in New Issue
Block a user