<h1 align=center><font size=-1>Pygame Tutorials</font><br>Windows Executables</h1>
<h2 align=center>by Pete Shinners<br><font size=-1>firstname.lastname@example.org</font></h2>
-<h3 align=center>Revision 1.
0, February 8th, 2001</h3>
+<h3 align=center>Revision 1., February th, 2001</h3>
project_name = "aliens" #name for exe
project_script = "aliens.py" #name of base .PY
+icon_file = "aliens.ico" #name of .ICO
optimize = 2 #0, 1, or 2; like -O and -OO
dos_console = 0 #set to 1 to run in a DOS box
+data_directories = ['data'] #used data directories
extra_modules =  #any extra modules that are missing
Most of the options are pretty self descriptive. When first testing your game,
you'll want to set the <tt>dos_console</tt> value to 1. This will print any
errors into the dos console. When you release your game, you'll want to set it
back to 0, so your game can run without opening a dos prompt.
If you notice your game doesn't run, and get an error about missing modules,
you can add the names of specific missing modules to the list named <tt>
extra_modules</tt>. For example, if your game uses the surfarray module,
<tt>PY2EXE</tt> to detect Numeric as a dependency. You can add the missing Numeric
modules to this list and everything will be ok.
Once you are all setup, simply run this script and it will do all the work.
The final executable and DLLs will be placed inside a project directory, which
will be inside a directory named "<tt>dist</tt>".
You'll notice there aren't any .PY source files in the final directory. That is
because all the needed python source has been compressed as bytecode into the
-From here you will probably need to copy your graphics and sound into the new
-directory with the executable. Once that is done and the game is working, you
-can compress the entire directory into a .ZIP file and send it to all your friends.
-They do not need any versions of python or SDL installed on their machines. Even
-if they have older versions of python </i>(like version 1.5.2)</i>, it will not
-interfere with your game.
+The <tt>icon_file</tt> variable is an optional name of a .ICO file to use
+for the executable. You can leave it empty ("") and it will be ignored.
+The <tt>data_directories</tt> is a list of paths that will be copies into
+the final game directory. Since most games out there will require some
+sort of graphics/sound/font resources, this will help copy them into the
+You'll need to doublecheck that all the game resources and files got copied
+into the final directory in the "dist" folder. Once that is done and the game
+is working, you can compress the entire directory into a .ZIP file and send it
+to all your friends. They do not need any versions of python or SDL installed on
+their machines. Even if they have older versions of python </i>(like version
+1.5.2)</i>, it will not interfere with your game.
<h2>Creating an Actual Installer</h2>