mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Linux fixes
This commit is contained in:
@@ -104,6 +104,20 @@ namespace VRCX
|
|||||||
|
|
||||||
public override string GetVRChatPhotosLocation()
|
public override string GetVRChatPhotosLocation()
|
||||||
{
|
{
|
||||||
|
var json = ReadConfigFile();
|
||||||
|
if (!string.IsNullOrEmpty(json))
|
||||||
|
{
|
||||||
|
var obj = JsonConvert.DeserializeObject<JObject>(json);
|
||||||
|
if (obj["picture_output_folder"] != null)
|
||||||
|
{
|
||||||
|
var photosDir = (string)obj["picture_output_folder"];
|
||||||
|
if (!string.IsNullOrEmpty(photosDir) && Directory.Exists(photosDir))
|
||||||
|
{
|
||||||
|
return photosDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Path.Join(_vrcPrefixPath, "drive_c/users/steamuser/Pictures/VRChat");
|
return Path.Join(_vrcPrefixPath, "drive_c/users/steamuser/Pictures/VRChat");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,26 @@ namespace VRCX
|
|||||||
|
|
||||||
public override bool StartGame(string arguments)
|
public override bool StartGame(string arguments)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var process = Process.Start(new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "steam",
|
||||||
|
Arguments = $"-applaunch 438100 {arguments}",
|
||||||
|
UseShellExecute = false,
|
||||||
|
});
|
||||||
|
if (process?.ExitCode == 0)
|
||||||
|
{
|
||||||
|
process.Close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
process?.Close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
logger.Error($"Failed to start VRChat: {e.Message}, attempting to start via Steam path.");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var steamPath = _steamPath;
|
var steamPath = _steamPath;
|
||||||
@@ -104,20 +124,8 @@ namespace VRCX
|
|||||||
|
|
||||||
public override bool StartGameFromPath(string path, string arguments)
|
public override bool StartGameFromPath(string path, string arguments)
|
||||||
{
|
{
|
||||||
if (!path.EndsWith(".exe"))
|
// This method is not used
|
||||||
path = Path.Join(path, "launch.exe");
|
|
||||||
|
|
||||||
if (!path.EndsWith("launch.exe") || !File.Exists(path))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Process.Start(new ProcessStartInfo
|
|
||||||
{
|
|
||||||
WorkingDirectory = Path.GetDirectoryName(path),
|
|
||||||
FileName = path,
|
|
||||||
UseShellExecute = false,
|
|
||||||
Arguments = arguments
|
|
||||||
})?.Close();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ const args = process.argv.slice(1);
|
|||||||
const noInstall = args.includes('--no-install');
|
const noInstall = args.includes('--no-install');
|
||||||
const x11 = args.includes('--x11');
|
const x11 = args.includes('--x11');
|
||||||
const noDesktop = args.includes('--no-desktop');
|
const noDesktop = args.includes('--no-desktop');
|
||||||
|
const startup = args.includes('--startup');
|
||||||
|
|
||||||
const homePath = getHomePath();
|
const homePath = getHomePath();
|
||||||
tryRelaunchWithArgs(args);
|
tryRelaunchWithArgs(args);
|
||||||
@@ -567,7 +568,7 @@ function tryCopyFromWinePrefix() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function applyWindowState() {
|
function applyWindowState() {
|
||||||
if (VRCXStorage.Get('VRCX_StartAsMinimizedState') === 'true') {
|
if (VRCXStorage.Get('VRCX_StartAsMinimizedState') === 'true' && startup) {
|
||||||
if (isCloseToTray) {
|
if (isCloseToTray) {
|
||||||
mainWindow.hide();
|
mainWindow.hide();
|
||||||
return;
|
return;
|
||||||
|
|||||||
+1
-1
@@ -10077,7 +10077,7 @@ console.log(`isLinux: ${LINUX}`);
|
|||||||
if (desktopMode) {
|
if (desktopMode) {
|
||||||
args.push('--no-vr');
|
args.push('--no-vr');
|
||||||
}
|
}
|
||||||
if (vrcLaunchPathOverride) {
|
if (vrcLaunchPathOverride && !LINUX) {
|
||||||
AppApi.StartGameFromPath(
|
AppApi.StartGameFromPath(
|
||||||
vrcLaunchPathOverride,
|
vrcLaunchPathOverride,
|
||||||
args.join(' ')
|
args.join(' ')
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-input
|
<el-input
|
||||||
|
v-if="!isLinux()"
|
||||||
v-model="launchOptionsDialog.vrcLaunchPathOverride"
|
v-model="launchOptionsDialog.vrcLaunchPathOverride"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="C:\Program Files (x86)\Steam\steamapps\common\VRChat"
|
placeholder="C:\Program Files (x86)\Steam\steamapps\common\VRChat"
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
import configRepository from '../../../service/config';
|
import configRepository from '../../../service/config';
|
||||||
|
|
||||||
const openExternalLink = inject('openExternalLink');
|
const openExternalLink = inject('openExternalLink');
|
||||||
|
const isLinux = inject('isLinux');
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user