42 lines
1.8 KiB
C#
42 lines
1.8 KiB
C#
using Млаумчерб.Клиент.зримое;
|
||
|
||
namespace Млаумчерб.Клиент.классы;
|
||
|
||
public static class Пути
|
||
{
|
||
public static IOPath GetAssetIndexFilePath(string id) =>
|
||
Path.Concat(Приложение.Настройки.путь_к_кубачу, $"assets/indexes/{id}.json");
|
||
|
||
public static IOPath GetVersionDescriptorsDir() =>
|
||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "versions");
|
||
|
||
public static string GetVersionDescriptorName(IOPath path) =>
|
||
path.LastName().RemoveExtension().ToString();
|
||
|
||
public static IOPath GetVersionDescriptorPath(string name) =>
|
||
Path.Concat(GetVersionDescriptorsDir(), Path.ReplaceRestrictedChars(name) + ".json");
|
||
|
||
public static IOPath GetVersionDir(string id) =>
|
||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "versions", id);
|
||
|
||
public static IOPath GetVersionJarFilePath(string id) =>
|
||
Path.Concat(GetVersionDir(id), id + ".jar");
|
||
|
||
public static IOPath GetLibrariesDir() =>
|
||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "libraries");
|
||
|
||
public static IOPath GetNativeLibrariesDir(string id) =>
|
||
Path.Concat(GetVersionDir(id), "natives", Буржуазия.GetOs());
|
||
|
||
public static IOPath GetJavaRuntimesDir() =>
|
||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "java");
|
||
|
||
|
||
public static IOPath GetJavaRuntimeDir(string id) =>
|
||
Path.Concat(GetJavaRuntimesDir(), id);
|
||
|
||
public static IOPath GetJavaExecutablePath(string id) =>
|
||
Path.Concat(GetJavaRuntimeDir(id), "bin",
|
||
OperatingSystem.IsWindows() ? "javaw.exe" : "javaw");
|
||
}
|