Skip to content

Export program as executable file

Corne2Plum3 edited this page Feb 8, 2024 · 7 revisions

Export program as executable file

We will use PyInstaller to export the program. If you don't have this library, install using pip:

pip install pyinstaller

Windows

You must be in a Windows operating system to perform the export to .exe.

Scripted method (v1.3.2+)

The version 1.3.2 adds a python script that does all of the step in the "Manual method below".

  1. Open the terminal where there is main.py and execute.

    python .\build_win_exe.py
    

    (if this is not working try to replace python by python3)

  2. The generated .zip appears on the current working directory.

Manual method

  1. Open the terminal where there is main.py. Then:
    pyinstaller -w main.py
    
  2. In the generated folder dist, you will find a folder called main which contains all files of the program. Rename it with the name of the program and add config.json and nothing2.ogg files here.
  3. Create a empty folder in this folder main and call it output.
  4. Then export the folder main as a .zip file. Now the program can be exported and used by everyone.

Linux

TO DO