java implementation and downloading

This commit is contained in:
2026-08-27 19:35:11 +03:00
parent 08e0dc4965
commit dddc0261d4
14 changed files with 2907 additions and 10 deletions
+18 -2
View File
@@ -71,6 +71,21 @@ QString LauncherPaths::runtimeDir()
return rootDir() + QStringLiteral("/runtime");
}
QString LauncherPaths::javaDir()
{
return rootDir() + QStringLiteral("/java");
}
QString LauncherPaths::javaCatalogFile()
{
return cacheDir() + QStringLiteral("/java_runtimes.json");
}
QString LauncherPaths::javaDownloadDir()
{
return cacheDir() + QStringLiteral("/java");
}
QString LauncherPaths::cacheDir()
{
return rootDir() + QStringLiteral("/cache");
@@ -93,8 +108,9 @@ QString LauncherPaths::loaderDownloadDir()
bool LauncherPaths::ensureRootExists(QString *error)
{
const QStringList required{rootDir(), runtimeDir(), cacheDir(),
loaderDownloadDir(), buildStorageDir()};
const QStringList required{rootDir(), runtimeDir(), cacheDir(),
loaderDownloadDir(), buildStorageDir(), javaDir(),
javaDownloadDir()};
for (const QString &path : required) {
if (!QDir().mkpath(path)) {
if (error)