Skip to content

Building an executable

1n5pire edited this page Nov 4, 2021 · 2 revisions

Build Instructions

  1. Install auto-py-to-exe

    pip install auto-py-to-exe
    
  2. Start auto-py-to-exe in the root folder of this repository:

    auto-py-to-exe -c build_settings.json
    
  3. Because the path to each file is different on every machine and relative file paths do not work, you'll have to manually replace every occurrence of PathTo in input fields to the path of the repo base folder:

    • In Script Location
    • In Additional Files

    E.g. PathTo/main.py => C:/Users/You/planit/main.py

  4. To compile, press CONVERT .PY TO .EXE. The output files are in output/


Some problems we had

One problem is that one of the dependencies, lazy-import, reads its version from a version file when it is imported. But this file is not included in the final executable folder which causes an error to be thrown when it is imported.

Solution: Include the version file in the desired path in the output folder (/lazy_import/VERSION).

Furthermore the resources folder must be included in the final executable folder.

Clone this wiki locally