I have a stupid OS X question. I have compiled mythfrontend on my powerbook. Works perfect, though I
am still trying to get mythvideo compiled. One issue I have is I can't seem to make an icon for it. I
have tried making a symbolic link to it in the Applications folder. I tried setting "Keep in Dock"
after launching from the command line. I have tried copying the mythfrontend.app folder to the
applications folder. Nothing seems to work. I have am long time BSD user but just in the last year
switched to OS X for my personal desktop. Can anyone clue me in?
The Mac stores applications in bundles. An application bundle is a special folder that the operating system knows about. The operating system presents the bundled application as a single file, but really it is a folder that has some specific structure, but that can contain additional items. Normal use treats this special application bundle as a single file so finder copies look like you are copying (or could be another action) a single file when in fact you are processing the entire application folder structure.
To look at the application folder, you have to open it a special way that tells the operating system to "Really open it". This is done by clicking on the application with the control key held down (or right clicking if you use a two button mouse) and selecting "show package contents". When you do this, a new finder window window will open and you will see the contents of the application.
So, how does this relate to the question? The icon for the application is stored in a subfolder of the application bundle. so, if you look in:
myprog.app->Contents->Resources
You will see that the resources folder contains the resource files for the application. Normally the icon for the application will be in there. To know for sure, you need to back up on folder. The Contents folder, in addition to containing the Resource folder and other stuff will contain a file called info.plist. This is an XML file. The contents are stored in Key/Value pairs. For example, the AddressBook.app info.plist file is shown below. If you look, you will see:
<key>CFBundleIconFile</key>
<string>AddressBook.icns</string>This defines the icon name that will be shown.
Things are a bit more complicated, and I am running up to the limit of my understanding, but that should get you started.
Normally, if you are using XCODE, Apple's development environment, the GUI IDE takes care of setting things up so you do not have to worry about the XML or the format of the application bundle.
Poke around a bit and do some searches on the apple developer site and you will get the nitty-gritty.
Note that as a cool related item, when you open a DVD VIDEO_TS folder, you see all the ugly files contained within. What I did was set up a new extension ".vts" and then I renamed the video_ts folder to the "name-of-the-movie.vts". Because I defined ".vts" as a bundled folder and gave it an icon, the ".vts" gets hidden, the folder turns in to what looks like a single file, it has an icon that looks like a movie camera, and you can double click on it to run it and view it. In addition I pulled the XML for the movie down from Amazon and stored it in the bundle so the related movie info for the movie is always contained in the same bundle. To fiew the show, all you need to do is double click on the movie name and it will open and play the show! Bundles are a good thing to know about. Wish Linux had them. -Chuck-
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>abcdg</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vCard.icns</string>
<key>CFBundleTypeName</key>
<string>Address Book Group Data</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>abcdp</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vCard.icns</string>
<key>CFBundleTypeName</key>
<string>Address Book Person Data</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>vcf</string>
<string>vcard</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vCard.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/vcard</string>
<string>text/directory</string>
<string>text/x-vcard</string>
</array>
<key>CFBundleTypeName</key>
<string>VCard</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>ldif</string>
<string>ldi</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>LDIF.icns</string>
<key>CFBundleTypeName</key>
<string>LDIF</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Folder</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>fold</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>abbu</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>backup.icns</string>
<key>CFBundleTypeName</key>
<string>BackupFile</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSTypeIsPackage</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>abcdg</string>
<string>abcdp</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vCard.tiff</string>
<key>CFBundleTypeName</key>
<string>Address Book Card Data</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
<key>LSTypeIsPackage</key>
<false/>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Address Book</string>
<key>CFBundleGetInfoString</key>
<string>4.0, Copyright Apple Computer Inc. 2002-2005</string>
<key>CFBundleHelpBookFolder</key>
<string>AddressBookHelp</string>
<key>CFBundleIconFile</key>
<string>AddressBook.icns</string>
<key>CFBundleIdentifier</key>
<string>com.apple.AddressBook</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Address Book</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.0</string>
<key>CFBundleSignature</key>
<string>adrb</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Address Book URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>addressbook</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>426</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>ABApplication</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.contact</string>
</array>
<key>UTTypeDescription</key>
<string>Address Book Person Data</string>
<key>UTTypeIdentifier</key>
<string>com.apple.addressbook.person</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>ABPR</string>
<key>public.filename-extension</key>
<string>abcdp</string>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Address Book Group Data</string>
<key>UTTypeIdentifier</key>
<string>com.apple.addressbook.group</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>ABGR</string>
<key>public.filename-extension</key>
<string>abcdg</string>
</dict>
</dict>
</array>
</dict>
</plist>
_______________________________________________ mythtv-users mailing list [EMAIL PROTECTED] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
