Reputation: 181
I can't seem to add my icon to the executable. I thought maybe my 256 was too large so I had sized it down to a 64 but that didn't seem to be the problem.
Maybe I'm misunderstanding what icon is? I was hoping that my app.exe in the folder would have the icon.ico picture, instead it has the following:
.
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
executables = [
Executable('SectionAnalysisTool.py',
icon="icon64.ico",
base=base)
]
includefiles = ["icon.ico"]
setup(name='name',
version='0.0',
description='description',
author = "author",
options = {'build_exe': {'include_files':includefiles}},
executables=executables
)
I am using Windows 7, WinPython-64bit-3.4.4.5Qt5 (I did not build the app through Qt), and I am using the cx_Freeze provided by WinPython. If it matters, I made the icon through snagit
Upvotes: 1
Views: 1732
Reputation: 107
It happened to when I changed .png
to .ico
without convertor but by changing extension. When I used a convertor it started to work for me. So try to use a convertor.
Upvotes: 0
Reputation: 29
You are including icon.ico
whereas calling icon file icon64.ico
!
They should be same.
Another thing is that do check whether the image file is actually .ico
file or not. If not, you can convert the image online.
Hope that helps ! :)
Upvotes: 2