Extract the directory if the registry value points to a filename.
This commit is contained in:
committed by
reaperrr
parent
1f6e0f582a
commit
e13fd4816e
@@ -17,7 +17,7 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
public class ModContent : IGlobalModData
|
public class ModContent : IGlobalModData
|
||||||
{
|
{
|
||||||
public enum SourceType { Disc, Install }
|
public enum SourceType { Disc, RegistryDirectory, RegistryDirectoryFromFile }
|
||||||
public class ModPackage
|
public class ModPackage
|
||||||
{
|
{
|
||||||
public readonly string Title;
|
public readonly string Title;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
if (Platform.CurrentPlatform == PlatformType.Windows)
|
if (Platform.CurrentPlatform == PlatformType.Windows)
|
||||||
{
|
{
|
||||||
var installations = missingSources
|
var installations = missingSources
|
||||||
.Where(s => s.Type == ModContent.SourceType.Install)
|
.Where(s => s.Type == ModContent.SourceType.RegistryDirectory || s.Type == ModContent.SourceType.RegistryDirectoryFromFile)
|
||||||
.Select(s => s.Title)
|
.Select(s => s.Title)
|
||||||
.Distinct();
|
.Distinct();
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
string FindSourcePath(ModContent.ModSource source, IEnumerable<string> volumes)
|
string FindSourcePath(ModContent.ModSource source, IEnumerable<string> volumes)
|
||||||
{
|
{
|
||||||
if (source.Type == ModContent.SourceType.Install)
|
if (source.Type == ModContent.SourceType.RegistryDirectory || source.Type == ModContent.SourceType.RegistryDirectoryFromFile)
|
||||||
{
|
{
|
||||||
if (source.RegistryKey == null)
|
if (source.RegistryKey == null)
|
||||||
return null;
|
return null;
|
||||||
@@ -478,6 +478,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
if (path == null)
|
if (path == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (source.Type == ModContent.SourceType.RegistryDirectoryFromFile)
|
||||||
|
path = Path.GetDirectoryName(path);
|
||||||
|
|
||||||
return IsValidSourcePath(path, source) ? path : null;
|
return IsValidSourcePath(path, source) ? path : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
origin: C&C The Ultimate Collection (Origin version, English)
|
origin: C&C The Ultimate Collection (Origin version, English)
|
||||||
Type: Install
|
Type: RegistryDirectory
|
||||||
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
||||||
RegistryKey: EA Games\CNC and The Covert Operations
|
RegistryKey: EA Games\CNC and The Covert Operations
|
||||||
RegistryValue: Install Dir
|
RegistryValue: Install Dir
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
gruntmods: Dune 2000: GruntMods Edition
|
gruntmods: Dune 2000: GruntMods Edition
|
||||||
Type: Install
|
Type: RegistryDirectory
|
||||||
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
||||||
RegistryKey: Dune 2000: Gruntmods Edition
|
RegistryKey: Dune 2000: Gruntmods Edition
|
||||||
IDFiles:
|
IDFiles:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
ra-origin: C&C The Ultimate Collection (Origin version, English)
|
ra-origin: C&C The Ultimate Collection (Origin version, English)
|
||||||
Type: Install
|
Type: RegistryDirectory
|
||||||
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
||||||
RegistryKey: EA Games\Command and Conquer Red Alert
|
RegistryKey: EA Games\Command and Conquer Red Alert
|
||||||
RegistryValue: Install Dir
|
RegistryValue: Install Dir
|
||||||
@@ -457,7 +457,7 @@ ra-origin: C&C The Ultimate Collection (Origin version, English)
|
|||||||
Length: 9073
|
Length: 9073
|
||||||
|
|
||||||
cnc-origin: Command & Conquer (Origin version, English)
|
cnc-origin: Command & Conquer (Origin version, English)
|
||||||
Type: Install
|
Type: RegistryDirectory
|
||||||
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
||||||
RegistryKey: EA Games\CNC and The Covert Operations
|
RegistryKey: EA Games\CNC and The Covert Operations
|
||||||
RegistryValue: Install Dir
|
RegistryValue: Install Dir
|
||||||
@@ -465,4 +465,4 @@ cnc-origin: Command & Conquer (Origin version, English)
|
|||||||
CONQUER.MIX: 833e02a09aae694659eb312d3838367f681d1b30
|
CONQUER.MIX: 833e02a09aae694659eb312d3838367f681d1b30
|
||||||
Install:
|
Install:
|
||||||
copy: .
|
copy: .
|
||||||
^SupportDir|Content/ra/v2/cnc/desert.mix: DESERT.MIX
|
^SupportDir|Content/ra/v2/cnc/desert.mix: DESERT.MIX
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
origin: C&C The Ultimate Collection (Origin version, English)
|
origin: C&C The Ultimate Collection (Origin version, English)
|
||||||
Type: Install
|
Type: RegistryDirectory
|
||||||
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
RegistryPrefixes: HKEY_LOCAL_MACHINE\Software\, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
|
||||||
RegistryKey: EA Games\Command and Conquer Tiberian Sun
|
RegistryKey: EA Games\Command and Conquer Tiberian Sun
|
||||||
RegistryValue: Install Dir
|
RegistryValue: Install Dir
|
||||||
|
|||||||
Reference in New Issue
Block a user