1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
static void InitializeConfigSystem();
void FConfigCacheIni::InitializeConfigSystem() { FConfigManifest::UpgradeFromPreviousVersions();
GConfig = new FConfigCacheIni(EConfigCacheType::DiskBacked);
const bool bIsGamelessExe = !FApp::HasProjectName(); const bool bDefaultEngineIniRequired = !bIsGamelessExe && (GIsGameAgnosticExe || FApp::IsProjectNameEmpty()); bool bEngineConfigCreated = FConfigCacheIni::LoadGlobalIniFile(GEngineIni, TEXT("Engine"), nullptr, bDefaultEngineIniRequired);
if (!bIsGamelessExe) { if (GIsGameAgnosticExe && !bEngineConfigCreated) { const FText AbsolutePath = FText::FromString(IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*FPaths::GetPath(GEngineIni)) ); const FText Message = FText::Format(NSLOCTEXT("Core", "FirstCmdArgMustBeGameName", "'{0}' must exist and contain a DefaultEngine.ini."), AbsolutePath ); if (!GIsBuildMachine) { FMessageDialog::Open(EAppMsgType::Ok, Message); } FApp::SetProjectName(TEXT("")); if (!GIsBuildMachine) { exit(1); } UE_LOG(LogInit, Fatal,TEXT("%s"), *Message.ToString()); } }
FConfigCacheIni::LoadGlobalIniFile(GGameIni, TEXT("Game")); FConfigCacheIni::LoadGlobalIniFile(GInputIni, TEXT("Input")); #if WITH_EDITOR
FConfigCacheIni::LoadGlobalIniFile(GEditorIni, TEXT("Editor"));
FConfigManifest::MigrateEditorUserSettings(); FConfigCacheIni::LoadGlobalIniFile(GEditorPerProjectIni, TEXT("EditorPerProjectUserSettings"));
static const FString EditorSettingsDir = FPaths::Combine(*FPaths::GameAgnosticSavedDir(), TEXT("Config")) + TEXT("/"); FConfigCacheIni::LoadGlobalIniFile(GEditorSettingsIni, TEXT("EditorSettings"), nullptr, false, false, true, *EditorSettingsDir); FConfigCacheIni::LoadGlobalIniFile(GEditorLayoutIni, TEXT("EditorLayout"), nullptr, false, false, true, *EditorSettingsDir); FConfigCacheIni::LoadGlobalIniFile(GEditorKeyBindingsIni, TEXT("EditorKeyBindings"), nullptr, false, false, true, *EditorSettingsDir);
#endif #if PLATFORM_DESKTOP FConfigCacheIni::LoadGlobalIniFile(GCompatIni, TEXT("Compat")); FConfigCacheIni::LoadGlobalIniFile(GLightmassIni, TEXT("Lightmass")); #endif
FConfigCacheIni::LoadGlobalIniFile(GScalabilityIni, TEXT("Scalability")); FConfigCacheIni::LoadGlobalIniFile(GHardwareIni, TEXT("Hardware")); FConfigCacheIni::LoadGlobalIniFile(GGameUserSettingsIni, TEXT("GameUserSettings"));
GConfig->bIsReadyForUse = true; FCoreDelegates::ConfigReadyForUse.Broadcast(); }
|