How to check if we are in a standalone/runtime environment

Luigi Castelli's icon

Hi there,

is there a function/method in the API that allows to check if we are running in a standalone/runtime environment ? In a patcher I know you can do that with the [max getruntime] message...
is it possible to get that information from c code ?

Thanks.

- Luigi

Timothy Place's icon

Hi Luigi,

Take a look at the documentation for maxversion().

best wishes

Luigi Castelli's icon

Hi Tim,

unless I am doing something very wrong, maxversion() returns the exact same value whether in the runtime environment or not.

From what I read in the docs, bit 14 should contain the runtime status, but I don't see it.
Could you please check if you get the same result?

I am running Max 5.1.3 on Mac OS X 10.6.2.

Thanks.

- Luigi

Timothy Place's icon

Hi Luigi,

Bit 14 tells you if you are in a standalone. There is currently no publicly available function for determining the Max Runtime application itself from the full Max environment.

If you are on a Mac you can use Apple's API to get the main bundle and then find out what its name is. I'm guessing that there is an analogous method available on Windows, though I'm not sure what it is.

Good luck.

Luigi Castelli's icon

Oh, I see...

ok, thanks again for your help.

Best.

- Luigi