AmigaDOS version check script
I'm writing a script and have run into issues when running it on 3.1 and 3.9, but it works great on 3.1.4 as it depends on a rather long script generated from the results of the LIST command.
Without spending much more time on rewriting the thing I'm thinking of putting in an OS version check in the script but I'm having issues with that too. It seems the method below can tell me if I'm trying with 3.1, but it can't distinguish between 3.9 (45.127) and 3.1.4 (45.194) due to the major release version being the same. Adding the minor version seems to cause it to fail completely. Are there better ways of performing this check?
|
If the major versions are the same, call Version again but this time with the REVISION keyword, and it will use the minor version instead. Eg. something like this:
VERSION >nil: workbench.library 45 IF WARN echo "This script will only function on AmigaOS 3.1.4 or later." QUIT ENDIF VERSION >nil: workbench.library 46 IF WARN VERSION >NIL: workbench.library REVISION 194 IF WARN echo "This script will only function on AmigaOS 3.1.4 or later." QUIT ENDIF ENDIF |
Quote:
Which function do you need which is in workbench.library 45.194 which is not in 45.127? I can't think of any. If you need a certain component of AmigaOS at a specific level, then you should check that component and not a completely unrelated one. Most components of 3.1.4 are at version 46, workbench.library is one of the exceptions. |
Yes, you should be checking the version of the List command instead of workbench.library, as Thomas points out.
|
I was so deep in it that I forgot the obvious! Thanks for the suggestions here, I'll use version of list as a decider.
As a side note, I copied the list command to 3.1 and the script still failed at the list command. I guess the CLI can't parse lines over a certain length on 3.1/3.9. Opening the script in ED and moving to the line where the list command is and the status area pops up with "line too long" error. It appears to be a 200 character limit, not sure if that's OS or ED related though. |
ED doesn't like to long lines. Command line length is limited to something like ~250 chars.
|
Quote:
Quote:
|
KickStarts which workbench.library is NOT in ROM are A4000T, 3.X, "3.9" (custom user 3.1 ROM), 3.1.4 and I think future 3.2. That means that workbench.library can not be used to verify version of KickStart ROM. Maybe better to test exec.library version.
OSes 3.5 and 3.9 are for use with KickStart 3.1. Eventually can use custom "3.9" KickStart. For those OSes is better to test version.library which is in LIBS directory. |
All times are GMT +2. The time now is 10:13. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.