Vertana 0 Newbie Poster

I'm trying to turn my PyQt4 into a .exe in order to give it my end users. I'm so-so familiar with cx-freeze and I know how to use Innosetup. My problem is that when run from the command line my Qt application uses the icon correctly. After I freeze the package, the executable itself has the correct icon, however, once in the actual application... no icon in the top left corner. It's really bugging me because as far as I can tell me setup script is fine. I think I have to declare the icon specifically via the command line at setup run time, but when I tried it gave me the message that --icon must not have an argument.

Any help would be appreciated.
The setup script is:

from cx_Freeze import setup, Executable

import sys
include_files = [("icons","icons")]


Target_1 = Executable(
    # what to build
    script = "Launcher.py",
    initScript = None,
    base = 'Win32GUI',
    targetName = "Application.exe",
    compress = True,
    copyDependentFiles = False,
    appendScriptToExe = False,
    appendScriptToLibrary = False,
    icon = "resources\icon.ico"
    )
setup(
        name = "PPT Photo Exporter",
        version = "0.1",
        description = "Exports Photos From a PPT to PNG.",
        author = "author",

    options = {"build_exe": {"include_files":include_files}
               },

    executables = [Target_1]
    )

I'm calling it from the command line like:

python setup.py build_exe --icon

The icon I am attempting to use is in (in relation to the .py files) ./icons/icon.ico

I'm not sure how I can make Qt see the icon once it's packaged by cx-freeze.
My line of code that actually uses the icon (which works before it is frozen):

self.setWindowIcon(QtGui.QIcon('reources/icon.ico'))
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.