1 /*
2  * Copyright 2011-2013 Arx Libertatis Team (see the AUTHORS file)
3  *
4  * This file is part of Arx Libertatis.
5  *
6  * Arx Libertatis is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Arx Libertatis is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Arx Libertatis.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef ARX_PLATFORM_ENVIRONMENT_H
21 #define ARX_PLATFORM_ENVIRONMENT_H
22 
23 #include <string>
24 
25 #include "platform/Platform.h"
26 
27 enum ExitStatus {
28 	ExitSuccess,
29 	ExitFailure,
30 	RunProgram
31 };
32 
33 std::string expandEnvironmentVariables(const std::string & in);
34 
35 bool getSystemConfiguration(const std::string & name, std::string & result);
36 
37 void defineSystemDirectories(const char * argv0);
38 
39 //! Get the path to the current running executable if possible or an empty string otherwise.
40 std::string getExecutablePath();
41 
42 #if ARX_PLATFORM != ARX_PLATFORM_WIN32
43 static const char * const env_list_seperators = ":";
44 #else
45 static const char * const env_list_seperators = ";";
46 #endif
47 
48 #endif // ARX_PLATFORM_ENVIRONMENT_H
49