java implementation and downloading
This commit is contained in:
+18
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user