I'm using cx_freeze to export a Python program. The exported program was working fine until I tried to add shortcut with icon on the desktop. I've taken the codes from there and there.
When running the main.exe file from its folder in C://Program files, there is no problem, but when I run the shortcut on the desktop there is this error :
The setup.py file :
import sys
from cx_Freeze import setup,Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
includefiles = ['bouton_ajouter_contact.png','bouton_contacts.png','bouton_deconnexion.png',\
'bouton_message.png','bouton_messages.png','bouton_reglages.png','fond_home.png','worldco.png']
includes = []
excludes = []
packages = ['os']
setup(
...
options = {'build_exe': {'includes':includes,'excludes':excludes,'packages':packages,'include_files':includefiles}},
executables = [Executable(
'main.py', base=base,
shortcutName="Messagerie Cryptee", shortcutDir="DesktopFolder",
icon='messagerie_cryptee_ico.ico'
)]
)
All the .png files and the .ico file are in the same folder as the setup.py file, in Python34. Before adding a shortcut, this problem was not there, and I don't remember having changed anything about images. Thanks for help