marblexu/PythonPlantsVsZombies

使用pyinstaller打包后,部分无法运行

callmebg opened this issue · 1 comments

在python3.8.5 pygame 1.9.6环境下,用pyinstaller 4.0 打包成exe后。我把对应的图片和data文件也放到相应位置了。启动界面正常,就是可以正常显示那个带有“冒险模式”的画面,点击屏幕,对应也输出了点击的坐标。但是,点击冒险模式后,冒险模式闪动,之后程序便无响应了。直接退出,屏幕没有报错。网上有人说是字体文件没有,可是我更改代码,放字体文件后,还是一样的情况。
请问有大佬成功打包运行过这个项目吗?

In the environment of python3.8.5 and pyGame 1.9.6, package it into exe with pyinstaller 4.0. I put the corresponding images and data files in the corresponding positions. The startup interface is normal, that is, the screen with "adventure mode" can be displayed normally. If you click on the screen, the corresponding coordinates will be output. However, when you click adventure mode, the adventure mode will flash, and then the program will not respond. Exit directly, no error is reported on the screen. Some people on the Internet say that there is no font file, but after I change the code and put the font file, the situation is still the same.

Excuse me, have anybody ever run this project by exe successfully?

it is my fault