Note: This script was designed to run on Windows 10 or 11 only.
1. Create your environment `python -m venv .venv`\
a. Activate the script on the windows system, using an elevated powershell terminal `Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned`
b. Connect to the environment (windows) `./.venv/Scripts/Activate.ps1`
c. Connect to the environment (mac/liunx) `source ./venv/bin/activate`
2. Install dependencies with `python -m pip install -r "requirements.txt"`
3. Download WKHTML to PDF here: https://wkhtmltopdf.org/
a. Select 7z Archive (ensure you have software to extract the archive)
b. Move the extracted wkhtmltox file into the root directory
4. Run `python chip_payroll.py` to launch
a. After first launch you will need to configure settings[v3].json to point to your database(or set debug to true)
Pyinstaller Compile Command:
`pyinstaller chip_payroll.py --noconsole --hidden-import babel.numbers --hidden-import google --add-data "templates/*;templates" --add-data "wkhtmltox/bin/*;wkhtmltox/bin" --add-data "wkhtmltox/include/*;wkhtmltox/include" --add-data "assets/*;assets`
To use the custom icon you can add the argument `--icon=assets/pyroll_ico.ico`
Onefile is easier to distribute but requires templates, wkhtmltox, and icon assets to be added separately:
`pyinstaller chip_payroll.py --onefile --noconsole --hidden-import babel.numbers --hidden-import google --icon=assets/pyroll_ico.ico `