| 105 | } |
| 106 | |
| 107 | std::string GetDocsPath() |
| 108 | { |
| 109 | std::string relative = Path::GetDirectory(Platform::GetCurrentExecutablePath()); |
| 110 | relative = Path::Combine(relative, u8"../share/doc/openrct2"); |
| 111 | const utf8* searchLocations[] = { |
| 112 | // First try the directory relative to the executable |
| 113 | relative.c_str(), |
| 114 | "./doc", |
| 115 | "/usr/share/doc/openrct2", |
| 116 | DOCDIR, |
| 117 | }; |
| 118 | for (auto searchLocation : searchLocations) |
| 119 | { |
| 120 | LOG_VERBOSE("Looking for OpenRCT2 doc path at %s", searchLocation); |
| 121 | if (Path::DirectoryExists(searchLocation)) |
| 122 | { |
| 123 | LOG_VERBOSE("Found OpenRCT2 doc path at %s", searchLocation); |
| 124 | return searchLocation; |
| 125 | } |
| 126 | } |
| 127 | return std::string(); |
| 128 | } |
| 129 | |
| 130 | static std::string GetCurrentWorkingDirectory() |
| 131 | { |
no test coverage detected