new builds menu and modloaders implementation
This commit is contained in:
+23
-2
@@ -51,11 +51,21 @@ QString LauncherPaths::profilesFile()
|
||||
return rootDir() + QStringLiteral("/profiles.json");
|
||||
}
|
||||
|
||||
QString LauncherPaths::versionsFile()
|
||||
QString LauncherPaths::customBuildsFile()
|
||||
{
|
||||
return rootDir() + QStringLiteral("/customBuilds.json");
|
||||
}
|
||||
|
||||
QString LauncherPaths::legacyCustomBuildsFile()
|
||||
{
|
||||
return rootDir() + QStringLiteral("/versions.json");
|
||||
}
|
||||
|
||||
QString LauncherPaths::buildStorageDir()
|
||||
{
|
||||
return rootDir() + QStringLiteral("/builds");
|
||||
}
|
||||
|
||||
QString LauncherPaths::runtimeDir()
|
||||
{
|
||||
return rootDir() + QStringLiteral("/runtime");
|
||||
@@ -71,9 +81,20 @@ QString LauncherPaths::versionManifestFile()
|
||||
return cacheDir() + QStringLiteral("/version_manifest.json");
|
||||
}
|
||||
|
||||
QString LauncherPaths::loaderCacheFile(const QString &loaderKey)
|
||||
{
|
||||
return cacheDir() + QStringLiteral("/loader_") + loaderKey + QStringLiteral(".json");
|
||||
}
|
||||
|
||||
QString LauncherPaths::loaderDownloadDir()
|
||||
{
|
||||
return cacheDir() + QStringLiteral("/loaders");
|
||||
}
|
||||
|
||||
bool LauncherPaths::ensureRootExists(QString *error)
|
||||
{
|
||||
const QStringList required{rootDir(), runtimeDir(), cacheDir()};
|
||||
const QStringList required{rootDir(), runtimeDir(), cacheDir(),
|
||||
loaderDownloadDir(), buildStorageDir()};
|
||||
for (const QString &path : required) {
|
||||
if (!QDir().mkpath(path)) {
|
||||
if (error)
|
||||
|
||||
Reference in New Issue
Block a user