mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
2.3.5.0 Bump and MW5 support
This commit is contained in:
parent
65a8372ab3
commit
364bfe6cea
@ -1,5 +1,11 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 2.3.5.0 - 12/16/2020
|
||||
* Fix tesall.ru download support
|
||||
* Implement MechWarrior 5 support as a native compiler game
|
||||
* Make the title in the WJ gallery (in app) optional for games that want the title to be in the splash screen
|
||||
* Worked a few kinks out of the native game compiler
|
||||
|
||||
#### Version - 2.3.4.3 - 12/6/2020
|
||||
* Disable the back button during install/compilation
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
<AssemblyName>wabbajack-cli</AssemblyName>
|
||||
<Company>Wabbajack</Company>
|
||||
<Platforms>x64</Platforms>
|
||||
<AssemblyVersion>2.3.4.3</AssemblyVersion>
|
||||
<FileVersion>2.3.4.3</FileVersion>
|
||||
<AssemblyVersion>2.3.5.0</AssemblyVersion>
|
||||
<FileVersion>2.3.5.0</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>An automated ModList installer</Description>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
|
@ -4,6 +4,7 @@ using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Wabbajack.Common.StoreHandlers;
|
||||
@ -38,7 +39,8 @@ namespace Wabbajack.Common
|
||||
Witcher3,
|
||||
[Description("Stardew Valley")]
|
||||
StardewValley,
|
||||
KingdomComeDeliverance
|
||||
KingdomComeDeliverance,
|
||||
MechWarrior5Mercenaries
|
||||
}
|
||||
|
||||
public static class GameExtensions
|
||||
@ -67,6 +69,8 @@ namespace Wabbajack.Common
|
||||
|
||||
// to get gog ids: https://www.gogdb.org
|
||||
public List<int>? GOGIDs { get; internal set; }
|
||||
|
||||
public List<string> EpicGameStoreIDs { get; internal set; } = new List<string>();
|
||||
|
||||
// to get BethNet IDs: check the registry
|
||||
public int BethNetID { get; internal set; }
|
||||
@ -99,7 +103,16 @@ namespace Wabbajack.Common
|
||||
if (MainExecutable == null)
|
||||
throw new NotImplementedException();
|
||||
|
||||
return FileVersionInfo.GetVersionInfo((string)gameLoc.Combine(MainExecutable)).ProductVersion;
|
||||
var info = FileVersionInfo.GetVersionInfo((string)gameLoc.Combine(MainExecutable));
|
||||
var version = info.ProductVersion;
|
||||
if (string.IsNullOrWhiteSpace(version))
|
||||
{
|
||||
version =
|
||||
$"{info.ProductMajorPart}.{info.ProductMinorPart}.{info.ProductBuildPart}.{info.ProductPrivatePart}";
|
||||
return version;
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
@ -508,6 +521,23 @@ namespace Wabbajack.Common
|
||||
},
|
||||
MainExecutable = @"bin\Win64\KingdomCome.exe"
|
||||
}
|
||||
},
|
||||
{
|
||||
Game.MechWarrior5Mercenaries, new GameMetaData
|
||||
{
|
||||
Game = Game.MechWarrior5Mercenaries,
|
||||
NexusName = "mechwarrior5mercenaries",
|
||||
MO2Name = "Mechwarrior 5: Mercenaries",
|
||||
MO2ArchiveName = "mechwarrior5mercenaries",
|
||||
NexusGameId = 3099,
|
||||
EpicGameStoreIDs = new List<string> {"9fd39d8ac72946a2a10a887ce86e6c35"},
|
||||
IsGenericMO2Plugin = true,
|
||||
RequiredFiles = new List<string>
|
||||
{
|
||||
@"MW5Mercs\Binaries\Win64\MechWarrior-Win64-Shipping.exe"
|
||||
},
|
||||
MainExecutable = @"MW5Mercs\Binaries\Win64\MechWarrior-Win64-Shipping.exe"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
80
Wabbajack.Common/StoreHandlers/EpicGameStoreHandler.cs
Normal file
80
Wabbajack.Common/StoreHandlers/EpicGameStoreHandler.cs
Normal file
@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Wabbajack.Common.StoreHandlers
|
||||
{
|
||||
public class EpicGameStoreHandler : AStoreHandler
|
||||
{
|
||||
public override StoreType Type { get; internal set; }
|
||||
|
||||
public string BaseRegKey = @"SOFTWARE\Epic Games\EOS";
|
||||
public override bool Init()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool LoadAllGames()
|
||||
{
|
||||
using var eosKey = Registry.CurrentUser.OpenSubKey(BaseRegKey);
|
||||
if (eosKey == null)
|
||||
{
|
||||
Utils.Log("Epic Game Store is not installed");
|
||||
return false;
|
||||
}
|
||||
|
||||
var name = eosKey.GetValue("ModSdkMetadataDir");
|
||||
if (name == null)
|
||||
{
|
||||
Utils.Log("Registry key entry does not exist for Epic Game store");
|
||||
return false;
|
||||
}
|
||||
|
||||
var byID = GameRegistry.Games.SelectMany(g => g.Value.EpicGameStoreIDs
|
||||
.Select(id => (id, g.Value.Game)))
|
||||
.GroupBy(t => t.id)
|
||||
.ToDictionary(t => t.Key, t => t.First().Game);
|
||||
|
||||
foreach (var itm in ((AbsolutePath)(string)(name!)).EnumerateFiles(false, "*.item"))
|
||||
{
|
||||
var item = itm.FromJson<EpicGameItem>();
|
||||
Console.WriteLine($"Found Epic Game Store Game: {item.DisplayName} at {item.InstallLocation}");
|
||||
|
||||
if (byID.TryGetValue(item.CatalogItemId, out var game))
|
||||
{
|
||||
Games.Add(new EpicStoreGame(game, item));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public class EpicStoreGame : AStoreGame
|
||||
{
|
||||
public EpicStoreGame(Game game, EpicGameItem item)
|
||||
{
|
||||
Type = StoreType.EpicGameStore;
|
||||
Game = game;
|
||||
Path = (AbsolutePath)item.InstallLocation;
|
||||
Name = game.MetaData().HumanFriendlyGameName;
|
||||
|
||||
}
|
||||
|
||||
public override Game Game { get; internal set; }
|
||||
public override StoreType Type { get; internal set; }
|
||||
}
|
||||
|
||||
public class EpicGameItem
|
||||
{
|
||||
public string DisplayName { get; set; } = "";
|
||||
public string InstallationGuid { get; set; } = "";
|
||||
public string CatalogItemId { get; set; } = "";
|
||||
public string CatalogNamespace { get; set; } = "";
|
||||
public string InstallSessionId { get; set; } = "";
|
||||
public string InstallLocation { get; set; } = "";
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,8 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
{
|
||||
STEAM,
|
||||
GOG,
|
||||
BethNet
|
||||
BethNet,
|
||||
EpicGameStore
|
||||
}
|
||||
|
||||
public class StoreHandler
|
||||
@ -25,6 +26,9 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
|
||||
private static readonly Lazy<BethNetHandler> _bethNetHandler = new Lazy<BethNetHandler>(() => new BethNetHandler());
|
||||
public BethNetHandler BethNetHandler = _bethNetHandler.Value;
|
||||
|
||||
private static readonly Lazy<EpicGameStoreHandler> _epicGameStoreHandler = new Lazy<EpicGameStoreHandler>(() => new EpicGameStoreHandler());
|
||||
public EpicGameStoreHandler EpicGameStoreHandler = _epicGameStoreHandler.Value;
|
||||
|
||||
public List<AStoreGame> StoreGames;
|
||||
|
||||
@ -67,6 +71,18 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
{
|
||||
Utils.Error(new StoreException("Could not Init the BethNetHandler, check previous error messages!"));
|
||||
}
|
||||
|
||||
if (EpicGameStoreHandler.Init())
|
||||
{
|
||||
if (EpicGameStoreHandler.LoadAllGames())
|
||||
StoreGames.AddRange(EpicGameStoreHandler.Games);
|
||||
else
|
||||
Utils.Error(new StoreException("Could not load all Games from the EpicGameStoreHandler, check previous error messages!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.Error(new StoreException("Could not Init the EpicGameStoreHandler, check previous error messages!"));
|
||||
}
|
||||
}
|
||||
|
||||
public AbsolutePath? TryGetGamePath(Game game)
|
||||
|
@ -4,8 +4,8 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyVersion>2.3.4.3</AssemblyVersion>
|
||||
<FileVersion>2.3.4.3</FileVersion>
|
||||
<AssemblyVersion>2.3.5.0</AssemblyVersion>
|
||||
<FileVersion>2.3.5.0</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>Wabbajack Application Launcher</Description>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
|
@ -3,8 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyVersion>2.3.4.3</AssemblyVersion>
|
||||
<FileVersion>2.3.4.3</FileVersion>
|
||||
<AssemblyVersion>2.3.5.0</AssemblyVersion>
|
||||
<FileVersion>2.3.5.0</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>Wabbajack Server</Description>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
@ -6,8 +6,8 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<Platforms>x64</Platforms>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<AssemblyVersion>2.3.4.3</AssemblyVersion>
|
||||
<FileVersion>2.3.4.3</FileVersion>
|
||||
<AssemblyVersion>2.3.5.0</AssemblyVersion>
|
||||
<FileVersion>2.3.5.0</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>An automated ModList installer</Description>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
|
Loading…
Reference in New Issue
Block a user