私は、OS X 用の非常に単純なアプリケーション バンドルに取り組んでいます。私の OS はバージョン 10.7.5 です。この場合のアプリはシェル スクリプトです。
Kerkerkruip.app/Contents/Info.plist :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Kerkerkruip</string>
<key>CFBundleIconFile</key>
<string>Kicon.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kerkerkruip.Kerkerkruip</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Kerkerkruip</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<!--<key>CFBundleSignature</key>
<string>????</string>-->
<key>CFBundleVersion</key>
<string>9.0.1</string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string>
<key>NSHumanReadableCopyright</key>
<string>© 2011-2015 by the Kerkerkruip team</string>
<!--<key>NSMainNibFile</key>
<string>MainMenu</string>-->
<!--<key>NSPrincipalClass</key>
<string>NSApplication</string>-->
</dict>
</plist>
Kerkerkruip.app/Contents/MacOS/Kerkerkruip :
#!/usr/bin/env bash
echo "This is a blank script." 1>&2
exit 1
アプリを開こうとすると、次のエラー メッセージが表示されます。
$ open Kerkerkruip.app/
The application cannot be opened because it has an incorrect executable format.
スクリプトは +x に設定されています。SuperUser でこの質問を見たことがありますが、何も役に立ちませんでした。私のスクリプトは 27 文字を超えています。
編集:この他の質問の指示に従って、アプリの起動サービスデータベースを再構築した後、それを開こうとすると、次のようになります:
LSOpenURLsWithRole() failed with error -10810 for the file /Users/dannii/Documents/kerkerkruip/packages/osx/Kerkerkruip.app.