Debugging mac app icon not showing up on dock

189 views
Skip to first unread message

ams.fwd

unread,
Jun 28, 2011, 5:42:59 PM6/28/11
to PyInstaller
Hi.

I have a basic mac pyobjc app which when launched from the command
line sets up its app icon and shows up in the dock.

When packaging it with pyinstaller I add in the .lproj and .icns files
and modify the plist file to point to the proper icns file.

When I launch the .app file the app does launch (2 procs as expected)
however the icon does not show up in the dock. Switching the
LSBackgroundOnly to false throws up two icons in the dock, but they
are the default app icons and not mine. Also one of the icons keeps
permanently bouncing and has to be force quit.

How do I go about debugging this and/or fixing this?

My Info.plist is included below.
Any help would be great.

Thanks.
AM

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>MyApp</string>
<key>CFBundleExecutable</key>
<string>MyApp</string>
<key>CFBundleIconFile</key>
<string>appicon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.example.foo</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>MyApp</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<key>LSBackgroundOnly</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

ams.fwd

unread,
Jun 29, 2011, 1:56:16 AM6/29/11
to PyInstaller
After a lot of jiggering and pokering (since I don't do OSX) what I
found was that if I set LSBackgrounOnly to 0 I would get two icons but
one would bounce for a long time and even after it settled down I
could only Force quit it. Finally I set the executable to "MacOS/name"
and LSBackgroundOnly to 0 and now everything works perfectly. I have
no clue exactly why, but it does.

AM

On Jun 28, 2:42 pm, "ams.fwd" <ams....@gmail.com> wrote:
> Hi.
>
> I have a basicmacpyobjc app which when launched from the command
> line sets up its app icon and shows up in the dock.
>
> When packaging it with pyinstaller I add in the .lproj and .icns files
> and modify the plist file to point to the proper icns file.
>
> When I launch the .app file the app does launch (2 procs as expected)
> however the icon does not show up in the dock. Switching the
> LSBackgroundOnly to false throws uptwoiconsin the dock, but they
> are the default appiconsand not mine. Also one of theiconskeeps

Matthias Hub

unread,
Jun 29, 2011, 2:13:38 AM6/29/11
to pyins...@googlegroups.com
Hi, great that you've figured it out! I just got up and saw your message from last night and wanted to point you to a different thread we already discussed these working settings:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

<key>CFBundleIdentifier</key>
<string>NAME</string>
<key>CFBundleShortVersionString</key>
<string>VERSION</string>
<key>CFBundleVersion</key>
<string>VERSION</string>


<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>

<key>CFBundleDisplayName</key>
<string>NAME</string>
<key>CFBundleIconFile</key>
<string>ICON_FILE</string>
<key>CFBundleExecutable</key>
<string>MacOS/NAME</string>
<key>CFBundleName</key>
<string>NAME</string>
<key>CFBundleGetInfoString</key>
<string>NAME VERSION</string>
<key>LSHasLocalizedDisplayName</key>
<false/>
<key>NSAppleScriptEnabled</key>
<false/>


<key>CFBundlePackageType</key>
<string>APPL</string>

<key>LSBackgroundOnly</key>
<false/>
</dict>
</plist>

Greets, Matthias

> --
> You received this message because you are subscribed to the Google Groups "PyInstaller" group.
> To post to this group, send email to pyins...@googlegroups.com.
> To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.

Reply all
Reply to author
Forward
0 new messages