Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement XL_PLATFORM for Unix #198

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/XIVLauncher.Common.Unix/UnixGameRunner.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;

using XIVLauncher.Common.Dalamud;
using XIVLauncher.Common.PlatformAbstractions;
using XIVLauncher.Common.Unix.Compatibility;
Expand All @@ -24,6 +26,14 @@ public UnixGameRunner(CompatibilityTools compatibility, DalamudLauncher dalamudL
{
if (dalamudOk)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
environment.Add("XL_PLATFORM", "Linux");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
environment.Add("XL_PLATFORM", "MacOS");
}
return this.dalamudLauncher.Run(new FileInfo(path), arguments, environment);
}
else
Expand Down
1 change: 0 additions & 1 deletion src/XIVLauncher.Core.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29215.179
Expand Down
Loading