Macos .app包中的OSX:shell脚本应接受删除的文件或目录

Macos .app包中的OSX:shell脚本应接受删除的文件或目录,macos,command-line-arguments,Macos,Command Line Arguments,我正在使用shell脚本来启动封装在.app包中的(Java)应用程序。当我尝试将文件或目录放到Finder中未运行的应用程序的应用程序图标上时,它们将复制到此目录中,而不是以这些作为命令行参数启动应用程序 我是否必须在Info.plist中添加一些“神奇”条目?我的应用程序接受删除的文件(.mov),但我无法将文件名作为脚本的参数。。。(( ffmpeg是一个简单的脚本,以#!/bin/sh Info.plist: <?xml version="1.0" encoding="UTF-8"

我正在使用shell脚本来启动封装在
.app
包中的(Java)应用程序。当我尝试将文件或目录放到Finder中未运行的应用程序的应用程序图标上时,它们将复制到此目录中,而不是以这些作为命令行参数启动应用程序


我是否必须在
Info.plist
中添加一些“神奇”条目?

我的应用程序接受删除的文件(.mov),但我无法将文件名作为脚本的参数。。。((

ffmpeg是一个简单的脚本,以
#!/bin/sh

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>

CfBundledDevelopmentRegion
俄语
Cbundlexecutable
ffmpeg
CFBundleName
ffmpeg
CbundlePackageType
应用
循环流化床锅炉
ffmpeg.icns
CbundleDocumentTypes
CbundleTypeExtensions
压敏电阻
CbundleTypeRole
转换器
L类型包装
CbundleShortVersionString
1.0.0

我不知道CbundleTypeRole的任何信息,但我的ffmpeg.app accept droped.MOVs

我的应用程序接受droped文件(.MOVs),但我无法将filename作为脚本的参数((

ffmpeg是一个简单的脚本,以
#!/bin/sh

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>

CfBundledDevelopmentRegion
俄语
Cbundlexecutable
ffmpeg
CFBundleName
ffmpeg
CbundlePackageType
应用
循环流化床锅炉
ffmpeg.icns
CbundleDocumentTypes
CbundleTypeExtensions
压敏电阻
CbundleTypeRole
转换器
L类型包装
CbundleShortVersionString
1.0.0
我对CbundleTypeRole一无所知,但我的ffmpeg.app accept droped.MOVs