mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
[Backport release-10.x] fix no name instances (#5159)
This commit is contained in:
commit
8788b7338a
3 changed files with 166 additions and 162 deletions
|
|
@ -994,8 +994,8 @@ void PackInstallTask::install()
|
|||
|
||||
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||
MinecraftInstance instance(m_globalSettings, std::make_unique<INISettingsObject>(instanceConfigPath), m_stagingPath);
|
||||
{
|
||||
SettingsObject::Lock lock(instance.settings());
|
||||
|
||||
auto components = instance.getPackProfile();
|
||||
components->buildingFromScratch();
|
||||
|
||||
|
|
@ -1053,6 +1053,7 @@ void PackInstallTask::install()
|
|||
instance.setManagedPack("atlauncher", m_pack_safe_name, m_pack_name, m_version_name, m_version_name);
|
||||
|
||||
jarmods.clear();
|
||||
}
|
||||
emitSucceeded();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,8 +52,9 @@ void PackInstallTask::copySettings()
|
|||
|
||||
QString instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||
MinecraftInstance instance(m_globalSettings, std::make_unique<INISettingsObject>(instanceConfigPath), m_stagingPath);
|
||||
SettingsObject::Lock lock(instance.settings());
|
||||
|
||||
{
|
||||
SettingsObject::Lock lock(instance.settings());
|
||||
instance.settings()->set("InstanceType", "OneSix");
|
||||
instance.settings()->set("totalTimePlayed", m_pack.totalPlayTime / 1000);
|
||||
|
||||
|
|
@ -108,7 +109,7 @@ void PackInstallTask::copySettings()
|
|||
if (m_instIcon == "default")
|
||||
m_instIcon = "ftb_logo";
|
||||
instance.setIconKey(m_instIcon);
|
||||
|
||||
}
|
||||
emitSucceeded();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ void PackInstallTask::install()
|
|||
|
||||
QString instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||
MinecraftInstance instance(m_globalSettings, std::make_unique<INISettingsObject>(instanceConfigPath), m_stagingPath);
|
||||
{
|
||||
SettingsObject::Lock lock(instance.settings());
|
||||
|
||||
auto components = instance.getPackProfile();
|
||||
|
|
@ -203,6 +204,7 @@ void PackInstallTask::install()
|
|||
m_instIcon = "ftb_logo";
|
||||
}
|
||||
instance.setIconKey(m_instIcon);
|
||||
}
|
||||
|
||||
emitSucceeded();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue