Skip to content

pizthewiz/Cinder-ProcessEnvironment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cinder-ProcessEnvironment

Cinder-ProcessEnvironment is a CinderBlock to access the environment variables of the application process.

NOTE - This is now available in Cinder, see Utilities.h:

std::map<std::string, std::string> getEnvironmentVariables();

with a Windows implementation as well, see #744 for more detail.

EXAMPLE

void DisplayApp::setup() {
  // enable file logging if the ENV variable XCODE is not defined
  map<string, string> env = Cinder::ProcessEnvironment::GetEnvironment();
  if (env.count("XCODE") == 0) {
    fs::path filePath = expandPath("~/Desktop/Display.log");
    log::manager()->enableFileLogging(filePath);
  }
}

About

CinderBlock for process environment access

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published