Inspecting on which platform apps are running

Discuss any general programming issues here
Post Reply
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Inspecting on which platform apps are running

Post by Allanon »

Hello all,
I was wondering how can I know from my script if my program is running on Linux PPC or Linux x86 ( the same applies to MacOS too), from the docs about GetVersion() it should report only the generic platform, so I'm not able to know exactly on which platform I am. Any suggestions?
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
airsoftsoftwair
Posts: 5895
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Inspecting on which platform apps are running

Post by airsoftsoftwair »

Sorry, not possible. Could be added easily of course if you need it...
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Inspecting on which platform apps are running

Post by Allanon »

Hi Andreas,
if it's a simple addition for you it could be very handy to download and run external utilities for the right hosting system
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
airsoftsoftwair
Posts: 5895
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Inspecting on which platform apps are running

Post by airsoftsoftwair »

Okay, I've added a "CPU" field to the return table of GetVersion(). You can query this to find out on which CPU Hollywood is currently running.
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Inspecting on which platform apps are running

Post by Allanon »

Thank you Andreas! :D
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
JurassicC
Posts: 36
Joined: Fri May 25, 2012 9:48 pm

Re: Inspecting on which platform apps are running

Post by JurassicC »

Would it also be possible to add support for "MachineName" under AmigaOS4.1 that way you see if your script is running on an X1000 (faster) or an A1200 with a Blizzard (slower).

In python its amiga.getmachine()

so you can make a little script called whichamiga.py

--snip--
import amiga
print (amiga.getmachine())
--snip--

Returns as examples

BlizzardPPC/A1200
AmigaOne X1000
AmigaOne X1000 - RadeonHD 7870, 4GB RAM - AmigaOS 4.1ß
AmigaOne X5000 - Radeon R7 250, 2GB RAM - AmigaOS 4.1ß
User avatar
airsoftsoftwair
Posts: 5895
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Inspecting on which platform apps are running

Post by airsoftsoftwair »

Sorry, that's too much work. It's easy to find out the machine name on OS4 but it's getting much more complicated on classics and all the other platforms :)
Post Reply