| 294 | } |
| 295 | |
| 296 | static fs::path getBasePath(PathId id) |
| 297 | { |
| 298 | switch (id) |
| 299 | { |
| 300 | case PathId::plugin1: |
| 301 | case PathId::plugin2: |
| 302 | case PathId::gamecfg: |
| 303 | case PathId::scores: |
| 304 | case PathId::openlocoYML: |
| 305 | case PathId::save: |
| 306 | case PathId::autosave: |
| 307 | case PathId::landscape: |
| 308 | case PathId::heightmap: |
| 309 | case PathId::customObjects: |
| 310 | case PathId::screenshots: |
| 311 | return Platform::getUserDirectory(); |
| 312 | case PathId::languageFiles: |
| 313 | case PathId::objects: |
| 314 | #if defined(__APPLE__) && defined(__MACH__) |
| 315 | return Platform::GetBundlePath(); |
| 316 | #else |
| 317 | return Platform::getCurrentExecutablePath().parent_path() / "data"; |
| 318 | #endif |
| 319 | default: |
| 320 | return _configurablePaths.install; |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | static fs::path getSubPath(PathId id) |
| 325 | { |
no test coverage detected