Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
109 user(s) are online (87 user(s) are browsing Forums)

Members: 0
Guests: 109

more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: Internal version number of OS4.1.1?
Home away from home
Home away from home


See User information
Quote:

Minuous wrote:
I'm assuming 53.3 == OS4.1.1; if that isn't correct, please correct me.


Here's my code:
switch(SysBase->lib_Version)
    {
    case 
50:
        
osVersion "PreRelease 4.0";
        break;
    case 
51:
        if(
SysBase->lib_Revision 20)
        {
            
osVersion "PreRelease 4.0 - Update 1";
        }
        else if(
SysBase->lib_Revision 29)
        {
            
osVersion "PreRelease 4.0 - Update 2";
        }
        else if(
SysBase->lib_Revision 32)
        {
            
osVersion "PreRelease 4.0 - Update 3";
        }
        else
        {
            
osVersion "PreRelease 4.0 - Update 4";
        }
        break;
    case 
52:
        if(
SysBase->lib_Revision 8)
        {
            
osVersion "Release 4.0";
        }
        else
        {
            
osVersion "Release 4.0 - Update 1";
        }
        break;
    case 
53:
        if(
SysBase->lib_Revision 12)
        {
            
osVersion "Release 4.1";
        }
        else
        {
            
// No exec update between updates 1 and 2, check the DOS library
            
struct Library *DosBase IExec->OpenLibrary("dos.library"53);
            if(!
DosBase || DosBase->lib_Revision 58)
            {
                
osVersion "Release 4.1 - Update 1";
            }
            else
            {
                
osVersion "Release 4.1 - Update 2";
            }
            if(
DosBase)
            {
                
IExec->CloseLibrary(DosBase);
            }
        }
        break;
    default:
        
osVersion "Unknown";
    }

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Internal version number of OS4.1.1?
Just popping in
Just popping in


See User information
Thanks, actually I was hoping to use version.library though as I already have it open, would the version numbers be the same?

Go to top
Re: Internal version number of OS4.1.1?
Home away from home
Home away from home


See User information
Quote:

Minuous wrote:
Thanks, actually I was hoping to use version.library though as I already have it open, would the version numbers be the same?


No, they won't be. BTW, you have the Exec library open too; all programs do. Otherwise you wouldn't have been able to open the version library.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Internal version number of OS4.1.1?
Just popping in
Just popping in


See User information
Now we know why people been saying for years the sorry state of Amiga Api /developement.

on windows you have a one liner,not an ugly mess.

Go to top
Re: Internal version number of OS4.1.1?
Just popping in
Just popping in


See User information
Quote:
on windows you have a one liner,not an ugly mess.


Oh yeah?

Have you ever struggled with determining what the state of the installed .NET framework is?



.

Go to top
Re: Internal version number of OS4.1.1?
Just popping in
Just popping in


See User information
I thought that was a clear example on how not to code it ?

Amigans for years stuffed at other systemes on how superior Amiga was/is. We had the best code, the best developers, the fastest most effecient...

We should have done better, maybe even wrap it all into a function. GetOSUpdateVersion()

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project