<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2013/4/12 Brian Milco <span dir="ltr"><<a href="mailto:bcmilco@gmail.com" target="_blank">bcmilco@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi,<div><br></div><div>I've added a CPack package generator for the Mac App Store for your consideration. You can find it on github: <a href="https://github.com/iPenguin/cmake/tree/cpack-mac-app-store-generator" target="_blank">https://github.com/iPenguin/cmake/tree/cpack-mac-app-store-generator</a></div>
<div><br></div><div>
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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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:<br>
</div><div>
<div><br></div><div> if(${APP_STORE})</div><div> set(CPACK_GENERATOR "MacAppStore")</div><div><br></div><div> #The names of the App Store certs you got from Apple iTunesConnect</div><div> set(CPACK_APPLE_CERT_APP "3rd Party Mac Developer Application: [YOUR NAME]")</div>
<div> set(CPACK_APPLE_CERT_INSTALLER "3rd Party Mac Developer Installer: [YOUR NAME]")</div><div><br></div><div><div> #The plist file containing your sandboxing entitlements[1]</div><div> set(CPACK_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/resources/Entitlements.plist")</div>
<div><br></div>
</div><div> else()</div><div> set(CPACK_GENERATOR "Bundle")</div><div><br></div><div> #The names of the Developer certs you got from Apple iTunesConnect<br></div><div> set(CPACK_APPLE_CERT_APP "Developer ID Application: [YOUR NAME]")</div>
<div> set(CPACK_APPLE_CERT_INSTALLER "Developer ID Installer: [YOUR NAME]")</div><div> endif()</div><div><br></div></div><div><div> #A list of additional files that need to be code signed, ie Frameworks, plugins, any additional binaries, etc.</div>
<div> set(CPACK_APPLE_CODESIGN_FILES "/Contents/Frameworks/QtCore.framework/Versions/4/QtCore" </div><div> "/Contents/Frameworks/QtGui.framework/Versions/4/QtGui")</div>
</div><div><br></div><div> #how do I reference MACOSX_BUNDLE_GUI_IDENTIFIER directly in the generator code?</div><div> set(CPACK_APPLE_BUNDLE_ID "${MACOSX_BUNDLE_GUI_IDENTIFIER}")</div><div><br></div><div>
-Brian</div></div></blockquote><br></div><div class="gmail_quote">Hi Brian,<br><br></div><div class="gmail_quote">Some ##end documentation markup where missing one '#' which makes the corresponding CPACK_APPLE_xxx var<br>
</div><div class="gmail_quote">not appearing in the command line doc.<br></div><div class="gmail_quote">The doc parser is almost dumm so that it's almost impossible to detect that safely.<br></div><div class="gmail_quote">
You'll find a patch attached which fix the one I saw.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">You may easilly check whether you added doc is there using:<br><br></div><div class="gmail_quote">
cpack --help-variable-list | grep CPACK_APPLE<br><br></div><div class="gmail_quote">then you'll see if all is there.<br><br></div><div class="gmail_quote">cpack --help-variable CPACK_APPLE_ENTITLEMENTS<br><br></div><div class="gmail_quote">
should give you the doc of the corresponding var.<br><br><br></div>-- <br>Erk<br>Le gouvernement représentatif n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a>
</div></div>