Merge pull request #34 from axu2/exe
Add install/exe build instructions
This commit is contained in:
commit
c57901ce67
5
.gitignore
vendored
5
.gitignore
vendored
@ -32,4 +32,7 @@ Icon
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
.apdisk
|
||||
|
||||
venv
|
||||
mangle.spec
|
||||
|
52
INSTALL.md
Normal file
52
INSTALL.md
Normal file
@ -0,0 +1,52 @@
|
||||
# Install Instructions
|
||||
|
||||
For local development / building stand-alone binaries.
|
||||
|
||||
You need [Python 2.7](https://www.python.org/downloads/release/python-2718/).
|
||||
|
||||
If you are using Windows download the
|
||||
`Windows x86 MSI installer`
|
||||
because 32 bit Python is needed to create
|
||||
a Windows executable with `py2exe`.
|
||||
The performance increase from 64 bit is negligible.
|
||||
|
||||
Be sure to add `python` to `PATH` during installation.
|
||||
|
||||
Install [virtualenv](https://virtualenv.pypa.io/en/stable/)
|
||||
globally, if you don't already have it.
|
||||
|
||||
```
|
||||
> pip install virtualenv
|
||||
```
|
||||
|
||||
and install all dependencies in a venv in the mangle directory, e.g.
|
||||
|
||||
```
|
||||
...\mangle> virtualenv venv
|
||||
> venv\Scripts\activate
|
||||
(venv) > pip install -r requirements.txt
|
||||
```
|
||||
|
||||
You can run the app via
|
||||
|
||||
```
|
||||
(venv) > python mangle.pyw
|
||||
```
|
||||
|
||||
Optionally, you can install all the dependencies globally
|
||||
so you can simply click on the `mangle.pyw` file to run it.
|
||||
|
||||
# Building an Executable (Windows)
|
||||
|
||||
To actually build a stand-alone `.exe`, install
|
||||
|
||||
[Microsoft Visual C++ Compiler for Python 2.7](https://www.microsoft.com/en-us/download/details.aspx?id=44266)
|
||||
|
||||
A standalone binary can be created in the `dist` folder via
|
||||
|
||||
```
|
||||
(venv) > python setup.py install
|
||||
```
|
||||
|
||||
You may get an error which can be solved by looking at
|
||||
https://stackoverflow.com/questions/38444230/error-converting-gui-to-standalone-executable-using-py2exe
|
@ -78,3 +78,5 @@ from source.
|
||||
|
||||
* [mangle\_win.zip](https://foosoft.net/projects/mangle/dl/mangle_win.zip)
|
||||
* [mangle\_osx.zip](https://foosoft.net/projects/mangle/dl/mangle_osx.zip) (quite old)
|
||||
|
||||
Check [INSTALL.md](INSTALL.md) for build instructions.
|
||||
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Pillow==6.2.2
|
||||
py2exe-py2==0.6.9; platform_system=='Windows'
|
||||
PyQt4 @ https://download.lfd.uci.edu/pythonlibs/w4tscw6k/cp27/PyQt4-4.11.4-cp27-cp27m-win32.whl; platform_system=='Windows'
|
||||
reportlab==3.5.59
|
4
setup.py
4
setup.py
@ -43,8 +43,8 @@ setup(
|
||||
options={'py2exe': {
|
||||
'bundle_files': 1,
|
||||
'includes': ['sip'],
|
||||
'packages': ['reportlab.pdfbase'],
|
||||
'dll_excludes': ['w9xpopen.exe']
|
||||
'packages': ['reportlab.pdfbase', 'reportlab.rl_settings'],
|
||||
'dll_excludes': ['MSVCP90.dll', 'w9xpopen.exe']
|
||||
}},
|
||||
zipfile=None
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user