Page 1 of 1

OXPs with changing icons

Posted: Thu Aug 21, 2008 4:20 pm
by JohnnyBoy
When I was using Panther on an eMac, all of my OXPs appeared in the Finder with the same icon - a page with a folded corner and "OXP" stamped in the middle. I'm now using Tiger on a Mini, and for some reason, my OXPs either appear as the old icon or more likely as a folder... (?).

It's not a big deal, but I just wondered if anyone else was seeing the same thing. Has anyone figured out why an OXP file would appear to be a folder? Screen grab below...

Image

Posted: Thu Aug 21, 2008 5:57 pm
by LittleBear
They always appear as a folder on the PC (at least with XP). Donno why though the Mac should show some as folders and others with the Oolite icon.

Posted: Thu Aug 21, 2008 7:19 pm
by Frame
what i detect right away is that the USP courier OXP has more dots in its name 1.4.1.oxp than the others.. and also a space

Try renaming one like x-ships.oxp to x-ships v 1.0.0.oxp and see what happens...

if that dont give any result try adding a space to its name instead like this "x shipv1.4.1.oxp" wiht out the " signs

Posted: Thu Aug 21, 2008 7:27 pm
by Thargoid

My copy of UPS courier has a file in it's "root" called .LSOverride, a text-type file with the content

/Applications/Games/Oolite/Oolite1.65.app

It's the only one I can see with this file in your list that I have on my machine, and given the content I would wonder if that's what's doing the icon. The only other OXP I can see on my machine with a similar set-up is Military Fiasco, also by Eric Walsh.

I can't check though as I'm PC-based.

Posted: Thu Aug 21, 2008 8:39 pm
by JohnnyBoy
Thargoid wrote:

My copy of UPS courier has a file in it's "root" called .LSOverride, a text-type file with the content

/Applications/Games/Oolite/Oolite1.65.app
Ah, so you think that ".LSOverride" helps the operating system to link a file with the "Oolite" application...?

Posted: Fri Aug 22, 2008 1:17 pm
by Commander McLane
It would be invisible, though, on the Mac. To be precise, it would be part of the resource-fork of the Mac-file, which is a storage concept PC's don't know, so they show parts of the resource-fork of Mac-files with a "." as the beginning of the file-name (like in ".LSOverride").

What you are seeing here, is what I recently explained to Thargoid: On the Mac OXPs are packages. They have their own icon and look like a single file. Internally, however, a package is an ordinary folder, you just don't see it at first glance.

@ JohnnyBoy: It's strange, and it hasn't happened on my Tiger. Try the following: rename the OXPs to something that doesn't end with ".oxp". Then name it back, adding the extension again. Now the Finder should bring up an alert-box, informing you that this will make the folder appear as a single file, and asking you whether you want to do this. Click "proceed", and the icons should be back.

By the way and just in case you haven't done yet: If you want to open a package, you have to right-click on it and choose "show content" or whatever it is in English from the context menu.

Posted: Fri Aug 22, 2008 2:20 pm
by Eric Walch
My copy of UPS courier has a file in it's "root" called .LSOverride, a text-type file with the content

/Applications/Games/Oolite/Oolite1.65.app

It's the only one I can see with this file in your list that I have on my machine, and given the content I would wonder if that's what's doing the icon. The only other OXP I can see on my machine with a similar set-up is Military Fiasco, also by Eric Walsh.
When I look for the info of an oxp, I normally see that the default application is Oolite 1.55. (That is still on my computer). On double clicking all those oxp's open this old Oolite version. On a mac I can set an other default application. When I do it for an oxp I can set it to Oolite 1.65. All newer versions are for some reason greyed out in that dialogue window. I once have set those programs to Oolite 1.65. I never knew this information was stored inside the OXP itself. In the old days that sort of information was stored in one of the two desktop files.

I will reset this to the standard program for my next release as 1.65 is still to old. (In the old days until OS7 I knew very well how all things internally worked. But with the Unix based OSX everything has changed)

The .LSOverride file has nothing to do with the icon I assume. But there must be am other difference with a normal folder, even on window machines as on the mac the oxp's created on windows are shown different as normal folders.
I can just assume that some window users create those special folders to be used as normal folders. On the mac they aren't normal folders and with tiger it is decided to also show those folders as plain folders as default. Only when there is mac stuff inside, they are shown as oxp.files.
Probably there is even a preference in Tiger to switch this back to the old way of displaying?

Eric

EDIT:
Looking with some old OS7 tools inside an oxp package I noticed they don't contain special hidden files. even the "override" file is not there. It is stored in the desctop file, only the zipper has to put the relevant part of the desktop into the zipfile so an other Mac can use this info.

It is inside the "info.plist" file that is inside the mac version of Oolite itself that change the folders into a package. Somewhere inside the info.plist of Oolite I find:

Code: Select all

	<key>CFBundleDocumentTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeExtensions</key>
			<array>
				<string>oolite-save</string>
			</array>
			<key>CFBundleTypeIconFile</key>
			<string>oolite-document</string>
			<key>CFBundleTypeName</key>
			<string>Oolite Saved Game</string>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
		</dict>
		<dict>
			<key>CFBundleTypeExtensions</key>
			<array>
				<string>oxp</string>    <------- this
			</array>
			<key>CFBundleTypeIconFile</key>
			<string>oolite-expansion-document</string>
			<key>CFBundleTypeName</key>
			<string>Oolite Expansion Pack</string>
			<key>CFBundleTypeRole</key>
			<string>Viewer</string>
			<key>LSTypeIsPackage</key>   <-------- this
			<true/>
		</dict>
	</array>
This means that a file ending on ".oolite-save" or ".oxp" gets a special handling by its extension alone and not by any hidden file inside. However, this does not answer the situation for it not working on a Tiger system.

Posted: Fri Aug 22, 2008 8:15 pm
by JensAyton
Now that someone else has pointed out the problem, I’ve looked into it. The fix is to open Oolite.app/Contents/Resources/Info.plist and change the line <string>None</string> with <string>Viewer</string>. You can then select Oolite as the Open With app in Get Info.