mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
--config="C:\DB.sqlite"
This commit is contained in:
@@ -13,11 +13,13 @@ namespace VRCX
|
||||
{
|
||||
public static string BaseDirectory { get; private set; }
|
||||
public static string AppDataDirectory { get; private set; }
|
||||
public static string ConfigLocation;
|
||||
|
||||
static Program()
|
||||
{
|
||||
BaseDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
||||
AppDataDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VRCX");
|
||||
ConfigLocation = Path.Combine(Program.AppDataDirectory, "VRCX.sqlite3");
|
||||
|
||||
if (!Directory.Exists(AppDataDirectory))
|
||||
{
|
||||
@@ -46,7 +48,7 @@ namespace VRCX
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.ToString(), "PLEASE REPORT TO PYPY", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show(e.ToString(), "PLEASE REPORT IN https://vrcx.pypy.moe/discord", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace VRCX
|
||||
{
|
||||
m_ConnectionLock = new ReaderWriterLockSlim();
|
||||
|
||||
var dataSource = Path.Combine(Program.AppDataDirectory, "VRCX.sqlite3");
|
||||
var dataSource = Program.ConfigLocation;
|
||||
m_Connection = new SQLiteConnection($"Data Source=\"{dataSource}\";Version=3;PRAGMA locking_mode=NORMAL;PRAGMA busy_timeout=5000", true);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace VRCX
|
||||
{
|
||||
if (arg.Length > 12 && arg.Substring(0, 12) == "/uri=vrcx://")
|
||||
LaunchCommand = arg.Substring(12);
|
||||
|
||||
if (arg.Length > 12 && arg.Substring(0, 8) == "--config")
|
||||
Program.ConfigLocation = arg.Substring(9);
|
||||
}
|
||||
|
||||
if (processList.Length > 1 && String.IsNullOrEmpty(LaunchCommand))
|
||||
|
||||
Reference in New Issue
Block a user