mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Move files around
This commit is contained in:
@@ -26,7 +26,7 @@ namespace VRCX
|
||||
var userDataDir = Path.Join(Program.AppDataDirectory, "userdata");
|
||||
// delete userdata if Cef version has been downgraded, fixes VRCX not opening after a downgrade
|
||||
CheckCefVersion(userDataDir);
|
||||
|
||||
|
||||
var cefSettings = new CefSettings
|
||||
{
|
||||
RootCachePath = userDataDir,
|
||||
@@ -51,7 +51,7 @@ namespace VRCX
|
||||
),
|
||||
IsLocal = true
|
||||
});
|
||||
|
||||
|
||||
// cefSettings.CefCommandLineArgs.Add("ignore-certificate-errors");
|
||||
// cefSettings.CefCommandLineArgs.Add("disable-plugins");
|
||||
cefSettings.CefCommandLineArgs.Add("disable-spell-checking");
|
||||
@@ -66,7 +66,7 @@ namespace VRCX
|
||||
{
|
||||
cefSettings.CefCommandLineArgs["proxy-server"] = WebApi.ProxyUrl;
|
||||
}
|
||||
|
||||
|
||||
if (VRCXStorage.Instance.Get("VRCX_DisableGpuAcceleration") == "true")
|
||||
{
|
||||
cefSettings.CefCommandLineArgs.Add("disable-gpu");
|
||||
@@ -83,9 +83,9 @@ namespace VRCX
|
||||
|
||||
var extensionsPath = Path.Join(Program.AppDataDirectory, "extensions");
|
||||
Directory.CreateDirectory(extensionsPath);
|
||||
|
||||
|
||||
// extract Vue Devtools
|
||||
var vueDevtoolsCrxPath = Path.Join(Program.BaseDirectory, @"..\..\build-tools\Vue-js-devtools.crx");
|
||||
var vueDevtoolsCrxPath = Path.Join(Program.BaseDirectory, @"..\..\Dotnet\build-tools\Vue-js-devtools.crx");
|
||||
if (File.Exists(vueDevtoolsCrxPath))
|
||||
{
|
||||
var vueDevtoolsPath = Path.Join(extensionsPath, "Vue-js-devtools");
|
||||
@@ -93,7 +93,7 @@ namespace VRCX
|
||||
{
|
||||
if (Directory.Exists(vueDevtoolsPath))
|
||||
Directory.Delete(vueDevtoolsPath, true);
|
||||
|
||||
|
||||
Directory.CreateDirectory(vueDevtoolsPath);
|
||||
ZipFile.ExtractToDirectory(vueDevtoolsCrxPath, vueDevtoolsPath);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ namespace VRCX
|
||||
logger.Error(ex, "Failed to extract Vue Devtools");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// load extensions
|
||||
var folders = Directory.GetDirectories(extensionsPath);
|
||||
foreach (var folder in folders)
|
||||
@@ -110,10 +110,10 @@ namespace VRCX
|
||||
cefSettings.CefCommandLineArgs.Add("load-extension", folder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CefSharpSettings.ShutdownOnExit = false;
|
||||
CefSharpSettings.ConcurrentTaskExecution = true;
|
||||
|
||||
|
||||
if (Cef.Initialize(cefSettings, false) == false)
|
||||
{
|
||||
logger.Error("Cef failed to initialize");
|
||||
@@ -153,15 +153,18 @@ namespace VRCX
|
||||
File.WriteAllBytes(_lastCefVersionPath, Encoding.UTF8.GetBytes(currentVersion));
|
||||
logger.Info("Cef version: {0}", currentVersion);
|
||||
}
|
||||
|
||||
|
||||
private static void DeleteUserData(string userDataDir)
|
||||
{
|
||||
if (!Directory.Exists(userDataDir))
|
||||
return;
|
||||
|
||||
try {
|
||||
|
||||
try
|
||||
{
|
||||
Directory.Delete(userDataDir, true);
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex, "Failed to delete userdata directory: {0}", userDataDir);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user