OneSix instances now have a minecraft folder inside.
Also, the main instance view was expanded with helpful key events: F2 for rename, F5 for refresh, Enter for start instance, Delete for...
This commit is contained in:
parent
7e78a422e8
commit
ff33d4a1a4
14 changed files with 173 additions and 43 deletions
|
@ -38,6 +38,15 @@ OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent):BaseUpdate(inst,
|
|||
void OneSixUpdate::executeTask()
|
||||
{
|
||||
QString intendedVersion = m_inst->intendedVersionId();
|
||||
|
||||
// Make directories
|
||||
QDir mcDir(m_inst->minecraftRoot());
|
||||
if (!mcDir.exists() && !mcDir.mkpath("."))
|
||||
{
|
||||
emitFailed("Failed to create bin folder.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get a pointer to the version object that corresponds to the instance's version.
|
||||
targetVersion = MinecraftVersionList::getMainList().findVersion(intendedVersion).dynamicCast<MinecraftVersion>();
|
||||
if(targetVersion == nullptr)
|
||||
|
@ -78,7 +87,7 @@ void OneSixUpdate::versionFileFinished()
|
|||
auto DlJob = firstJob.dynamicCast<DownloadJob>();
|
||||
|
||||
QString version_id = targetVersion->descriptor;
|
||||
QString inst_dir = m_inst->rootDir();
|
||||
QString inst_dir = m_inst->instanceRoot();
|
||||
// save the version file in $instanceId/version.json
|
||||
{
|
||||
QString version1 = PathCombine(inst_dir, "/version.json");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue