Malformed Freetype Framework in SFML Mac App

2019-07-18 14:13发布

问题:

We just wrapped up a game in SFML for Mac and submitted it to the Mac store. We are using SFML 2.0. We're using a standard SFML project in Xcode with the link script that copies over the required frameworks. The game works great on all computers from Mac OSX 10.6-10.9. Trouble is, when we submit to the App Store, we get an email back saying the following:

Malformed Framework - The framework bundle (Shibashiba.app/Contents/Frameworks/freetype.framework) must contain a symbolic link 'freetype' -> 'Versions/Current/freetype'. Refer to the Anatomy of Framework Bundles for more information.

If I go into the Archived application, the freetype.framework folder is in Contents/Frameworks and it has a symbolic link that points to Versions/Current/freetype, so I'm at a loss as to what this error means. Could it be some kind of permissions error? Could the freetype distro included with 2.0 be messed up in some way? Any help would be appreciated. This is our last hurdle to shipping!

回答1:

I think I figured it out! Basically, the compiled freetype.framework included with SFML is linked incorrectly.

If you look in the folder using Finder, the links look correct, but if you compare it to sndfile.framework, it is different. For example:

sndfile.framework
    sndfile -> Versions/Current/sndfile
    Versions
        A
            sndfile
        Current -> A

versus

freetype.framework
    freetype -> Versions/A/freetype
    Versions
        A
            freetype
        Current -> A

You can see above that freetype points DIRECTLY to the "A" version of freetype, whereas in the correct "Anatomy", it should point to Current, which in turn points to the current version.

I changed the symlink and Apple accepted the corrected binary:

cd /Library/Frameworks/freetype.framework
ln -fns Versions/Current/freetype freetype