mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Fix Linux launch args & updater switching build type
This commit is contained in:
@@ -69,18 +69,22 @@ namespace VRCX
|
||||
|
||||
private static void GetVersion()
|
||||
{
|
||||
var buildName = "VRCX";
|
||||
|
||||
try
|
||||
{
|
||||
Version = $"{buildName} {File.ReadAllText(Path.Join(BaseDirectory, "Version"))}";
|
||||
var versionFile = File.ReadAllText(Path.Join(BaseDirectory, "Version")).Trim();
|
||||
|
||||
// look for trailing git hash "-22bcd96" to indicate nightly build
|
||||
var version = versionFile.Split('-');
|
||||
if (version.Length > 0 && version[^1].Length == 7)
|
||||
Version = $"VRCX Nightly {versionFile}";
|
||||
else
|
||||
Version = $"VRCX {versionFile}";
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Version = $"{buildName} Build";
|
||||
logger.Error(ex, "Failed to read version file");
|
||||
Version = "VRCX Nightly Build";
|
||||
}
|
||||
|
||||
Version = Version.Replace("\r", "").Replace("\n", "");
|
||||
}
|
||||
|
||||
private static void ConfigureLogger()
|
||||
@@ -207,7 +211,8 @@ namespace VRCX
|
||||
|
||||
private static void Run()
|
||||
{
|
||||
StartupArgs.ArgsCheck();
|
||||
var args = Environment.GetCommandLineArgs();
|
||||
StartupArgs.ArgsCheck(args);
|
||||
SetProgramDirectories();
|
||||
VRCXStorage.Instance.Load();
|
||||
BrowserSubprocess.Start();
|
||||
@@ -258,10 +263,10 @@ namespace VRCX
|
||||
ProcessMonitor.Instance.Exit();
|
||||
}
|
||||
#else
|
||||
public static void PreInit(string version)
|
||||
public static void PreInit(string version, string[] args)
|
||||
{
|
||||
Version = version;
|
||||
StartupArgs.ArgsCheck();
|
||||
StartupArgs.ArgsCheck(args);
|
||||
SetProgramDirectories();
|
||||
}
|
||||
|
||||
@@ -281,9 +286,9 @@ namespace VRCX
|
||||
#if LINUX
|
||||
public class ProgramElectron
|
||||
{
|
||||
public void PreInit(string version)
|
||||
public void PreInit(string version, string[] args)
|
||||
{
|
||||
Program.PreInit(version);
|
||||
Program.PreInit(version, args);
|
||||
}
|
||||
|
||||
public void Init()
|
||||
|
||||
Reference in New Issue
Block a user