-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
using System.Runtime.InteropServices; | ||
using GameFinder.StoreHandlers.GOG; | ||
using GameFinder.Wine; | ||
using JetBrains.Annotations; | ||
using NexusMods.Paths; | ||
|
||
namespace GameFinder.Launcher.Heroic; | ||
|
||
/// <summary> | ||
/// Represents a GOG game installed via Heroic. | ||
/// </summary> | ||
[PublicAPI] | ||
public record HeroicGOGGame( | ||
GOGGameId Id, | ||
string Name, | ||
AbsolutePath Path, | ||
string BuildId, | ||
AbsolutePath WinePrefixPath, | ||
DTOs.WineVersion WineVersion) : GOGGame(Id, Name, Path, BuildId) | ||
WineData? WineData, | ||
OSPlatform Platform) : GOGGame(Id, Name, Path, BuildId) | ||
{ | ||
public WinePrefix GetWinePrefix() | ||
/// <summary> | ||
/// Gets the wine prefix, if any. | ||
/// </summary> | ||
public WinePrefix? GetWinePrefix() | ||
{ | ||
if (WineData is null) return null; | ||
|
||
return new WinePrefix | ||
{ | ||
ConfigurationDirectory = WinePrefixPath.Combine("pfx"), | ||
ConfigurationDirectory = WineData.WinePrefixPath.Combine("pfx"), | ||
UserName = "steamuser", | ||
}; | ||
} | ||
} | ||
|
||
[PublicAPI] | ||
public record WineData(AbsolutePath WinePrefixPath, DTOs.WineVersion WineVersion); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters