26#if (defined(_WIN32) && !defined(_CRT_SECURE_NO_WARNINGS)) 
   27#define _CRT_SECURE_NO_WARNINGS 
   52#elif defined(__linux__) 
   54#elif defined(__APPLE__) 
 
   98    bool setVariable(const std::
string& key, const std::
string& value) noexcept;
 
  116    std::vector<std::filesystem::path> 
getPath() noexcept;
 
  122    std::
string exec(const std::
string& cmd) noexcept;
 
  128    std::future<std::
string> 
execAsync(const std::
string& cmd) noexcept;
 
 
Functions for working with the apps's shell and environment.
Definition environment.h:43
 
const std::filesystem::path & findDependency(std::string dependency, DependencySearchOption search=DependencySearchOption::Global) noexcept
Finds the path of a given executable dependency in the system.
 
bool setVariable(const std::string &key, const std::string &value) noexcept
Sets the value of an environment variable.
 
bool testVariable(const std::string &key) noexcept
Tests an environment variable value to see if it is true.
 
const std::filesystem::path & getExecutablePath() noexcept
Gets the path of the executable file.
 
std::string getDebugInformation(const App::AppInfo &appInfo, const std::string &extraInformation="") noexcept
Gets a debug information string about the user's environment.
 
std::string getLocaleName() noexcept
Gets the name of the current locale.
 
std::vector< std::filesystem::path > getPath() noexcept
Gets a list of directories from the system PATH variable.
 
bool clearVariable(const std::string &key) noexcept
Clears an environment variable.
 
DeploymentMode getDeploymentMode() noexcept
Gets the current deployment mode.
 
std::future< std::string > execAsync(const std::string &cmd) noexcept
Executes a command asynchronously in the system shell.
 
constexpr OperatingSystem getOperatingSystem() noexcept
Gets the current operating system.
Definition environment.h:48
 
bool hasVariable(const std::string &key) noexcept
Checks if an environment variable exists.
 
std::string getVariable(const std::string &key) noexcept
Gets the value of an environment variable.
 
std::string exec(const std::string &cmd) noexcept
Executes a command in the system shell.
 
const std::filesystem::path & getExecutableDirectory() noexcept
Gets the path of the executable's directory.
 
DependencySearchOption
Search options for search for dependencies on the system.
Definition dependencysearchoption.h:32
 
@ Global
Definition dependencysearchoption.h:33
 
@ App
Definition dependencysearchoption.h:34
 
DeploymentMode
Supported deployment modes.
Definition deploymentmode.h:32
 
OperatingSystem
Supported operating systems.
Definition operatingsystem.h:32
 
@ MacOS
The MacOS operating system.
Definition operatingsystem.h:35
 
@ Other
A unknown operating system.
Definition operatingsystem.h:36
 
@ Windows
The Windows operating system.
Definition operatingsystem.h:33
 
@ Linux
The Linux operating system.
Definition operatingsystem.h:34