2012-04-20 3 views
1

私は.appバンドルでラップされた(Java)アプリケーションを起動するシェルスクリプトを使用しています。 Finderで実行していないアプリケーションのアプリケーションアイコンにファイルやディレクトリをドロップしようとすると、これらをコマンドラインパラメータとしてアプリケーションを起動するのではなく、このディレクトリにコピーされます。OS X:.appバンドル内のシェルスクリプトは、ドロップされたファイルやディレクトリを受け入れるべきです。

Info.plistに「魔法」のエントリを追加する必要がありますか? ((

ffmpeg.app/Contents/Info.plist 
ffmpeg.app/Contents/MacOS/ffmpeg 
ffmpeg.app/Contents/Resources/ffmpeg.icns 

のffmpegは#!/bin/shで始まる単純なスクリプトです...私はアプリは受諾を取得しました

答えて

1

ファイル(.MOVs)をdropedが、私は私のスクリプトへの引数としてファイル名を取得することはできません

の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>CFBundleDevelopmentRegion</key> 
    <string>Russian</string> 
    <key>CFBundleExecutable</key> 
    <string>ffmpeg</string> 
    <key>CFBundleName</key> 
    <string>ffmpeg</string> 
    <key>CFBundlePackageType</key> 
    <string>APPL</string> 
    <key>CFBundleIconFile</key> 
    <string>ffmpeg.icns</string> 
    <key>CFBundleDocumentTypes</key> 
    <array> 
     <dict> 
      <key>CFBundleTypeExtensions</key> 
      <array> 
       <string>mov</string> 
      </array> 
      <key>CFBundleTypeRole</key> 
      <string>Converter</string> 
      <key>LSTypeIsPackage</key> 
      <false/> 
     </dict> 
    </array> 
    <key>CFBundleShortVersionString</key> 
    <string>1.0.0</string> 
</dict> 
</plist> 

私はCFBundleTypeRoleについていずれかを知らないが、私のffmpeg.appはdroped .MOVs

を受け入れます
関連する問題