Set default file association Mac OS X Java Package Maker Installer

I have two questions about Package Maker on Leopard. I have installed Xcode 3.1.4. I exported a Java application from Eclipse to an application package and made an installer for it. I don't know much about Mac, so for now I'm going to random sites on how to use this tool.

1) Is there a way to use Package Maker or change "Info.plist" to register a specific file extension in your default application when it is installed? Right now it gives "There is no default application specified to open this document."

2) Where is the default HD program installed? I tried to install with the setting "User Volume" as well as "User Home Directory" and I can't find my application anywhere.

The program was installed successfully, but nothing was found in the "/ Applications" or "/ Users / Username /" directory. I see the BOM in the "/ Library / Reciepts / boms /" directory, but there is no application folder.

UPDATE: This question is now complete. Part 1 I posted my answer below and Nate answered part 2.

+2


source to share


3 answers


Maybe this thread can help in question 2:



http://lists.apple.com/archives/installer-dev/2009/Sep/msg00036.html

+1


source


Here is the answer to part 1 of my post above, and part 2 was solved with a link from Nate in another answer.

To solve the first part, I modified the info.plist file of the app package. I only included the relevant parts of the plist file, and my specific file types were archive (with an extension). Both keys were required to register the types.



<key>CFBundleDocumentTypes</key>
        <array>
            <dict>
                    <key>CFBundleTypeExtensions</key>
                    <array>
                        <!-- Enter as "txt" for example, not ".txt" -->
                    <string>yourExtension1</string>
                        <string>yourExtension2</string>
                    </array>
                    <key>CFBundleTypeName</key>
                    <string>YourType document</string>
                    <key>CFBundleTypeRole</key>
                    <string>Viewer</string>

            <!-- The LSItemContentTypes key is ignored in Mac OS X v10.4 because it’s introduced in 10.5. -->
                    <key>LSItemContentTypes</key>
                    <array>
                        <string>public.archive</string>
                        <string>public.data</string>
                        <string>public.content</string>
                    </array>

                    <!-- The NSExportableTypes key is ignored in Mac OS X 10.4 -->
                    <key>NSExportableTypes</key>
                    <array>
                        <string>public.archive</string>
                        <string>public.data</string>
                        <string>public.content</string>
                    </array>

            <!-- The LSHandlerRank key is ignored in Mac OS X 10.4 -->
            <key>LSHandlerRank</key>
            <string>Owner</string>
            </dict>
         </array>

<key>UTExportedTypeDeclarations</key>
    <array>

        <dict>
            <key>UTTypeIdentifier</key>
            <string>public.archive</string>
            <key>UTTypeReferenceURL</key>
            <string>http://www.yourSite.com</string>
            <key>UTTypeDescription</key>
            <string>yourType Document</string>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.content</string>
                <string>public.data</string>
                <string>public.archive</string>
            </array>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.apple.ostype</key>
                <string>public.archive</string>
                <key>public.filename-extension</key>
                <array>
                    <string>yourExtension1</string>
                    <string>yourExtension2</string>
                </array>
            </dict>
        </dict>
    </array>

      

0


source


Also see my question for a bit more documentation and development:

Double click the document file in Mac OS X to open the Java application

I also used Spotlight to find and remove all old versions of my program for a cleaner testing environment.

0


source







All Articles