new builds menu and modloaders implementation

This commit is contained in:
2026-08-27 09:21:51 +03:00
parent 5bc59f8018
commit 168884127b
23 changed files with 3979 additions and 1081 deletions
+23 -2
View File
@@ -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)