[CMake] CPack Generator for the Mac App Store
Eric Noulard
eric.noulard at gmail.com
Fri Apr 12 03:58:36 EDT 2013
2013/4/12 Brian Milco <bcmilco at gmail.com>
> Hi,
>
> I've added a CPack package generator for the Mac App Store for your
> consideration. You can find it on github:
> https://github.com/iPenguin/cmake/tree/cpack-mac-app-store-generator
>
> This is a first draft, but it should work to get a basic application
> uploaded via Apple's "Application Loader". I have no idea if this will work
> for the iOS App Store. Suggestions and comments are appreciated.
>
> This patch also includes code signing which is required by the Mac App
> Store, but it should also correctly sign your Bundle or DragNDrop packages
> to get your application working with OS X 10.8's default Gatekeeper
> settings if you supply a developer certificate.
>
> If you're building your app for distribution via the Mac App Store, and
> your website or other channels you might want to add something like the
> following to your CMakeLists.txt:
>
> if(${APP_STORE})
> set(CPACK_GENERATOR "MacAppStore")
>
> #The names of the App Store certs you got from Apple iTunesConnect
> set(CPACK_APPLE_CERT_APP "3rd Party Mac Developer Application:
> [YOUR NAME]")
> set(CPACK_APPLE_CERT_INSTALLER "3rd Party Mac Developer Installer:
> [YOUR NAME]")
>
> #The plist file containing your sandboxing entitlements[1]
> set(CPACK_APPLE_ENTITLEMENTS
> "${CMAKE_SOURCE_DIR}/resources/Entitlements.plist")
>
> else()
> set(CPACK_GENERATOR "Bundle")
>
> #The names of the Developer certs you got from Apple iTunesConnect
> set(CPACK_APPLE_CERT_APP "Developer ID Application: [YOUR NAME]")
> set(CPACK_APPLE_CERT_INSTALLER "Developer ID Installer: [YOUR
> NAME]")
> endif()
>
> #A list of additional files that need to be code signed, ie
> Frameworks, plugins, any additional binaries, etc.
> set(CPACK_APPLE_CODESIGN_FILES
> "/Contents/Frameworks/QtCore.framework/Versions/4/QtCore"
>
> "/Contents/Frameworks/QtGui.framework/Versions/4/QtGui")
>
> #how do I reference MACOSX_BUNDLE_GUI_IDENTIFIER directly in the
> generator code?
> set(CPACK_APPLE_BUNDLE_ID "${MACOSX_BUNDLE_GUI_IDENTIFIER}")
>
> -Brian
>
Hi Brian,
Some ##end documentation markup where missing one '#' which makes the
corresponding CPACK_APPLE_xxx var
not appearing in the command line doc.
The doc parser is almost dumm so that it's almost impossible to detect that
safely.
You'll find a patch attached which fix the one I saw.
You may easilly check whether you added doc is there using:
cpack --help-variable-list | grep CPACK_APPLE
then you'll see if all is there.
cpack --help-variable CPACK_APPLE_ENTITLEMENTS
should give you the doc of the corresponding var.
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130412/eae43473/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixEndDocMarkup.patch
Type: application/octet-stream
Size: 730 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130412/eae43473/attachment.obj>
More information about the CMake
mailing list