mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix Cyberpunk GoG registration
This commit is contained in:
parent
1941e8161d
commit
b94e55c78b
@ -1,5 +1,9 @@
|
|||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
#### Version - 3.0.1.6 - 9/??/2022
|
||||||
|
* Fix Cyberpunk 2077 GoG recognition
|
||||||
|
* Add a CLI command `list-games` to list all games recognized by WJ and their versions/locations
|
||||||
|
|
||||||
#### Version - 3.0.1.5 - 9/26/2022
|
#### Version - 3.0.1.5 - 9/26/2022
|
||||||
* Fix MO2ArchiveName resolution
|
* Fix MO2ArchiveName resolution
|
||||||
* Improve performance of the compiler stack
|
* Improve performance of the compiler stack
|
||||||
|
@ -81,6 +81,7 @@ internal class Program
|
|||||||
services.AddSingleton<IVerb, HashUrlString>();
|
services.AddSingleton<IVerb, HashUrlString>();
|
||||||
services.AddSingleton<IVerb, DownloadAll>();
|
services.AddSingleton<IVerb, DownloadAll>();
|
||||||
services.AddSingleton<IVerb, ModlistReport>();
|
services.AddSingleton<IVerb, ModlistReport>();
|
||||||
|
services.AddSingleton<IVerb, ListGames>();
|
||||||
|
|
||||||
services.AddSingleton<IUserInterventionHandler, UserInterventionHandler>();
|
services.AddSingleton<IUserInterventionHandler, UserInterventionHandler>();
|
||||||
}).Build();
|
}).Build();
|
||||||
|
57
Wabbajack.CLI/Verbs/ListGames.cs
Normal file
57
Wabbajack.CLI/Verbs/ListGames.cs
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
using System.CommandLine;
|
||||||
|
using System.CommandLine.Invocation;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Wabbajack.Downloaders.GameFile;
|
||||||
|
using Wabbajack.DTOs;
|
||||||
|
using Wabbajack.Paths.IO;
|
||||||
|
|
||||||
|
namespace Wabbajack.CLI.Verbs;
|
||||||
|
|
||||||
|
public class ListGames : IVerb
|
||||||
|
{
|
||||||
|
private readonly ILogger<ListGames> _logger;
|
||||||
|
private readonly GameLocator _locator;
|
||||||
|
|
||||||
|
public ListGames(ILogger<ListGames> logger, GameLocator locator)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
_locator = locator;
|
||||||
|
}
|
||||||
|
public Command MakeCommand()
|
||||||
|
{
|
||||||
|
var command = new Command("list-games");
|
||||||
|
command.Description = "Lists all games Wabbajack recognizes, and their installed versions/locations (if any)";
|
||||||
|
command.Handler = CommandHandler.Create(Run);
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> Run(CancellationToken token)
|
||||||
|
{
|
||||||
|
foreach (var game in GameRegistry.Games.OrderBy(g => g.Value.HumanFriendlyGameName))
|
||||||
|
{
|
||||||
|
if (_locator.IsInstalled(game.Key))
|
||||||
|
{
|
||||||
|
var location = _locator.GameLocation(game.Key);
|
||||||
|
var version = "unknown";
|
||||||
|
var mainFile = game.Value.MainExecutable!.Value.RelativeTo(location);
|
||||||
|
|
||||||
|
if (!mainFile.FileExists())
|
||||||
|
_logger.LogWarning("Main file {file} for {game} does not exist", mainFile, game.Key);
|
||||||
|
|
||||||
|
var versionInfo = FileVersionInfo.GetVersionInfo(mainFile.ToString());
|
||||||
|
|
||||||
|
_logger.LogInformation("[X] {Game} {Version} -> Path: {Path}", game.Value.HumanFriendlyGameName, versionInfo.ProductVersion ?? versionInfo.FileVersion, location);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.LogInformation("[ ] {Game}", game.Value.HumanFriendlyGameName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@ -407,7 +407,7 @@ public static class GameRegistry
|
|||||||
{
|
{
|
||||||
Game = Game.Cyberpunk2077,
|
Game = Game.Cyberpunk2077,
|
||||||
SteamIDs = new[] {1091500},
|
SteamIDs = new[] {1091500},
|
||||||
GOGIDs = new [] {2093619782},
|
GOGIDs = new [] {2093619782, 1423049311},
|
||||||
MO2Name = "Cyberpunk 2077",
|
MO2Name = "Cyberpunk 2077",
|
||||||
NexusName = "cyberpunk2077",
|
NexusName = "cyberpunk2077",
|
||||||
NexusGameId = 3333,
|
NexusGameId = 3333,
|
||||||
|
@ -7,7 +7,7 @@ mkdir c:\tmp\publish-wj
|
|||||||
|
|
||||||
dotnet clean
|
dotnet clean
|
||||||
dotnet restore
|
dotnet restore
|
||||||
dotnet publish Wabbajack.App.Wpf\Wabbajack.App.Wpf.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained
|
dotnet publish Wabbajack.App.Wpf\Wabbajack.App.Wpf.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained
|
||||||
dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\launcher /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained
|
dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\launcher /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained
|
||||||
dotnet publish c:\oss\Wabbajack\Wabbajack.CLI\Wabbajack.CLI.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app --self-contained
|
dotnet publish c:\oss\Wabbajack\Wabbajack.CLI\Wabbajack.CLI.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app --self-contained
|
||||||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com c:\tmp\publish-wj\app\Wabbajack.exe
|
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com c:\tmp\publish-wj\app\Wabbajack.exe
|
||||||
|
Loading…
Reference in New Issue
Block a user