forked from rosebudai/OpenRCT2-Web
Fix OpenRCT2#7921: Search in user's wine path for RCT2 and RCT1 install files (#26292)
This commit is contained in:
1 parent
3ff49155f2
commit
4da7daa2f9
9 files changed
+36
-18
No files matched your search
+2
-1
@@ -262,6 +262,7 @@ Appreciation for contributors who have provided substantial work, but are no lon
|
||||
* (pg805)
|
||||
* Sjoerd de Bruin (sjoerddebruin)
|
||||
* Alex Harvey (loonyduck1)
|
||||
* Daniel Rödl (danielroedl)
|
||||
|
||||
## Toolchain
|
||||
* (Balletie) - macOS
|
||||
@@ -296,7 +297,7 @@ Appreciation for contributors who have provided substantial work, but are no lon
|
||||
* Catalan - Joan Josep (J0anJosep)
|
||||
* Chinese (Simplified) - Naiji Ma (naijim), (izhangfei), Eric Zhao (sczyh30), (Muhhan), Arnold Zhou (mrmagic2020)
|
||||
* Chinese (Traditional) - Harry Lam (daihakken)
|
||||
* Czech - Martin Černáč (octaroot), (Clonewayx), Tomáš Pazdiora (Aroidzap), Ríša Szlachta (tygrysek90)
|
||||
* Czech - Martin Černáč (octaroot), (Clonewayx), Tomáš Pazdiora (Aroidzap), Ríša Szlachta (tygrysek90)
|
||||
* Danish - Lars P. Sørensen (LPSGizmo)
|
||||
* Dutch - Michael Steenbeek (Gymnasiast), Yannic Geurts (xzbobzx), (mrtnptrs), Thomas den Hollander (ThomasdenH), (hostbrute), Marijn van der Werf (marijnvdwerf), Tom Kroes (ThePsionic), Karst van Galen Last (AuraSpecs); reviewing and discussion: Aaron van Geffen (AaronVanGeffen), (Balletie) and Sijmen Schoon (SijmenSchoon)
|
||||
* Esperanto - (tellovishous), Raymond Zhao (rzhao271)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#26308] Add all new track pieces to the inverted roller coaster.
|
||||
- Feature: [#26442] Add cheat to disable grass growing.
|
||||
- Improved: [#7921] On Linux, RCT2 and RCT1 installs in Wine are now automatically detected.
|
||||
- Improved: [#26325] Changing the train type, length, or direction no longer resets the number of laps if there is just one train.
|
||||
- Improved: [objects#437] Re-order St. Basil’s Cathedral pieces to be more consistent.
|
||||
- Change: [#26689] A clear scenario editor can now be opened directly from the command line.
|
||||
@@ -581,7 +582,7 @@
|
||||
- Change: [#23328] All RCT2 entertainer costumes are now available in legacy parks.
|
||||
- Fix: [#1479] Incorrect values provided by the in game console “get location” command.
|
||||
- Fix: [#21794] Lay-down coaster cars reverse on first frames of downwards corkscrew.
|
||||
- Fix: [#23221] Track designs are saved with an incorrect ‘air’ time statistic.
|
||||
- Fix: [#23221] Track designs are saved with an incorrect ‘air’ time statistic.
|
||||
- Fix: [#23368] Incorrect refund amount when deleting track pieces at or above 96m.
|
||||
- Fix: [#23508] Simultaneous virtual floors shown for ride and footpath.
|
||||
- Fix: [#23512] Holding brakes are skipped if they’re too close together.
|
||||
|
||||
@@ -725,13 +725,13 @@ namespace OpenRCT2::Config
|
||||
{
|
||||
LOG_VERBOSE("config_find_rct1_path(...)");
|
||||
|
||||
static std::vector<u8string_view> searchLocations = Platform::GetSearchablePathsRCT1();
|
||||
static std::vector<u8string> searchLocations = Platform::GetSearchablePathsRCT1();
|
||||
|
||||
for (const auto& location : searchLocations)
|
||||
{
|
||||
if (RCT1DataPresentAtLocation(location))
|
||||
{
|
||||
return u8string(location);
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,13 +806,13 @@ namespace OpenRCT2::Config
|
||||
{
|
||||
LOG_VERBOSE("config_find_rct2_path(...)");
|
||||
|
||||
static std::vector<u8string_view> searchLocations = Platform::GetSearchablePathsRCT2();
|
||||
static std::vector<u8string> searchLocations = Platform::GetSearchablePathsRCT2();
|
||||
|
||||
for (const auto& location : searchLocations)
|
||||
{
|
||||
if (Platform::OriginalGameDataExists(location))
|
||||
{
|
||||
return u8string(location);
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -471,12 +471,12 @@ namespace OpenRCT2::Platform
|
||||
return _assetList;
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1()
|
||||
std::vector<std::string> GetSearchablePathsRCT1()
|
||||
{
|
||||
return { "/sdcard/rct1" };
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT2()
|
||||
std::vector<std::string> GetSearchablePathsRCT2()
|
||||
{
|
||||
return { "/sdcard/rct2" };
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@ namespace OpenRCT2::Platform
|
||||
}
|
||||
#endif
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1()
|
||||
std::vector<std::string> GetSearchablePathsRCT1()
|
||||
{
|
||||
return { "/RCT" };
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT2()
|
||||
std::vector<std::string> GetSearchablePathsRCT2()
|
||||
{
|
||||
return { "/RCT" };
|
||||
}
|
||||
|
||||
@@ -390,17 +390,33 @@ namespace OpenRCT2::Platform
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1()
|
||||
std::vector<std::string> GetSearchablePathsRCT1()
|
||||
{
|
||||
auto userHome = GetFolderPath(SpecialFolder::userHome);
|
||||
return {
|
||||
userHome + "/.wine/drive_c/GOG Games/RollerCoaster Tycoon Deluxe",
|
||||
userHome + "/.wine/drive_c/Program Files/GalaxyClient/Games/RollerCoaster Tycoon Deluxe",
|
||||
userHome + "/.wine/drive_c/Program Files (x86)/GalaxyClient/Games/RollerCoaster Tycoon Deluxe",
|
||||
userHome + "/.wine/drive_c/Program Files/Hasbro Interactive/RollerCoaster Tycoon",
|
||||
userHome + "/.wine/drive_c/Program Files (x86)/Hasbro Interactive/RollerCoaster Tycoon",
|
||||
// game-data-packager uses this path when installing game files
|
||||
"/usr/share/games/roller-coaster-tycoon",
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT2()
|
||||
std::vector<std::string> GetSearchablePathsRCT2()
|
||||
{
|
||||
auto userHome = GetFolderPath(SpecialFolder::userHome);
|
||||
return {
|
||||
userHome + "/.wine/drive_c/GOG Games/RollerCoaster Tycoon 2 Triple Thrill Pack",
|
||||
userHome + "/.wine/drive_c/Program Files/GalaxyClient/Games/RollerCoaster Tycoon 2 Triple Thrill Pack",
|
||||
userHome + "/.wine/drive_c/Program Files (x86)/GalaxyClient/Games/RollerCoaster Tycoon 2 Triple Thrill Pack",
|
||||
userHome + "/.wine/drive_c/Program Files/Atari/RollerCoaster Tycoon 2",
|
||||
userHome + "/.wine/drive_c/Program Files (x86)/Atari/RollerCoaster Tycoon 2",
|
||||
userHome + "/.wine/drive_c/Program Files/Infogrames/RollerCoaster Tycoon 2",
|
||||
userHome + "/.wine/drive_c/Program Files (x86)/Infogrames/RollerCoaster Tycoon 2",
|
||||
userHome + "/.wine/drive_c/Program Files/Infogrames Interactive/RollerCoaster Tycoon 2",
|
||||
userHome + "/.wine/drive_c/Program Files (x86)/Infogrames Interactive/RollerCoaster Tycoon 2",
|
||||
// game-data-packager uses this path when installing game files
|
||||
"/usr/share/games/roller-coaster-tycoon2",
|
||||
};
|
||||
|
||||
@@ -882,7 +882,7 @@ namespace OpenRCT2::Platform
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1()
|
||||
std::vector<std::string> GetSearchablePathsRCT1()
|
||||
{
|
||||
return {
|
||||
R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon Deluxe)",
|
||||
@@ -895,7 +895,7 @@ namespace OpenRCT2::Platform
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT2()
|
||||
std::vector<std::string> GetSearchablePathsRCT2()
|
||||
{
|
||||
return {
|
||||
R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon 2)",
|
||||
|
||||
@@ -231,8 +231,8 @@ namespace OpenRCT2::Platform
|
||||
bool SSE41Available();
|
||||
bool AVX2Available();
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1();
|
||||
std::vector<std::string_view> GetSearchablePathsRCT2();
|
||||
std::vector<std::string> GetSearchablePathsRCT1();
|
||||
std::vector<std::string> GetSearchablePathsRCT2();
|
||||
} // namespace OpenRCT2::Platform
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
@@ -270,12 +270,12 @@ namespace OpenRCT2::Platform
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1()
|
||||
std::vector<std::string> GetSearchablePathsRCT1()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT2()
|
||||
std::vector<std::string> GetSearchablePathsRCT2()
|
||||
{
|
||||
return { "/Applications" };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user