marcelotduarte / cx_Freeze

cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
https://marcelotduarte.github.io/cx_Freeze/
Other
1.34k stars 217 forks source link

In macos. Packaged with [Chinese name.app] cannot run. When it was running, it started and it just exited. #2212

Closed fushun1990 closed 1 week ago

fushun1990 commented 8 months ago

In macos. Packaged with [Chinese name.app] cannot run. When it was running, it started and it just exited.

在macos中。使用【中文名称.app】打包的不能运行。运行的时候时候启动就直接退出了。

Screenshots If applicable, add screenshots to help explain your problem.

https://github.com/marcelotduarte/cx_Freeze/assets/10917744/0a3c2e37-707a-4009-b99a-8b1af19d7ab5 image image

Desktop (please complete the following information): macOS Sonoma 版本14.0 Python 3.10.13 cx-Freeze 6.15.12 PyQt5 5.15.10 PyQt5-Qt5 5.15.12 PyQt5-sip 12.13.0

Additional context

This is sample code from sample/pyqt5

使用的就是sample/pyqt5的示例代码

marcelotduarte commented 8 months ago

Please check if this issue is duplicate of #1228

fushun1990 commented 8 months ago

Please check if this issue is duplicate of #1228 image

No, I use open Hello. The app works 不, 我使用 open 你好.app 可以正常运行

fushun1990 commented 8 months ago

@marcelotduarte

marcelotduarte commented 8 months ago

Let me see if I got it. If you use sample/pyqt5 without modifications, you compile it and can run it. But if you change and use Chinese characters in the name or bundle_name, then you can't execute it?

EDIT: https://github.com/marcelotduarte/cx_Freeze/blob/main/cx_Freeze/hooks/pyqt5/_append_to_init.py#L10

fushun1990 commented 8 months ago

yes

fushun1990 commented 8 months ago

我的需求是,将应用打包为中文名称的app应用。并不一定需要将hello.py文件修改为您好.py

My requirement is to package the application as an app with a Chinese name. It's not necessary to change 'hello.py' to '你好.py'

fushun1990 commented 8 months ago

@marcelotduarte

marcelotduarte commented 4 months ago

Recently when implementing a patch, I had to deal with the utf8 name situation. See if it resolved it for you. I even tested it with Chinese characters here.

You can test the patch in the latest development build: pip install --force --no-cache --pre --extra-index-url https://marcelotduarte.github.io/packages/ cx_Freeze

Please give me feedback.

marcelotduarte commented 4 months ago

Release 7.1.0 is out! Documentation

@fushun1990 Can you test and give me feedback?