mirror of
https://github.com/vrcx-team/VRCX.git
synced 2026-04-06 00:32:02 +02:00
Linux fixes
This commit is contained in:
@@ -104,6 +104,20 @@ namespace VRCX
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,26 @@ namespace VRCX
|
||||
|
||||
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
|
||||
{
|
||||
var steamPath = _steamPath;
|
||||
@@ -104,20 +124,8 @@ namespace VRCX
|
||||
|
||||
public override bool StartGameFromPath(string path, string arguments)
|
||||
{
|
||||
if (!path.EndsWith(".exe"))
|
||||
path = Path.Join(path, "launch.exe");
|
||||
|
||||
if (!path.EndsWith("launch.exe") || !File.Exists(path))
|
||||
return false;
|
||||
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
WorkingDirectory = Path.GetDirectoryName(path),
|
||||
FileName = path,
|
||||
UseShellExecute = false,
|
||||
Arguments = arguments
|
||||
})?.Close();
|
||||
return true;
|
||||
// This method is not used
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ const args = process.argv.slice(1);
|
||||
const noInstall = args.includes('--no-install');
|
||||
const x11 = args.includes('--x11');
|
||||
const noDesktop = args.includes('--no-desktop');
|
||||
const startup = args.includes('--startup');
|
||||
|
||||
const homePath = getHomePath();
|
||||
tryRelaunchWithArgs(args);
|
||||
@@ -567,7 +568,7 @@ function tryCopyFromWinePrefix() {
|
||||
}
|
||||
|
||||
function applyWindowState() {
|
||||
if (VRCXStorage.Get('VRCX_StartAsMinimizedState') === 'true') {
|
||||
if (VRCXStorage.Get('VRCX_StartAsMinimizedState') === 'true' && startup) {
|
||||
if (isCloseToTray) {
|
||||
mainWindow.hide();
|
||||
return;
|
||||
|
||||
@@ -10077,7 +10077,7 @@ console.log(`isLinux: ${LINUX}`);
|
||||
if (desktopMode) {
|
||||
args.push('--no-vr');
|
||||
}
|
||||
if (vrcLaunchPathOverride) {
|
||||
if (vrcLaunchPathOverride && !LINUX) {
|
||||
AppApi.StartGameFromPath(
|
||||
vrcLaunchPathOverride,
|
||||
args.join(' ')
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
v-if="!isLinux()"
|
||||
v-model="launchOptionsDialog.vrcLaunchPathOverride"
|
||||
type="textarea"
|
||||
placeholder="C:\Program Files (x86)\Steam\steamapps\common\VRChat"
|
||||
@@ -59,6 +60,7 @@
|
||||
import configRepository from '../../../service/config';
|
||||
|
||||
const openExternalLink = inject('openExternalLink');
|
||||
const isLinux = inject('isLinux');
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user