Skip to content
mba105 edited this page Sep 24, 2014 · 2 revisions

Home > [Scripting Reference](Scripting Reference) > os.is


os.is

The os.is function checks the current operating system identifier against a particular value.

#!lua
os.is("id")

Parameters

id is one of the operating system identifiers bsd, linux, macosx, solaris, or windows.

Note that this function tests against the OS being targeted, which is not necessarily the same as the OS on which Premake is being run. If you are running on Mac OS X and generating Visual Studio project files, the identifier is "Windows", since that is the OS being targeted by the Visual Studio action.

Return Value

True if the supplied ID matches the current operating system identifier, false otherwise.

Clone this wiki locally