using-pyinstaller 1.1 KB

1234567891011121314151617181920212223242526272829
  1. Command that works (Linux):
  2. pyinstaller sorter-gui.py --windowed --add-data="settings.ini:." --add-data="checkpoint:checkpoint"
  3. (Windows): Windows uses semicolons; for path separators instead of colons:
  4. pyinstaller sorter-gui.py --windowed --add-data="settings.ini;." --add-data="checkpoint;checkpoint"
  5. --windowed
  6. hides the terminal output window. Output will still show if you run
  7. the exe from the command line.
  8. -F
  9. Converts everything into one exe file, but makes the program take a
  10. long time to load because it has to extract all the files to a
  11. temporary folder. This takes especially long on windows.
  12. --add-data=
  13. Include a file or folder in the output files. The syntax is:
  14. "sourceName:destinationFolder"
  15. So "checkpoint:." would take the files inside the checkpoint folder
  16. and scatter them all into the base directory of the output.
  17. The output will be a folder named sorter-gui in a folder called dist.
  18. To complete the installation, we will need to make a windows script that
  19. makes a link to the executable so that the users do not need to poke
  20. around in the installation folder.