OXPs with changing icons

Discussion and announcements regarding the Mac port… er, original version of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
JohnnyBoy
---- E L I T E ----
---- E L I T E ----
Posts: 490
Joined: Mon May 05, 2008 9:41 pm
Location: West Sussex, UK (rich agricultural)

OXPs with changing icons

Post by JohnnyBoy » Thu Aug 21, 2008 4:20 pm

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
"That's no vicious Treeoid. That's my wife."

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2718
Joined: Tue Apr 04, 2006 7:02 pm
Location: I escaped The Labyrinth with the assistance of my fledgling. After many battles, I'm in the Nexus.

Post by LittleBear » Thu Aug 21, 2008 5:57 pm

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.
My OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits and Renegade Pirates can be downloaded from the Elite Wiki here.

User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1474
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame » Thu Aug 21, 2008 7:19 pm

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
Bounty Scanner
Number 935

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid » Thu Aug 21, 2008 7:27 pm


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.

User avatar
JohnnyBoy
---- E L I T E ----
---- E L I T E ----
Posts: 490
Joined: Mon May 05, 2008 9:41 pm
Location: West Sussex, UK (rich agricultural)

Post by JohnnyBoy » Thu Aug 21, 2008 8:39 pm

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...?
"That's no vicious Treeoid. That's my wife."

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane » Fri Aug 22, 2008 1:17 pm

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.

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch » Fri Aug 22, 2008 2:20 pm

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.

User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton » Fri Aug 22, 2008 8:15 pm

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.

Post Reply