mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #7980 from IntelOrca/improve-portable-builds
Improve portable builds
This commit is contained in:
commit
c07a57eb73
|
@ -1,9 +1,11 @@
|
|||
0.2.1+ (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#7956, #7964] Add sprite font glyphs for Hungarian and some Czech letters.
|
||||
- Feature: [#7980] Allow data path for RCT1 to be specified by a command line argument.
|
||||
- Fix: [#7975] Inspection flag not cleared for rides which are set to never be inspected (Original bug).
|
||||
- Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab.
|
||||
- Improved: [#7930] Automatically create folders for custom content.
|
||||
- Improved: [#7980] Show the full path of the scenario in the scenario select window.
|
||||
- Removed: [#7929] Support for scenario text objects.
|
||||
|
||||
0.2.1 (2018-08-26)
|
||||
|
|
|
@ -126,6 +126,10 @@ Path to the user data directory (containing
|
|||
Path to the OpenRCT2 data directory (containing
|
||||
.Pa languages )
|
||||
|
||||
.It Fl -rct1-data-path Ar path
|
||||
path to the RollerCoaster Tycoon 1 data directory (containing
|
||||
.Pa data/csg1.dat )
|
||||
|
||||
.It Fl -rct2-data-path Ar path
|
||||
Path to the RollerCoaster Tycoon 2 data directory (containing
|
||||
.Pa data/g1.dat )
|
||||
|
|
|
@ -15,6 +15,7 @@ utf8 gOpenRCT2StartupActionPath[512] = { 0 };
|
|||
utf8 gExePath[MAX_PATH];
|
||||
utf8 gCustomUserDataPath[MAX_PATH] = { 0 };
|
||||
utf8 gCustomOpenrctDataPath[MAX_PATH] = { 0 };
|
||||
utf8 gCustomRCT1DataPath[MAX_PATH] = { 0 };
|
||||
utf8 gCustomRCT2DataPath[MAX_PATH] = { 0 };
|
||||
utf8 gCustomPassword[MAX_PATH] = { 0 };
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ extern utf8 gOpenRCT2StartupActionPath[512];
|
|||
extern utf8 gExePath[MAX_PATH];
|
||||
extern utf8 gCustomUserDataPath[MAX_PATH];
|
||||
extern utf8 gCustomOpenrctDataPath[MAX_PATH];
|
||||
extern utf8 gCustomRCT1DataPath[MAX_PATH];
|
||||
extern utf8 gCustomRCT2DataPath[MAX_PATH];
|
||||
extern utf8 gCustomPassword[MAX_PATH];
|
||||
extern bool gOpenRCT2Headless;
|
||||
|
|
|
@ -131,6 +131,10 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
|
|||
basePaths[(size_t)DIRBASE::DOCUMENTATION] = Platform::GetDocsPath();
|
||||
|
||||
// Override paths that have been specified via the command line
|
||||
if (!String::IsNullOrEmpty(gCustomRCT1DataPath))
|
||||
{
|
||||
basePaths[(size_t)DIRBASE::RCT1] = gCustomRCT1DataPath;
|
||||
}
|
||||
if (!String::IsNullOrEmpty(gCustomRCT2DataPath))
|
||||
{
|
||||
basePaths[(size_t)DIRBASE::RCT2] = gCustomRCT2DataPath;
|
||||
|
@ -160,8 +164,14 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
|
|||
{
|
||||
config_save(configPath.c_str());
|
||||
}
|
||||
env->SetBasePath(DIRBASE::RCT1, String::ToStd(gConfigGeneral.rct1_path));
|
||||
env->SetBasePath(DIRBASE::RCT2, String::ToStd(gConfigGeneral.rct2_path));
|
||||
if (String::IsNullOrEmpty(gCustomRCT1DataPath))
|
||||
{
|
||||
env->SetBasePath(DIRBASE::RCT1, String::ToStd(gConfigGeneral.rct1_path));
|
||||
}
|
||||
if (String::IsNullOrEmpty(gCustomRCT2DataPath))
|
||||
{
|
||||
env->SetBasePath(DIRBASE::RCT2, String::ToStd(gConfigGeneral.rct2_path));
|
||||
}
|
||||
|
||||
// Log base paths
|
||||
log_verbose("DIRBASE::RCT1 : %s", env->GetDirectoryPath(DIRBASE::RCT1).c_str());
|
||||
|
|
|
@ -54,6 +54,7 @@ static bool _headless = false;
|
|||
static utf8* _password = nullptr;
|
||||
static utf8* _userDataPath = nullptr;
|
||||
static utf8* _openrctDataPath = nullptr;
|
||||
static utf8* _rct1DataPath = nullptr;
|
||||
static utf8* _rct2DataPath = nullptr;
|
||||
static bool _silentBreakpad = false;
|
||||
|
||||
|
@ -74,6 +75,7 @@ static constexpr const CommandLineOptionDefinition StandardOptions[]
|
|||
{ CMDLINE_TYPE_STRING, &_password, NAC, "password", "password needed to join the server" },
|
||||
{ CMDLINE_TYPE_STRING, &_userDataPath, NAC, "user-data-path", "path to the user data directory (containing config.ini)" },
|
||||
{ CMDLINE_TYPE_STRING, &_openrctDataPath, NAC, "openrct-data-path", "path to the OpenRCT2 data directory (containing languages)" },
|
||||
{ CMDLINE_TYPE_STRING, &_rct1DataPath, NAC, "rct1-data-path", "path to the RollerCoaster Tycoon 1 data directory (containing data/csg1.dat)" },
|
||||
{ CMDLINE_TYPE_STRING, &_rct2DataPath, NAC, "rct2-data-path", "path to the RollerCoaster Tycoon 2 data directory (containing data/g1.dat)" },
|
||||
#ifdef USE_BREAKPAD
|
||||
{ CMDLINE_TYPE_SWITCH, &_silentBreakpad, NAC, "silent-breakpad", "make breakpad crash reporting silent" },
|
||||
|
@ -208,6 +210,12 @@ exitcode_t CommandLine::HandleCommandDefault()
|
|||
Memory::Free(_openrctDataPath);
|
||||
}
|
||||
|
||||
if (_rct1DataPath != nullptr)
|
||||
{
|
||||
String::Set(gCustomRCT1DataPath, Util::CountOf(gCustomRCT1DataPath), _rct1DataPath);
|
||||
Memory::Free(_rct1DataPath);
|
||||
}
|
||||
|
||||
if (_rct2DataPath != nullptr)
|
||||
{
|
||||
String::Set(gCustomRCT2DataPath, Util::CountOf(gCustomRCT2DataPath), _rct2DataPath);
|
||||
|
|
|
@ -146,9 +146,10 @@ private:
|
|||
std::vector<std::string> files;
|
||||
for (const auto& directory : SearchPaths)
|
||||
{
|
||||
log_verbose("FileIndex:Scanning for %s in '%s'", _pattern.c_str(), directory.c_str());
|
||||
auto absoluteDirectory = Path::GetAbsolute(directory);
|
||||
log_verbose("FileIndex:Scanning for %s in '%s'", _pattern.c_str(), absoluteDirectory.c_str());
|
||||
|
||||
auto pattern = Path::Combine(directory, _pattern);
|
||||
auto pattern = Path::Combine(absoluteDirectory, _pattern);
|
||||
auto scanner = Path::ScanDirectory(pattern, true);
|
||||
while (scanner->Next())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue