注释
贡献者
|
你好 @MohamadAlsadi, 试试这个: PRGPATH=os.path.abspath(os.path.dirname(__file__))
有了这个 if getattr(sys, 'frozen', False):
# frozen
PRGPATH=os.path.abspath(os.path.dirname(sys.executable))
else:
# unfrozen
PRGPATH=os.path.abspath(os.path.dirname(__file__))
通过这种方式,我可以构建一个非常好的 exe,它看起来可以工作,并且可以添加到发行版中。 这是我的 setup.py import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"]}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "bCNC",
version = "0.1",
description = "Grbl sender and more",
options = {"build_exe": build_exe_options},
executables = [Executable("bCNC.py", base=base)])
然后我运行python setup.py build 让我们了解您的测试。 |
贡献者
|
这里是@MohamadAlsadi, |
作者
|
好的谢谢@effer |


没有提供说明。