1
我正在爲我的Python程序創建單個文件exe。我正在使用cx_Freeze。 除了一件煩人的事情之外,一切都很完美。cx_Freeze:shortcutDir給出錯誤
當我安裝我的程序時,所有的事情都會按照它應該做的那樣進行安裝,包括桌面上的快捷方式。
但是...當我想用桌面我得到以下錯誤上的快捷方式啓動程序:
當我試圖從比我的程序文件夾中運行我的程序作品。 當我手動創建到桌面的快捷方式比它的工作。
有誰知道爲什麼在安裝我的程序時安裝的快捷方式不起作用?
My cx_Freeze setup.py
import cx_Freeze
import sys
executables = [cx_Freeze.Executable("Tennis_Calculator.py", base="Win32GUI", icon="tennis_ball.ico", shortcutName="TPC", shortcutDir="DesktopFolder")]
build_exe_options = {"icon": "tennis_ball.ico","packages":["Tkinter", "csv", "ttk"], "include_files":["tennis_ball.ico", "testtennis.csv"]}
build_msi_options = {"include_files":"testtennis.csv"}
cx_Freeze.setup(
name = "Tennis Probability Calculator",
options = {"build_exe":build_exe_options, "build_msi":build_msi_options},
version = "1.0",
author = "WS",
executables = executables
)