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.
I want to give gems to old macs!
Moderators: winston, another_commander
I want to give gems to old macs!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- JensAyton
- 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!
There shouldn’t be, but if you try hard you might find an exploit. :-)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.
E-mail: [email protected]
Uh, try hard, 'great'!
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.
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.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
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.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.
E-mail: [email protected]
Ahruman wrote:That way lies, well, Microsoft.
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)
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.
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.