我有3个python脚本和许多图像的文件夹和tmx文件,我想让它作为一个单一的。我无法找到如何将多个python脚本和文件夹转换为单个exe。我只能够找到cxfreeze和类似的东西为一个单一的python脚本。请大家帮忙。
先谢谢你了。
你可以添加外部文件到你的pyinstaller exe中,通过使用 add-data
. 我在我的一个pygame游戏中使用的一个例子。
pyinstaller --onedir --clean --name "MyGame" --icon="images/icon.ico" --add-data "images/*.png:images" --add-data "sounds/*.mp3:sounds" --add-data "sounds/*.wav:sounds" --add-data "fonts/*.ttf:fonts" main.py