Click here to Skip to main content
15,886,565 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There,

I have ran into a very silly, but tired some stage where i am looking for a way to get the Mac OSx release code name at run time. Like for ex: El Capitan, Yosemite..etc

I believe OSx doesn't have any explicit way to check this.

Another way is to check the "uname -r" and then after manually write lines of code and map them against each other:

VB
ifeq ($(OSVER),14)
    OSDESCRIPTION = OS X 10.10 Yosemite
endif
ifeq ($(OSVER),13)
    OSDESCRIPTION = OS X 10.9 Mavericks
endif
ifeq ($(OSVER),12)
    OSDESCRIPTION = OS X 10.8 Mountain Lion
endif
ifeq ($(OSVER),11)
    OSDESCRIPTION = OS X 10.7 Lion
endif
ifeq ($(OSVER),10)
    OSDESCRIPTION = OS X 10.6 Snow Leopard


Can we get the release code name "explicitely" on command line?
Posted
Updated 28-Aug-15 4:00am
v2
Comments
Sergey Alexandrovich Kryukov 28-Aug-15 10:02am    
It's important enough to tag your questions properly. I changed your tags to "MacOS" for you.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900