Updated windows pip requirements, and improved build instructions for pyinstaller

This commit is contained in:
Micah Lee 2017-01-08 12:44:27 -08:00
parent 8493a398ef
commit 90a11d730a
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 18 additions and 10 deletions

View File

@ -83,13 +83,12 @@ Now you should have `dist/OnionShare.pkg`.
### Setting up your dev environment ### Setting up your dev environment
Download the latest Python 3.6.x, 32-bit (x86) from https://www.python.org/downloads/. I downloaded `python-3.6.0.exe`. When installing it, make sure to check the "Add Python 3.6 to PATH" checkbox on the first page of the installer. Download the latest Python 3.5.2, 32-bit (x86) from https://www.python.org/downloads/release/python-352/ (note that there's a pyinstaller/pywin32 bug that prevents 3.6.x from working). I downloaded `python-3.5.2.exe`. When installing it, make sure to check the "Add Python 3.5 to PATH" checkbox on the first page of the installer.
Open a command prompt and install dependencies with pip: Open a command prompt, cd to the onionshare folder, and install dependencies with pip:
```cmd ```cmd
pip install -r install\requirements.txt pip3 install -r install\requirements-windows.txt
pip install -r install\requirements-windows.txt
``` ```
Download and install Qt5 from https://www.qt.io/download-open-source/. I downloaded `qt-unified-windows-x86-2.0.4-online.exe`. There's no need to login to a Qt account during installation. Make sure you install the latest Qt 5.x. I installed Qt 5.7. Download and install Qt5 from https://www.qt.io/download-open-source/. I downloaded `qt-unified-windows-x86-2.0.4-online.exe`. There's no need to login to a Qt account during installation. Make sure you install the latest Qt 5.x. I installed Qt 5.7.
@ -105,7 +104,7 @@ If you want to build a .exe:
These instructions include adding folders to the path in Windows. To do this, go to Start and type "advanced system settings", and open "View advanced system settings" in the Control Panel. Click Environment Variables. Under "System variables" double-click on Path. From there you can add and remove folders that are available in the PATH. These instructions include adding folders to the path in Windows. To do this, go to Start and type "advanced system settings", and open "View advanced system settings" in the Control Panel. Click Environment Variables. Under "System variables" double-click on Path. From there you can add and remove folders that are available in the PATH.
Download and install the [Microsoft Visual C++ 2008 Redistributable Package (x86)](http://www.microsoft.com/en-us/download/details.aspx?id=29). Download and install the [Microsoft Visual C++ 2010 Redistributable Package (x86)](https://www.microsoft.com/en-us/download/details.aspx?id=5555).
If you want to build the installer: If you want to build the installer:
@ -116,17 +115,15 @@ If you want to sign binaries with Authenticode:
* You'll need a code signing certificate. I roughly followed [this guide](http://blog.assarbad.net/20110513/startssl-code-signing-certificate/) to make one using my StartSSL account. * You'll need a code signing certificate. I roughly followed [this guide](http://blog.assarbad.net/20110513/startssl-code-signing-certificate/) to make one using my StartSSL account.
* Once you get a code signing key and certificate and covert it to a pfx file, import it into your certificate store. * Once you get a code signing key and certificate and covert it to a pfx file, import it into your certificate store.
* Windows 7:
* Go to http://msdn.microsoft.com/en-us/vstudio/aa496123 and install the latest .NET Framework. I installed `.NET Framework 4.6`.
* Go to http://www.microsoft.com/en-us/download/confirmation.aspx?id=8279 and install the Windows SDK.
* Add `C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin` to the path.
* Windows 10: * Windows 10:
* Go to https://dev.windows.com/en-us/downloads/windows-10-sdk and install the standalone Windows 10 SDK. Note that you may not need this if you already have Visual Studio. * Go to https://dev.windows.com/en-us/downloads/windows-10-sdk and install the standalone Windows 10 SDK. Note that you may not need this if you already have Visual Studio.
* Add `C:\Program Files (x86)\Windows Kits\10\bin\x86` to the path. * Add `C:\Program Files (x86)\Windows Kits\10\bin\x86` to the path.
### To make a .exe: ### To make a .exe:
* Open a command prompt, cd into the onionshare directory, and type: `python setup.py build`. `onionshare.exe`, `onionshare-gui.exe`, and all of their supporting files will get created inside the `build\exe.win32-3.5` folder. For PyInstaller to work, you might need to edit `Scripts\pyinstaller-script.py` in your Python 3.5 folder, to work around [this bug](https://stackoverflow.com/questions/31808180/installing-pyinstaller-via-pip-leads-to-failed-to-create-process) in pip.
* Open a command prompt, cd into the onionshare directory, and type: `pyinstaller install\pyinstaller.spec`. `onionshare.exe`, `onionshare-gui.exe`, and all of their supporting files will get created inside the `build` folder.
### To build the installer: ### To build the installer:

View File

@ -1,2 +1,13 @@
click==6.7
Flask==0.12
future==0.16.0
itsdangerous==0.24
Jinja2==2.9.2
MarkupSafe==0.23
pefile==2016.3.28
PyInstaller==3.2
pypiwin32==219
PyQt5==5.7.1 PyQt5==5.7.1
sip==4.19 sip==4.19
stem==1.5.4
Werkzeug==0.11.15