| 343 | } |
| 344 | |
| 345 | SteamPaths GetSteamPaths() |
| 346 | { |
| 347 | SteamPaths ret = {}; |
| 348 | ret.nativeFolder = "steamapps/common"; |
| 349 | ret.downloadDepotFolder = "ubuntu12_32/steamapps/content"; |
| 350 | ret.manifests = "steamapps"; |
| 351 | |
| 352 | const char* steamRoot = getenv("STEAMROOT"); |
| 353 | if (steamRoot != nullptr) |
| 354 | { |
| 355 | ret.roots.emplace_back(steamRoot); |
| 356 | } |
| 357 | |
| 358 | const char* localSharePath = getenv("XDG_DATA_HOME"); |
| 359 | if (localSharePath != nullptr) |
| 360 | { |
| 361 | auto xdgDataHomeSteamPath = Path::Combine(localSharePath, u8"Steam"); |
| 362 | if (Path::DirectoryExists(xdgDataHomeSteamPath)) |
| 363 | { |
| 364 | ret.roots.emplace_back(xdgDataHomeSteamPath); |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | const char* homeDir = getpwuid(getuid())->pw_dir; |
| 369 | if (homeDir != nullptr) |
| 370 | { |
| 371 | auto localShareSteamPath = Path::Combine(homeDir, u8".local/share/Steam"); |
| 372 | if (Path::DirectoryExists(localShareSteamPath)) |
| 373 | { |
| 374 | ret.roots.emplace_back(localShareSteamPath); |
| 375 | } |
| 376 | |
| 377 | auto oldSteamPath = Path::Combine(homeDir, u8".steam/steam"); |
| 378 | if (Path::DirectoryExists(oldSteamPath)) |
| 379 | { |
| 380 | ret.roots.emplace_back(oldSteamPath); |
| 381 | } |
| 382 | |
| 383 | auto snapLocalShareSteamPath = Path::Combine(homeDir, u8"snap/steam/common/.local/share/Steam"); |
| 384 | if (Path::DirectoryExists(snapLocalShareSteamPath)) |
| 385 | { |
| 386 | ret.roots.emplace_back(snapLocalShareSteamPath); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | return ret; |
| 391 | } |
| 392 | |
| 393 | std::vector<std::string> GetSearchablePathsRCT1() |
| 394 | { |
no test coverage detected