When I try to build
my game compiler I get error:
Traceback (most recent call last):
File "gamecomp.py", line 22, in <module>
executables = [exe])
File "C:\Python33\lib\site-packages\cx_Freeze\dist.py", line 365, in setup
distutils.core.setup(**attrs)
File "C:\Python33\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python33\lib\distutils\dist.py", line 929, in run_commands
self.run_command(cmd)
File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
cmd_obj.run()
File "C:\Python33\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 948, in run_command
cmd_obj.run()
File "C:\Python33\lib\site-packages\cx_Freeze\dist.py", line 234, in run
metadata = metadata)
File "C:\Python33\lib\site-packages\cx_Freeze\freezer.py", line 104, in __init
__
self.includeFiles = self._ProcessPathSpecs(includeFiles)
File "C:\Python33\lib\site-packages\cx_Freeze\freezer.py", line 384, in _Proce
ssPathSpecs
raise ConfigError("target path for include file may not be "
cx_Freeze.freezer.ConfigError: target path for include file may not be an absolu
te path
My compiler is:
import sys
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"], "include_files":["C:\Documents and Settings\boot_1.bmp", "C:\Documents and Settings\boot_2.bmp", 'C:\Documents and Settings\boot_3.bmp', 'C:\Documents and Settings\boot_4.bmp', 'C:\Documents and Settings\fish1.bmp', 'C:\Documents and Settings\fish2.bmp', 'C:\Documents and Settings\fish3.bmp', 'C:\Documents and Settings\fish4.bmp', 'C:\Documents and Settings\goldenfish_1.bmp', 'C:\Documents and Settings\goldenfish_2.bmp']}
base = None
if sys.platform == "win32":
base = "Win32GUI"
exe=Executable(
script="game.py",
base=base
)
setup( name = "Game name",
version = "1.0",
description = "My GUI application!",
options = {"build_exe": build_exe_options},
executables = [exe])
If I don't use include_files
I can compile the game without any errors, but others can't play the game.
How can I compile my game without errors / fix errors?
I get it now.
I have to write: "boot_1.bmp"
instead "C:\Documents and Settings\boot_1.bmp"
and so for all other pictures.
I also have to change it in the game code.