Depends on where it crashes. Yeah, people should probably build in some version checks, but then, if it says that 4.1 is a requirement, don't run it on 4.0
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
well the problem is that does not always get ISI but total freeze afterward, I will be upgrading soon so it not big problem for me.
I see a problem for classic users that will have to navigate between OS4.1 only programs and OS4.0 programs.
there shuld also be some kind of legacy, complier switch, lets say I wont to support OS4.0 user whit the new OS4.1 SDK, maybe a -D OSVERSION=4.0 compiler switch or some thing.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
well the problem is that does not always get ISI but total freeze afterward, I will be upgrading soon so it not big problem for me.
Well, what happens there depends on what the application is trying to do. If it jumps into an unknown offset in the interface, anything can happen.
Quote:
I see a problem for classic users that will have to navigate between OS4.1 only programs and OS4.0 programs.
Well the same holds true for users of AmigaOS 3.9 that cannot run AmigaOS 4.0. Or users of AmigaOS 3.1 that cannot run 3.5 and 3.9 software. There's always something like minimum requirements, and you need to check them before you try a program.
Quote:
there shuld also be some kind of legacy, complier switch, lets say I wont to support OS4.0 user whit the new OS4.1 SDK, maybe a -D OSVERSION=4.0 compiler switch or some thing.
Something like that never existed for any previous version of AmigaOS and won't be done. The autodocs usually list the minimum OS version that introduced the call.
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
Something like that never existed for any previous version of AmigaOS and won't be done. The autodocs usually list the minimum OS version that introduced the call.
On the other hand you wrote in the os4_migration_guide.pdf that "The preferred method for initialization of system libraries is the usage of the libauto link library.". And this link library only does a OpenLibrary("whatever.library", 0) call. It will open any version and the app will crash.
It's better if the software checks and if the OS version is too low to clean exit it. Many people try software out of curiousity and it's bad if it crashes. Also some time the software works (I remember running many AOS "2.0" programs on 1.3), so people love to try in hope. Crashing software because of OS version is ugly, especially when it bring down the whole system and you have to reboot.
LiveForIt wrote: New stuff on OS4Depot for OS4.1, crashes whit ISI error on AmigaOS4.0, should there not be some kind of version number checking?
Indeed there should be. I don't know which "New stuff" you are referring to but it should be fixed so it won't crash on OS4. I hope you reported the problem to the author.
On the other hand you wrote in the os4_migration_guide.pdf that "The preferred method for initialization of system libraries is the usage of the libauto link library.". And this link library only does a OpenLibrary("whatever.library", 0) call. It will open any version and the app will crash.
The app will crash if it doesn't verify the version number. I used zero because it is always better to leave the program gracefully instead of an abort().
Any program should check the library version it has opened and exit if the version is not high enough.
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
The problem is that these programs are not written for OS4.1, they are ports from other systems, and so don't have any version checking. The people who wrote them have no idea what MiniGL even is.
Also, at some point, MiniGL 2.x might be released, which would make a lot of this stuff work on 4.0 as well as 4.1.
Well it is always possible to insert an "#ifdef __amigaos4__" into a port. Most of the ports I did have e.g. Workbench tooltypes support and aren't "just" straight recompiles.
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
Assuming that the base variable for minigl is called MiniGLBase (can't check since I'm not near my A1 ATM) something like this should work:
#include <stdio.h>
#include <proto/minigl.h>
int CheckLibrary (struct Library *base, int version, int revision) {
if (base->lib_Version > version || (base->lib_Version == version && base->lib_Revision >= revision)) {
return TRUE;
}
return FALSE;
}
int main () {
if (!CheckLibrary(MiniGLBase, MIN_VERSION, MIN_REVISION)) {
printf("Newer minigl.library needed! Upgrade ASAP.\n");
return 100;
}
/* go on with program */
}
Just replace MIN_VERSION and MIN_REVISION with whatever numbers that are appropriate (don't have OS4.1 yet so I don't know what version/revision numbers MiniGL 2.0 has).
If you just need to check the library version number then it's even easier:
#include <stdio.h>
#include <proto/minigl.h>
int CheckLibrary (struct Library *base, int version) {
if (base->lib_Version >= version) {
return TRUE;
}
return FALSE;
}
int main () {
if (!CheckLibrary(MiniGLBase, MIN_VERSION)) {
printf("Newer minigl.library needed! Upgrade ASAP.\n");
return 100;
}
/* go on with program */
}