如何将应用程序作为特定文件扩展名的默认开启工具

时间:2014-09-25 14:01:43

标签: python macos osx-mavericks info.plist cfbundledocumenttypes

我正在mac osx上创建名为 cipherc 的python应用程序10.9此应用程序打开文件类型扩展名“ .secure

现在,在本地系统中,对于已存在的安全文件,其默认文件开启工具是一些不同的xyz应用。 那么,我如何将我的应用程序 cipherc 作为系统中存在的所有。安全文件扩展名的默认文件扩展名,一旦我安装了cipherc app

我的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>English</string>
    <key>CFBundleDisplayName</key>
    <string>cipherc</string>
    <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeOSTypes</key>
            <array>
                <string>****</string>
                <string>fold</string>
                <string>disk</string>
            </array>    
            <key>CFBundleTypeName</key>
            <string>secure</string>
            <key>CFBundleTypeRole</key>
            <string>Viewer</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
        </dict>
    </array>
    <key>CFBundleExecutable</key>
    <string>cipherc</string>
    <key>CFBundleIconFile</key>
    <string>cc.icns</string>
    <key>CFBundleIdentifier</key>
    <string>com.cipherc.macapp.cipherc</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>cipherc</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>0.0.0</string>
    <key>LSBackgroundOnly</key>
    <true/>
    <key>LSHasLocalizedDisplayName</key>
    <false/>
    <key>NSAppleScriptEnabled</key>
    <false/>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright not specified</string>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
    <key>PyMainFileNames</key>
    <array>
        <string>__boot__</string>
    </array>
    <key>PyOptions</key>
    <dict>
        <key>alias</key>
        <false/>
        <key>argv_emulation</key>
        <true/>
        <key>emulate_shell_environment</key>
        <false/>
        <key>no_chdir</key>
        <false/>
        <key>prefer_ppc</key>
        <false/>
        <key>site_packages</key>
        <false/>
        <key>use_faulthandler</key>
        <false/>
        <key>use_pythonpath</key>
        <false/>
        <key>verbose</key>
        <false/>
    </dict>
    <key>PyResourcePackages</key>
    <array>
    </array>
    <key>PyRuntimeLocations</key>
    <array>
        <string>@executable_path/../Frameworks/Python.framework/Versions/2.7/Python</string>
        <string>/System/Library/Frameworks/Python.framework/Versions/2.7/Python</string>
    </array>
    <key>PythonInfoDict</key>
    <dict>
        <key>PythonExecutable</key>
        <string>/usr/bin/python</string>
        <key>PythonLongVersion</key>
        <string>2.7.5 (default, Mar  9 2014, 22:15:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]</string>
        <key>PythonShortVersion</key>
        <string>2.7</string>
        <key>py2app</key>
        <dict>
            <key>alias</key>
            <false/>
            <key>template</key>
            <string>app</string>
            <key>version</key>
            <string>0.8</string>
        </dict>
    </dict>
</dict>
</plist>

0 个答案:

没有答案
相关问题