Path: blob/master/docker/platerec_installer/build.md
1091 views
1. Get a Windows env
Building the EXE for windows must be done in Windows ENV.
The following steps were done on a 64bit Windows 10 Home Insider Preview Build 21343.rs_prerelease.210320-1757
2. Install Python 3.7.5
The customized version of PyInstaller is incompatible with python3.8 so you need to install Python 3.7.5 donwloadable from this link: https://www.python.org/ftp/python/3.7.5/python-3.7.5-amd64.exe
3. Install Customized PyInstaller
Download the custom PyInstaller from Google Drive: https://drive.google.com/file/d/1lUhvvKAZ7DgMhcWPGFHB4dRH8__LZfjX/view?usp=sharing
Re-build bootloader Install required Build Tools, Install Microsoft Visual Studio Build tools, donwloadable from this link: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
Note: The download option is at the bottom in dropdown. You don't have to install the full IDE
To build Bootloader, chdir into the bootloader folder and run this command:
python ./waf all --target-arch=64bitInstall Custom PyInstaller Chdir into the main folder and run this command:
python ./setup.py install
4. Setup Installer Script
Clone or Download https://github.com/parkpow/deep-license-plate-recognition Install Dependancies system wide by changing dir into the docker folder running this command: python manage.py install -r requirements.txt
5. Update paths in installer spec
The installed Dependancies and other assests will need to be included in the EXE by PyIsntaller. This is done by pointing PyInstaller to the correct location of the dependencies.
Updating these 2 paths in docker/platerec_installer.spec
site_packages - Path to where python installed the packages when you ran
pip installpathex - Path to the location of the installer script
Here is an example diff of making the changes:
6. Build Single file EXE
Chdir into the docker folder and run this command: pyinstaller --onefile platerec_installer.py
This will generate the EXE in the following path deep-license-plate-recognition\docker\dist
7. Code Sign the EXE
Check this Google doc for instructions.