I want to give gems to old macs!

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

I want to give gems to old macs!

Post by Kaks »

It's a bit of a long story...

Anyway, is there any way to tell which platform we're running on from within a legacy script? All I'd need is a way to tell between mac & not mac systems.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Ark
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sun Dec 09, 2007 8:22 am
Location: Athens Greece

Post by Ark »

Oh man !!!!!!!I just wanted to upgrade an old oxp
I thought it would be easy. Now look the mess I create. :x
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: I want to give gems to old macs!

Post by JensAyton »

Kaks wrote:
Anyway, is there any way to tell which platform we're running on from within a legacy script? All I'd need is a way to tell between mac & not mac systems.
There shouldn’t be, but if you try hard you might find an exploit. :-)
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Uh, try hard, 'great'! :P

Mind you, do we have a .platform property (or similar) inside the oolite global? If not, it might be worth adding in 1.71 to apply platform specific workarounds in the future.

@Ark: Yep, it's a bit like dominoes, touch one tiny little thing and, before you know it, everything starts collapsing around you. :)
Mind you, figuring out how to put it together again is what most programmers do for fun. Sick people, every one of them. :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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 »

Kaks wrote:
Mind you, do we have a .platform property (or similar) inside the oolite global? If not, it might be worth adding in 1.71 to apply platform specific workarounds in the future.
I considered this for a while, but decided against it. If someone does that, and we then fix the platform difference (all platform differences that affect OXPs can be considered bugs), The workaround is likely to stop working. So then we need to carefully maintain and document all the differences that have been discovered, and everyone has to keep taking them into account… urgh. That way lies, well, Microsoft.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Ahruman wrote:
That way lies, well, Microsoft.
:shock:

I've been using windoze way too long, m$'s started corrupting my very soul...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
davcefai
---- E L I T E ----
---- E L I T E ----
Posts: 400
Joined: Sun Dec 03, 2006 9:07 pm

Post by davcefai »

NOT a perfect solution but you could try:

Option 1. Load a graphic which is extremely likely to be present in an OS of interest. Assuming that you can see an error then you can try Windows, Mac and Linux in turn. I admit that this is hit and miss. For Linux you could look in the icons folder. For windows look for the splash screen. (No idea about Macs)

Option 2. This should be more rigorous but involves more work: Write an installer script which will ask the user which platform this is - or detect it from the installer. Then set a variable in the save file.

Option 3: The nightmare scenario. Release 3 versions of the OXP. :twisted:
Post Reply