Fix paradox launcher root directory
This commit is contained in:
parent
bb7af1b8b1
commit
d19a270d7c
1 changed files with 5 additions and 8 deletions
|
@ -122,26 +122,23 @@ namespace CreamInstaller
|
||||||
{
|
{
|
||||||
progress.Report(++curProgress);
|
progress.Report(++curProgress);
|
||||||
if (Program.ProgramSelections.Any(selection => selection.ProgramName == node.Name)) { continue; }
|
if (Program.ProgramSelections.Any(selection => selection.ProgramName == node.Name)) { continue; }
|
||||||
string rootDirectory;
|
string rootDirectory = null;
|
||||||
List<string> directories = null;
|
List<string> directories = null;
|
||||||
if (node.Name == "Paradox Launcher")
|
if (node.Name == "Paradox Launcher")
|
||||||
{
|
{
|
||||||
rootDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
rootDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Programs\\Paradox Interactive";
|
||||||
string launcherDirectory = rootDirectory + "\\Programs\\Paradox Interactive";
|
if (Directory.Exists(rootDirectory))
|
||||||
if (Directory.Exists(launcherDirectory))
|
|
||||||
{
|
{
|
||||||
directories = GetSteamApiDllDirectoriesFromGameDirectory(launcherDirectory);
|
directories = GetSteamApiDllDirectoriesFromGameDirectory(rootDirectory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rootDirectory = null;
|
|
||||||
directories = null;
|
|
||||||
foreach (string libraryDirectory in GameLibraryDirectories)
|
foreach (string libraryDirectory in GameLibraryDirectories)
|
||||||
{
|
{
|
||||||
if (Program.Canceled) { return; }
|
if (Program.Canceled) { return; }
|
||||||
rootDirectory = GetGameDirectoryFromLibraryDirectory(node.Name, libraryDirectory);
|
rootDirectory = GetGameDirectoryFromLibraryDirectory(node.Name, libraryDirectory);
|
||||||
if (rootDirectory != null)
|
if (Directory.Exists(rootDirectory))
|
||||||
{
|
{
|
||||||
directories = GetSteamApiDllDirectoriesFromGameDirectory(rootDirectory);
|
directories = GetSteamApiDllDirectoriesFromGameDirectory(rootDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue