rvhoof
Level 3

OS X application icons don't display

When installing an application on OS X with a launch anywhere executable, in previous versions we would get a red circle as the application icon. With IA 2008 Enterprise it just assigns a generic Application icon. The default icns file in the Resources of the application file seems corrupt.

I also created an OS X icns file myself and in the installer specified to use it for the application icon. When I open the launchanywhere.icns file it again seems that IA corrupts the icns file, I only see some pixels here and there that are part of the original icon I put in my icns file.

Does IA corrupt these icns files, or is there something special I need to be doing? The generic application icon makes our app very unprofessional on the Mac. This is on OS X 10.4.11 running IA 2008 Enterprise build 3428 with the installer built on Win XP Pro SP2.

Thanks,
Ron
Labels (1)
0 Kudos
7 Replies
ckanywhere529
Level 4

rvhoof,

As you know OSX uses application bundles with the .app extension.
The are actually folders.

I've noticed that IA messes up the resources of these bundles also and here's what I did to work around this issue: (works in OSX 10.3 +)

If you use the Finder to zip up the application bundle (file menu/ add to archive) or something, then you can bundle your installer with this zipped file.

To unzip the file (maintaining the resource forks/ icons etc.) you use the following command:

ditto -xk file.app.zip $user_install_dir$

You can also use ditto to create the zip file using: ditto -ck --rsrc --keepParent file.app file.app.zip

Another method I've used that seems to work is locking and unlocking the .app file at the command line.

You can test this: On your current broken .app, right click and get info.

Check LOCK and then UNLOCK, if the files are intact (and the finder is screwing up the icon resources) you might see the icon appear.

ck.

rvhoof wrote:
When installing an application on OS X with a launch anywhere executable, in previous versions we would get a red circle as the application icon. With IA 2008 Enterprise it just assigns a generic Application icon. The default icns file in the Resources of the application file seems corrupt.

I also created an OS X icns file myself and in the installer specified to use it for the application icon. When I open the launchanywhere.icns file it again seems that IA corrupts the icns file, I only see some pixels here and there that are part of the original icon I put in my icns file.

Does IA corrupt these icns files, or is there something special I need to be doing? The generic application icon makes our app very unprofessional on the Mac. This is on OS X 10.4.11 running IA 2008 Enterprise build 3428 with the installer built on Win XP Pro SP2.

Thanks,
Ron
0 Kudos
rvhoof
Level 3

Thanks ck.

The only issue I see with that approach is that I would also need to regenerate the info.plist file in some way since it has installation directory dependent references. Since I'm already updating the info.plist file to properly structure that file for the additional VM options I guess I could include a search and replace of some variables that I would encode in the plist file and replace them with the installation directory.

I'll give it a try. I guess Macrovision's quality control/testing is not very thorough on OS X to let these kinds of easy to test issues slip through to production.

Ron
0 Kudos
scully13
Level 4

Thanks ck that fixed my problem too from the thread titled "Using IA to install Mac application".

scully13
0 Kudos
rvhoof
Level 3

What I now ended up doing is to just include my own LaunchAnywhere.icns file in the installer and add a Move File action to install and overwrite the LaunchAnywhere.icns for my application as the last action in my list of installation actions. This worked like a charm.
0 Kudos
ckanywhere529
Level 4

It's a hack, no doubt about it.
They should document the issue and no claim OSX support if it cannot handle simple OSX application bundle meta data!

~Chris.
0 Kudos
Bahman
Level 2

a workaround is to run command "touch" on the application bundle after installing the app.

Post Install:

touch "$USER_INSTALL_DIR$$/$AppName.app"

you might need to click on the App once to update the icon.
0 Kudos
b_norton
Level 3

I'm having difficulty installing mac files without losing their resource forks. I can't believe how much difficulty I am having. Shouldn't this be simple. I found this thread and tried using the ditto command ditto -xk file.app.zip $user_install_dir$

I put the command right after the zip file in the install window. Looking at the install log it says that the command ran successfully. But I don't see my files unzipped. I feel like I am missing something painfully obvious, I just don't know what.

Any help would be much appreciated.
Thanks
Bn
0 Kudos