From 98f76656ecebc4069777f347c92450507792c5d3 Mon Sep 17 00:00:00 2001 From: Junior Date: Thu, 13 Jun 2024 16:35:42 -0400 Subject: [PATCH] Update PyGame readme to include pyinstaller instructions --- PyGame/README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/PyGame/README.md b/PyGame/README.md index 2ff8eb2..1732a73 100644 --- a/PyGame/README.md +++ b/PyGame/README.md @@ -4,9 +4,22 @@ This folder contains simple examples of using PyGame in Python to create simple ## Prerequesits -All of these projects require the PyGame module. +* All of these projects require the PyGame module. +* In order to create stand alone executables the pyinstaller module is required. +* The pillow module may be used by pyinstaller, and is quite the handy image manipulation library. Inside a terminal: +```bash +pip install pygame pyinstaller pillow ``` -pip install pygame -``` \ No newline at end of file + +## PyInstaller + +Any programs set up to be able to use PyInstaller can be built to an EXE file using the provided `.spec` file. **DO NOT** use pyinstaller on a `.py` file directly unless you are creating a new `.spec` file. Doing so will overwrite the existing file. + +Syntax: +```bash +pyinstaller MyFile.spec +``` + +This will create two folders named `Build/` and `Dist/`. The `.EXE` file will be created inside the `Dist/` folder. The executable can be moved anywhere on the system and does not need Python to be installed in order to work. \ No newline at end of file