How to make web2py Windows & Macintosh binaries with pyinstaller and pywebview. Forked from nicozanf/web2py-pyinstaller. Read your documentation for more details.
- Get a clean Windows 10 (Windows 10 Home 64 bit, under Virtualbox in my case).
- Grab and install the official Python program: I've got version 3.7.4, 64 bit (https://www.python.org/ftp/python/3.7.2/python-3.7.3-amd64.exe ) + select "add Python 3.7 to PATH" during its setup if Python 3.
- Update tools with
python -m pip install --upgrade pip
pip install --upgrade setuptools
- Grab latest web2py source (you need at least 2.18.3 for needed changes in gluon\admin.py). Unzip it in a dedicated folder, in this example
C:\web2py
- so that you haveC:\web2py\web2py.py
inside. - Install PyInstaller with
pip install pyinstaller
- Install requirements with:
pip install -t site-packages cefpython3
pip install -t site-packages pywebview
See HOWTO-modules for more details.
-
(For Windows 7) download and install the free Microsoft Visual C++ Redistributable per Visual Studio 2017, 64 bit version.
-
Copy from this repository
start.py
toC:\web2py\
. -
Copy
build_web2py.py
,web2py.win.spec
andweb2py.win_no_console.spec
from this repository toC:\web2py\
-
Open a CMD and go to
C:\web2py
. Run:
python build_web2py.py`
If everything goes fine, you'll obtain the 64 bit binary build zipped as C:\web2py\web2py_win.zip
.