python - How do I include images when using cx_Freeze? -
i can't seem images work when using cx_freeze. tried looking @ answer, found here, got error: cannot find file/directory named documents\images\robot_standing.fw.png
here setup.py file:
from cx_freeze import setup,executable includefiles = ['documents\images\robotstanding_sprite.fw.png', 'documents\images\dirt_block.fw.png','documents\images\grass_block.fw.png','documents\images\spikes.fw.png','documents\images\title_image.fw.png'] includes = [] excludes = [] packages = [] setup( name = 'robot game', version = '0.1', description = 'null', options = {'build_exe': {'excludes':excludes,'packages':packages,'include_files':includefiles}}, executables = [executable('robot game.py')] )
what doing wrong?
i had same problem. solved in 2 steps:
1) used setup.py script based on answer of brian in how use cx_freeze? , ran described aquavitae in same post.
2) copied of image files manually build\exe.win32-3.3 directory executable , other auxiliary files resides.
note: used capital letters in name of source code file because wanted executable have name capitals. worked fine.
Comments
Post a Comment