How detect MorphOS version? (esp v3 vs v2)
  • Order of the Butterfly
    Order of the Butterfly
    ChrisH
    Posts: 167 from 2009/11/26
    As the title says, is there an easy way to detect which version of MorphOS is being used? Especially whether v3.x is being used or not? Or will I just have to check the version of some random library?

    My reason: I had forgotten that I'd added a work-around to PortablE for a datatypes memory-trashing bug present in v2.7, which I had been told would be fixed for v3.0 . I'd like to dynamically disable this work-around, since it introduces a small memory leak.
    Author of the PortablE programming language.
    It is pitch black. You are likely to be eaten by a grue...
  • »10.10.12 - 20:20
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1054 from 2004/9/23
    Code:

    struct Resident *rt;
    ----if( ( rt = FindResident( "MorphOS" ) ) {
    --------version = rt->rt_Version;
    --------if( rt->rt_Flags & RTF_EXTENDED ) {
    ------------revision = rt->rt_Revision;
    --------}
    ----}


    This should help.

    In Shell you can do similar by performing

    Version MorphOS

    Geit

    [ Edited by geit 10.10.2012 - 20:39 ]
  • »10.10.12 - 20:33
    Profile