Ok I was able to work around the issue by manually editing the "WkDir" field in 
the .msi shortcut table to TARGETDIR.

Also, thanks for building a relatively easy to use packager. Its been very 
useful so far.

Aaron



________________________________
 From: Aaron Elder <[email protected]>
To: Anthony Tuininga <[email protected]> 
Sent: Monday, February 13, 2012 5:20 PM
Subject: Re: [cx-freeze-users] bdist_msi breaks pyqt4 window icons, build does 
not break window icons
 

If I install the .msi and start the app directly from the program folder the 
window icon works ok. If I start through the start menu shortcut, the window 
icon does not display. 

Apparently starting the app from the start menu shortcut that was defined here:

GUI2Exe_Target_1 = Executable(

    shortcutName = "App",
    shortcutDir = "ProgramMenuFolder"
    )


Is causing the working directory to default to the user's home directory, 
instead of the app's installed directory. What is the recommended fix for this?



________________________________
 From: Anthony Tuininga <[email protected]>
To: Aaron Elder <[email protected]>; primary discussion list for use and 
development of cx_Freeze <[email protected]> 
Sent: Saturday, February 11, 2012 5:14 PM
Subject: Re: [cx-freeze-users] bdist_msi breaks pyqt4 window icons, build does 
not break window icons
 
Hi,

Use InstEdit (or an equivalent MSI editor) to see what files are
missing. Compare that with your build directory and report back. If
that doesn't help, please generate a small script that demonstrates
the problem so I can build it myself and see if I get the same results
as you. Thanks.

Anthony

On Sat, Feb 11, 2012 at 10:33 AM, Aaron Elder <[email protected]> wrote:
> I am using cx_freeze to package my python app. If I do "python setup.py
> build" at the command line, then copy the build folder to a clean machine
> (no python or pyqt4 installed), the app works fine, all window icons display
> correctly. If I do "python setup.py bdist_msi" and install the .msi on the
> clean machine, the window icons do not display. So something about bdist_msi
> seems
 to be causing an issue for pyqt4. Is this a bug, or am I missing a
> setting in my setup.py? I have pasted my setup.py file below. Note that the
> window icon is in windowicon\icon.png and should not be confused with the
> executable icon (icon.ico).
>
> from cx_Freeze import setup, Executable
>
> GUI2Exe_Target_1 = Executable(
>     script = "app.py",
>     initScript = None,
>     base = 'Win32GUI',
>     targetName = "App.exe",
>     compress = True,
>     copyDependentFiles = True,
>     appendScriptToExe = False,
>     appendScriptToLibrary = False,
>     icon = "icon.ico",
>     shortcutName = "App Shortcut",
>     shortcutDir =
 "ProgramMenuFolder"
>     )
> excludes = []
> includes =
> ["email","PyQt4.QtCore","PyQt4.QtGui","win32gui","win32com","win32api","html.parser","sys","threading","datetime","time","urllib.request","re","queue","os"]
> includefiles = ["windowicon\\icon.png",
> ("C:\\Python32\\Lib\\site-packages\\PyQt4\\plugins\\imageformats",
> "plugins\\imageformats"), "qt.conf"]
> packages = []
> path = []
> setup(
>     version = "0.95.1",
>     description = "App Description",
>     author = "Me",
>     author_email = "[email protected]",
>     name = "App",
>     options = {"build_exe": {"includes": includes,
>
                              "excludes": excludes,
>                              "packages": packages,
>                              "path": path,
>                              "include_files": includefiles
>                            
 },
>                },
>     executables = [GUI2Exe_Target_1]
>     )
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> cx-freeze-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to