nwolek / LowkeyNW

Package for Cycling74 Max. Contains updated objects from the Granular Toolkit, a classic stereo reverb and some twists on standard MSP objects that makes them savvy about zero-crossings.
BSD 3-Clause "New" or "Revised" License
37 stars 4 forks source link

Where do default values in info.plist come from? #10

Closed nwolek closed 8 years ago

nwolek commented 8 years ago

This was noted while addressing issue #8 and pull #9.

Each external on the mac has an individual info.plist inside the MXO package. The values in these files are being set somewhere in either the Travis-CI or Appveyor YML files or the connection with these projects:

Perhaps @tap knows about this and can point me in the right direction?

nwolek commented 8 years ago

Here is what the info.plist generated looks like:

<?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>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>nw.trainshift~</string>
    <key>CFBundleGetInfoString</key>
    <string></string>
    <key>CFBundleIconFile</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string></string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleLongVersionString</key>
    <string></string>
    <key>CFBundleName</key>
    <string></string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string></string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string></string>
    <key>CSResourcesFileMapped</key>
    <true/>
    <key>LSRequiresCarbon</key>
    <true/>
    <key>NSHumanReadableCopyright</key>
    <string></string>
</dict>
</plist>
nwolek commented 8 years ago

There are also version numbers found in these places: https://github.com/nwolek/LowkeyNW/blob/master/appveyor.yml#L1 https://github.com/nwolek/LowkeyNW/blob/master/package-info.json#L25

nwolek commented 8 years ago

Info.plist & PkgInfo used to live here: https://github.com/nwolek/LowkeyNW/tree/a348dcecd0a0216e3dc00a53cdaae16c812ad6a2/source

tap commented 8 years ago

Two topics:

Starting with Info.plist, it turns out that this bit:

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

is correct -- that's the version of the Info.plist format. But if you want the version of your extern to be the version of your package, then this bit is wrong:

    <key>CFBundleVersion</key>
    <string></string>

I just tested adding the following to the CMakeLists.txt for cppan~:

set_target_properties(${PROJECT_NAME} PROPERTIES
    MACOSX_BUNDLE_BUNDLE_VERSION "1.0.1"
)

and it worked to set this in the Info.plist:

    <key>CFBundleVersion</key>
    <string>1.0.1</string>

As for PkgInfo... Apple's documentation says this:

The PkgInfo file is an alternate way to specify the type and creator codes of your application or bundle. This file is not required, but can improve performance for code that accesses this information. Regardless of whether you provide this file, you should always include type and creator information in your information property list file using the CFBundlePackageType and CFBundleSignature keys, respectively.

My memory (which could be faulty) is that PkgInfo was required for bundles on MacOS 9.

I'll spend a little time figuring out how to work all of this in, but... The question of version numbers in appveyor.yml and package-info.json remains. So I'll research that next...

nwolek commented 8 years ago

Thanks Tim! In the meantime, I have tagged a beta release. Going to post in the Facebook group to see if some Windows users want to give it a test.

nwolek commented 8 years ago

Found this in the Cmake reference https://cmake.org/cmake/help/v3.4/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html

tap commented 8 years ago

See Pull Request #11

nwolek commented 8 years ago

Reading up some more about info.plist tonight. Saving some of the links here for referencing later:

https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

https://github.com/Cycling74/max-sdk/blob/master/source/Info.plist

https://cmake.org/cmake/help/v3.4/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html

nwolek commented 8 years ago

Addressed by pull request #13