mac 下封装 github 上一个项目出错,请教解决方案:

2020-03-01 17:22:40 +08:00
 justincnn
本来自己用不封装也是可以的,无奈 ld 有要求,必须是 app 的,不能是那种难看的终端界面,求解决方案:

github 的地址:
https://github.com/hkslover/ximalaya

一开始无法调用 tk,
google 了下,按如下解决:
and 'Python' not in path_to_tcl
PyInstaller/hooks/hook-_tkinter.py
@@ -, +, @@ def _find_tcl_tk(hook_api):

# _tkinter depends on Tcl/Tk compiled as frameworks.
path_to_tcl = bins[][]
- if 'Library/Frameworks' in path_to_tcl:
+ if 'Library/Frameworks' in path_to_tcl and 'Python' not in path_to_tcl:


这样的话,直接运行.exec 文件是可以运行,但是.app 无法运行。
exec 运行之后显示:

Last login: Sun Mar 1 17:21:23 on ttys001
/Users/justin/Documents/GitHub/ximalaya/dist/main.app/Contents/MacOS/main ; exit;
justin@Justins-IMac ~ % /Users/justin/Documents/GitHub/ximalaya/dist/main.app/Contents/MacOS/main ; exit;




google 了半天实在没办法了,望指导。谢谢

系统:mac os 10.15.3
python version:3.8.1
1476 次点击
所在节点    Python
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/648870

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX