minor string changes
This commit is contained in:
parent
812717c907
commit
e73af9c94d
11 changed files with 229 additions and 229 deletions
|
@ -51,11 +51,11 @@ internal static class EpicLibrary
|
|||
{
|
||||
List<string> dllDirectories = new();
|
||||
if (Program.Canceled || !Directory.Exists(gameDirectory)) return null;
|
||||
gameDirectory.GetScreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32)
|
||||
|| File.Exists(sdk32_o)
|
||||
|| File.Exists(sdk64)
|
||||
|| File.Exists(sdk64_o)
|
||||
gameDirectory.GetScreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32)
|
||||
|| File.Exists(api32_o)
|
||||
|| File.Exists(api64)
|
||||
|| File.Exists(api64_o)
|
||||
|| File.Exists(config))
|
||||
dllDirectories.Add(gameDirectory);
|
||||
string[] directories = Directory.GetDirectories(gameDirectory);
|
||||
|
|
|
@ -70,8 +70,8 @@ internal partial class InstallForm : CustomForm
|
|||
if (selection.Platform is Platform.Steam && selection.SelectedDlc.Any(d => d.Value.type is DlcType.Steam or DlcType.SteamHidden)
|
||||
|| selection.ExtraSelectedDlc.Any(item => item.dlc.Any(dlc => dlc.Value.type is DlcType.Steam or DlcType.SteamHidden)))
|
||||
{
|
||||
directory.GetSmokeApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config, out string cache);
|
||||
if (File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config) || File.Exists(cache))
|
||||
directory.GetSmokeApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config, out string cache);
|
||||
if (File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config) || File.Exists(cache))
|
||||
{
|
||||
UpdateUser($"{(Uninstalling ? "Uninstalling" : "Installing")} SmokeAPI" +
|
||||
$" {(Uninstalling ? "from" : "for")} " + selection.Name + $" in directory \"{directory}\" . . . ", InstallationLog.Operation);
|
||||
|
@ -84,8 +84,8 @@ internal partial class InstallForm : CustomForm
|
|||
if (selection.Platform is Platform.Epic && selection.SelectedDlc.Any(d => d.Value.type is DlcType.EpicCatalogItem or DlcType.EpicEntitlement)
|
||||
|| selection.ExtraSelectedDlc.Any(item => item.dlc.Any(dlc => dlc.Value.type is DlcType.EpicCatalogItem or DlcType.EpicEntitlement)))
|
||||
{
|
||||
directory.GetScreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config))
|
||||
directory.GetScreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config))
|
||||
{
|
||||
UpdateUser($"{(Uninstalling ? "Uninstalling" : "Installing")} ScreamAPI" +
|
||||
$" {(Uninstalling ? "from" : "for")} " + selection.Name + $" in directory \"{directory}\" . . . ", InstallationLog.Operation);
|
||||
|
@ -97,8 +97,8 @@ internal partial class InstallForm : CustomForm
|
|||
}
|
||||
if (selection.Platform is Platform.Ubisoft)
|
||||
{
|
||||
directory.GetUplayR1Components(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config))
|
||||
directory.GetUplayR1Components(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config))
|
||||
{
|
||||
UpdateUser($"{(Uninstalling ? "Uninstalling" : "Installing")} Uplay R1 Unlocker" +
|
||||
$" {(Uninstalling ? "from" : "for")} " + selection.Name + $" in directory \"{directory}\" . . . ", InstallationLog.Operation);
|
||||
|
@ -107,8 +107,8 @@ internal partial class InstallForm : CustomForm
|
|||
else
|
||||
await UplayR1.Install(directory, selection, this);
|
||||
}
|
||||
directory.GetUplayR2Components(out string old_sdk32, out string old_sdk64, out sdk32, out sdk32_o, out sdk64, out sdk64_o, out config);
|
||||
if (File.Exists(old_sdk32) || File.Exists(old_sdk64) || File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config))
|
||||
directory.GetUplayR2Components(out string old_api32, out string old_api64, out api32, out api32_o, out api64, out api64_o, out config);
|
||||
if (File.Exists(old_api32) || File.Exists(old_api64) || File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config))
|
||||
{
|
||||
UpdateUser($"{(Uninstalling ? "Uninstalling" : "Installing")} Uplay R2 Unlocker" +
|
||||
$" {(Uninstalling ? "from" : "for")} " + selection.Name + $" in directory \"{directory}\" . . . ", InstallationLog.Operation);
|
||||
|
|
|
@ -718,29 +718,29 @@ internal partial class SelectForm : CustomForm
|
|||
if (selection.Platform is Platform.Steam or Platform.Paradox)
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
directory.GetSmokeApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config, out string cache);
|
||||
if (File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config) || File.Exists(cache))
|
||||
directory.GetSmokeApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config, out string cache);
|
||||
if (File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config) || File.Exists(cache))
|
||||
contextMenuStrip.Items.Add(new ContextMenuItem($"Open Steamworks Directory #{++steam}", "File Explorer",
|
||||
new EventHandler((sender, e) => Diagnostics.OpenDirectoryInFileExplorer(directory))));
|
||||
}
|
||||
if (selection.Platform is Platform.Epic or Platform.Paradox)
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
directory.GetScreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config))
|
||||
directory.GetScreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config))
|
||||
contextMenuStrip.Items.Add(new ContextMenuItem($"Open Epic Online Services Directory #{++epic}", "File Explorer",
|
||||
new EventHandler((sender, e) => Diagnostics.OpenDirectoryInFileExplorer(directory))));
|
||||
}
|
||||
if (selection.Platform is Platform.Ubisoft)
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
directory.GetUplayR1Components(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config))
|
||||
contextMenuStrip.Items.Add(new ContextMenuItem($"Open Uplay R1 SDK Directory #{++r1}", "File Explorer",
|
||||
directory.GetUplayR1Components(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config))
|
||||
contextMenuStrip.Items.Add(new ContextMenuItem($"Open Uplay R1 Directory #{++r1}", "File Explorer",
|
||||
new EventHandler((sender, e) => Diagnostics.OpenDirectoryInFileExplorer(directory))));
|
||||
directory.GetUplayR2Components(out string old_sdk32, out string old_sdk64, out sdk32, out sdk32_o, out sdk64, out sdk64_o, out config);
|
||||
if (File.Exists(old_sdk32) || File.Exists(old_sdk64) || File.Exists(sdk32) || File.Exists(sdk32_o) || File.Exists(sdk64) || File.Exists(sdk64_o) || File.Exists(config))
|
||||
contextMenuStrip.Items.Add(new ContextMenuItem($"Open Uplay R2 SDK Directory #{++r2}", "File Explorer",
|
||||
directory.GetUplayR2Components(out string old_api32, out string old_api64, out api32, out api32_o, out api64, out api64_o, out config);
|
||||
if (File.Exists(old_api32) || File.Exists(old_api64) || File.Exists(api32) || File.Exists(api32_o) || File.Exists(api64) || File.Exists(api64_o) || File.Exists(config))
|
||||
contextMenuStrip.Items.Add(new ContextMenuItem($"Open Uplay R2 Directory #{++r2}", "File Explorer",
|
||||
new EventHandler((sender, e) => Diagnostics.OpenDirectoryInFileExplorer(directory))));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,21 +89,21 @@ internal static class ParadoxLauncher
|
|||
byte[] epicOriginalSdk64 = null;
|
||||
foreach (string directory in selection.DllDirectories)
|
||||
{
|
||||
directory.GetSmokeApiComponents(out string sdk32, out _, out string sdk64, out _, out string config, out _);
|
||||
directory.GetSmokeApiComponents(out string api32, out _, out string api64, out _, out string config, out _);
|
||||
smokeConfig = smokeConfig || File.Exists(config);
|
||||
await SmokeAPI.Uninstall(directory, deleteConfig: false);
|
||||
if (steamOriginalSdk32 is null && File.Exists(sdk32) && !sdk32.IsResourceFile(ResourceIdentifier.Steamworks32))
|
||||
steamOriginalSdk32 = File.ReadAllBytes(sdk32);
|
||||
if (steamOriginalSdk64 is null && File.Exists(sdk64) && !sdk64.IsResourceFile(ResourceIdentifier.Steamworks64))
|
||||
steamOriginalSdk64 = File.ReadAllBytes(sdk64);
|
||||
if (steamOriginalSdk32 is null && File.Exists(api32) && !api32.IsResourceFile(ResourceIdentifier.Steamworks32))
|
||||
steamOriginalSdk32 = File.ReadAllBytes(api32);
|
||||
if (steamOriginalSdk64 is null && File.Exists(api64) && !api64.IsResourceFile(ResourceIdentifier.Steamworks64))
|
||||
steamOriginalSdk64 = File.ReadAllBytes(api64);
|
||||
|
||||
directory.GetScreamApiComponents(out sdk32, out _, out sdk64, out _, out config);
|
||||
directory.GetScreamApiComponents(out api32, out _, out api64, out _, out config);
|
||||
screamConfig = screamConfig || File.Exists(config);
|
||||
await ScreamAPI.Uninstall(directory, deleteConfig: false);
|
||||
if (epicOriginalSdk32 is null && File.Exists(sdk32) && !sdk32.IsResourceFile(ResourceIdentifier.EpicOnlineServices32))
|
||||
epicOriginalSdk32 = File.ReadAllBytes(sdk32);
|
||||
if (epicOriginalSdk64 is null && File.Exists(sdk64) && !sdk64.IsResourceFile(ResourceIdentifier.EpicOnlineServices64))
|
||||
epicOriginalSdk64 = File.ReadAllBytes(sdk64);
|
||||
if (epicOriginalSdk32 is null && File.Exists(api32) && !api32.IsResourceFile(ResourceIdentifier.EpicOnlineServices32))
|
||||
epicOriginalSdk32 = File.ReadAllBytes(api32);
|
||||
if (epicOriginalSdk64 is null && File.Exists(api64) && !api64.IsResourceFile(ResourceIdentifier.EpicOnlineServices64))
|
||||
epicOriginalSdk64 = File.ReadAllBytes(api64);
|
||||
}
|
||||
using DialogForm dialogForm = new(form);
|
||||
if (steamOriginalSdk32 is not null || steamOriginalSdk64 is not null || epicOriginalSdk32 is not null || epicOriginalSdk64 is not null)
|
||||
|
@ -111,37 +111,37 @@ internal static class ParadoxLauncher
|
|||
bool neededRepair = false;
|
||||
foreach (string directory in selection.DllDirectories)
|
||||
{
|
||||
directory.GetSmokeApiComponents(out string sdk32, out _, out string sdk64, out _, out _, out _);
|
||||
if (steamOriginalSdk32 is not null && sdk32.IsResourceFile(ResourceIdentifier.Steamworks32))
|
||||
directory.GetSmokeApiComponents(out string api32, out _, out string api64, out _, out _, out _);
|
||||
if (steamOriginalSdk32 is not null && api32.IsResourceFile(ResourceIdentifier.Steamworks32))
|
||||
{
|
||||
steamOriginalSdk32.Write(sdk32);
|
||||
steamOriginalSdk32.Write(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser("Corrected Steamworks: " + sdk32, InstallationLog.Action);
|
||||
installForm.UpdateUser("Corrected Steamworks: " + api32, InstallationLog.Action);
|
||||
neededRepair = true;
|
||||
}
|
||||
if (steamOriginalSdk64 is not null && sdk64.IsResourceFile(ResourceIdentifier.Steamworks64))
|
||||
if (steamOriginalSdk64 is not null && api64.IsResourceFile(ResourceIdentifier.Steamworks64))
|
||||
{
|
||||
steamOriginalSdk64.Write(sdk64);
|
||||
steamOriginalSdk64.Write(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser("Corrected Steamworks: " + sdk64, InstallationLog.Action);
|
||||
installForm.UpdateUser("Corrected Steamworks: " + api64, InstallationLog.Action);
|
||||
neededRepair = true;
|
||||
}
|
||||
if (smokeConfig)
|
||||
await SmokeAPI.Install(directory, selection, generateConfig: false);
|
||||
|
||||
directory.GetScreamApiComponents(out sdk32, out _, out sdk64, out _, out _);
|
||||
if (epicOriginalSdk32 is not null && sdk32.IsResourceFile(ResourceIdentifier.EpicOnlineServices32))
|
||||
directory.GetScreamApiComponents(out api32, out _, out api64, out _, out _);
|
||||
if (epicOriginalSdk32 is not null && api32.IsResourceFile(ResourceIdentifier.EpicOnlineServices32))
|
||||
{
|
||||
epicOriginalSdk32.Write(sdk32);
|
||||
epicOriginalSdk32.Write(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser("Corrected Epic Online Services: " + sdk32, InstallationLog.Action);
|
||||
installForm.UpdateUser("Corrected Epic Online Services: " + api32, InstallationLog.Action);
|
||||
neededRepair = true;
|
||||
}
|
||||
if (epicOriginalSdk64 is not null && sdk64.IsResourceFile(ResourceIdentifier.EpicOnlineServices64))
|
||||
if (epicOriginalSdk64 is not null && api64.IsResourceFile(ResourceIdentifier.EpicOnlineServices64))
|
||||
{
|
||||
epicOriginalSdk64.Write(sdk64);
|
||||
epicOriginalSdk64.Write(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser("Corrected Epic Online Services: " + sdk64, InstallationLog.Action);
|
||||
installForm.UpdateUser("Corrected Epic Online Services: " + api64, InstallationLog.Action);
|
||||
neededRepair = true;
|
||||
}
|
||||
if (screamConfig)
|
||||
|
@ -168,10 +168,10 @@ internal static class ParadoxLauncher
|
|||
{
|
||||
_ = form is InstallForm
|
||||
? throw new CustomMessageException("Repair failed! " +
|
||||
"An original Steamworks/Epic Online Services SDK file could not be found. " +
|
||||
"An original Steamworks and/or Epic Online Services file could not be found. " +
|
||||
"You will likely have to reinstall Paradox Launcher to fix this issue.")
|
||||
: dialogForm.Show(SystemIcons.Error, "Paradox Launcher repair failed!"
|
||||
+ "\n\nAn original Steamworks/Epic Online Services SDK file could not be found."
|
||||
+ "\n\nAn original Steamworks and/or Epic Online Services SDK file could not be found."
|
||||
+ "\nYou will likely have to reinstall Paradox Launcher to fix this issue.", "OK", customFormText: "Paradox Launcher");
|
||||
return RepairResult.Failure;
|
||||
}
|
||||
|
|
|
@ -57,48 +57,48 @@ internal class ProgramSelection
|
|||
{
|
||||
if (Platform is Platform.Steam or Platform.Paradox)
|
||||
{
|
||||
directory.GetCreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (sdk32.IsFilePathLocked()
|
||||
|| sdk32_o.IsFilePathLocked()
|
||||
|| sdk64.IsFilePathLocked()
|
||||
|| sdk64_o.IsFilePathLocked()
|
||||
directory.GetCreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (api32.IsFilePathLocked()
|
||||
|| api32_o.IsFilePathLocked()
|
||||
|| api64.IsFilePathLocked()
|
||||
|| api64_o.IsFilePathLocked()
|
||||
|| config.IsFilePathLocked())
|
||||
return true;
|
||||
directory.GetSmokeApiComponents(out sdk32, out sdk32_o, out sdk64, out sdk64_o, out config, out string cache);
|
||||
if (sdk32.IsFilePathLocked()
|
||||
|| sdk32_o.IsFilePathLocked()
|
||||
|| sdk64.IsFilePathLocked()
|
||||
|| sdk64_o.IsFilePathLocked()
|
||||
directory.GetSmokeApiComponents(out api32, out api32_o, out api64, out api64_o, out config, out string cache);
|
||||
if (api32.IsFilePathLocked()
|
||||
|| api32_o.IsFilePathLocked()
|
||||
|| api64.IsFilePathLocked()
|
||||
|| api64_o.IsFilePathLocked()
|
||||
|| config.IsFilePathLocked()
|
||||
|| cache.IsFilePathLocked())
|
||||
return true;
|
||||
}
|
||||
if (Platform is Platform.Epic or Platform.Paradox)
|
||||
{
|
||||
directory.GetScreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (sdk32.IsFilePathLocked()
|
||||
|| sdk32_o.IsFilePathLocked()
|
||||
|| sdk64.IsFilePathLocked()
|
||||
|| sdk64_o.IsFilePathLocked()
|
||||
directory.GetScreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (api32.IsFilePathLocked()
|
||||
|| api32_o.IsFilePathLocked()
|
||||
|| api64.IsFilePathLocked()
|
||||
|| api64_o.IsFilePathLocked()
|
||||
|| config.IsFilePathLocked())
|
||||
return true;
|
||||
}
|
||||
if (Platform is Platform.Ubisoft)
|
||||
{
|
||||
directory.GetUplayR1Components(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (sdk32.IsFilePathLocked()
|
||||
|| sdk32_o.IsFilePathLocked()
|
||||
|| sdk64.IsFilePathLocked()
|
||||
|| sdk64_o.IsFilePathLocked()
|
||||
directory.GetUplayR1Components(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (api32.IsFilePathLocked()
|
||||
|| api32_o.IsFilePathLocked()
|
||||
|| api64.IsFilePathLocked()
|
||||
|| api64_o.IsFilePathLocked()
|
||||
|| config.IsFilePathLocked())
|
||||
return true;
|
||||
directory.GetUplayR2Components(out string old_sdk32, out string old_sdk64, out sdk32, out sdk32_o, out sdk64, out sdk64_o, out config);
|
||||
if (old_sdk32.IsFilePathLocked()
|
||||
|| old_sdk64.IsFilePathLocked()
|
||||
|| sdk32.IsFilePathLocked()
|
||||
|| sdk32_o.IsFilePathLocked()
|
||||
|| sdk64.IsFilePathLocked()
|
||||
|| sdk64_o.IsFilePathLocked()
|
||||
directory.GetUplayR2Components(out string old_api32, out string old_api64, out api32, out api32_o, out api64, out api64_o, out config);
|
||||
if (old_api32.IsFilePathLocked()
|
||||
|| old_api64.IsFilePathLocked()
|
||||
|| api32.IsFilePathLocked()
|
||||
|| api32_o.IsFilePathLocked()
|
||||
|| api64.IsFilePathLocked()
|
||||
|| api64_o.IsFilePathLocked()
|
||||
|| config.IsFilePathLocked())
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,14 +10,14 @@ internal static class Resources
|
|||
{
|
||||
internal static void GetCreamApiComponents(
|
||||
this string directory,
|
||||
out string sdk32, out string sdk32_o,
|
||||
out string sdk64, out string sdk64_o,
|
||||
out string api32, out string api32_o,
|
||||
out string api64, out string api64_o,
|
||||
out string config)
|
||||
{
|
||||
sdk32 = directory + @"\steam_api.dll";
|
||||
sdk32_o = directory + @"\steam_api_o.dll";
|
||||
sdk64 = directory + @"\steam_api64.dll";
|
||||
sdk64_o = directory + @"\steam_api64_o.dll";
|
||||
api32 = directory + @"\steam_api.dll";
|
||||
api32_o = directory + @"\steam_api_o.dll";
|
||||
api64 = directory + @"\steam_api64.dll";
|
||||
api64_o = directory + @"\steam_api64_o.dll";
|
||||
config = directory + @"\cream_api.ini";
|
||||
}
|
||||
|
||||
|
|
|
@ -13,15 +13,15 @@ internal static class ScreamAPI
|
|||
{
|
||||
internal static void GetScreamApiComponents(
|
||||
this string directory,
|
||||
out string sdk32, out string sdk32_o,
|
||||
out string sdk64, out string sdk64_o,
|
||||
out string api32, out string api32_o,
|
||||
out string api64, out string api64_o,
|
||||
out string config
|
||||
)
|
||||
{
|
||||
sdk32 = directory + @"\EOSSDK-Win32-Shipping.dll";
|
||||
sdk32_o = directory + @"\EOSSDK-Win32-Shipping_o.dll";
|
||||
sdk64 = directory + @"\EOSSDK-Win64-Shipping.dll";
|
||||
sdk64_o = directory + @"\EOSSDK-Win64-Shipping_o.dll";
|
||||
api32 = directory + @"\EOSSDK-Win32-Shipping.dll";
|
||||
api32_o = directory + @"\EOSSDK-Win32-Shipping_o.dll";
|
||||
api64 = directory + @"\EOSSDK-Win64-Shipping.dll";
|
||||
api64_o = directory + @"\EOSSDK-Win64-Shipping_o.dll";
|
||||
config = directory + @"\ScreamAPI.json";
|
||||
}
|
||||
|
||||
|
@ -76,30 +76,30 @@ internal static class ScreamAPI
|
|||
|
||||
internal static async Task Uninstall(string directory, InstallForm installForm = null, bool deleteConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetScreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32_o))
|
||||
directory.GetScreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
if (File.Exists(sdk32))
|
||||
if (File.Exists(api32))
|
||||
{
|
||||
File.Delete(sdk32);
|
||||
File.Delete(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted ScreamAPI: {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted ScreamAPI: {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk32_o, sdk32);
|
||||
File.Move(api32_o, api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Epic Online Services: {Path.GetFileName(sdk32_o)} -> {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Epic Online Services: {Path.GetFileName(api32_o)} -> {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
if (File.Exists(sdk64))
|
||||
if (File.Exists(api64))
|
||||
{
|
||||
File.Delete(sdk64);
|
||||
File.Delete(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted ScreamAPI: {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted ScreamAPI: {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk64_o, sdk64);
|
||||
File.Move(api64_o, api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Epic Online Services: {Path.GetFileName(sdk64_o)} -> {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Epic Online Services: {Path.GetFileName(api64_o)} -> {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (deleteConfig && File.Exists(config))
|
||||
{
|
||||
|
@ -111,30 +111,30 @@ internal static class ScreamAPI
|
|||
|
||||
internal static async Task Install(string directory, ProgramSelection selection, InstallForm installForm = null, bool generateConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetScreamApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32) && !File.Exists(sdk32_o))
|
||||
directory.GetScreamApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32) && !File.Exists(api32_o))
|
||||
{
|
||||
File.Move(sdk32, sdk32_o);
|
||||
File.Move(api32, api32_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Epic Online Services: {Path.GetFileName(sdk32)} -> {Path.GetFileName(sdk32_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Epic Online Services: {Path.GetFileName(api32)} -> {Path.GetFileName(api32_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk32_o))
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
Properties.Resources.EpicOnlineServices32.Write(sdk32);
|
||||
Properties.Resources.EpicOnlineServices32.Write(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote ScreamAPI: {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote ScreamAPI: {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64) && !File.Exists(sdk64_o))
|
||||
if (File.Exists(api64) && !File.Exists(api64_o))
|
||||
{
|
||||
File.Move(sdk64, sdk64_o);
|
||||
File.Move(api64, api64_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Epic Online Services: {Path.GetFileName(sdk64)} -> {Path.GetFileName(sdk64_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Epic Online Services: {Path.GetFileName(api64)} -> {Path.GetFileName(api64_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
Properties.Resources.EpicOnlineServices64.Write(sdk64);
|
||||
Properties.Resources.EpicOnlineServices64.Write(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote ScreamAPI: {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote ScreamAPI: {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (generateConfig)
|
||||
{
|
||||
|
|
|
@ -13,15 +13,15 @@ internal static class SmokeAPI
|
|||
{
|
||||
internal static void GetSmokeApiComponents(
|
||||
this string directory,
|
||||
out string sdk32, out string sdk32_o,
|
||||
out string sdk64, out string sdk64_o,
|
||||
out string api32, out string api32_o,
|
||||
out string api64, out string api64_o,
|
||||
out string config,
|
||||
out string cache)
|
||||
{
|
||||
sdk32 = directory + @"\steam_api.dll";
|
||||
sdk32_o = directory + @"\steam_api_o.dll";
|
||||
sdk64 = directory + @"\steam_api64.dll";
|
||||
sdk64_o = directory + @"\steam_api64_o.dll";
|
||||
api32 = directory + @"\steam_api.dll";
|
||||
api32_o = directory + @"\steam_api_o.dll";
|
||||
api64 = directory + @"\steam_api64.dll";
|
||||
api64_o = directory + @"\steam_api64_o.dll";
|
||||
config = directory + @"\SmokeAPI.json";
|
||||
cache = directory + @"\SmokeAPI.cache.json";
|
||||
}
|
||||
|
@ -72,30 +72,30 @@ internal static class SmokeAPI
|
|||
|
||||
internal static async Task Uninstall(string directory, InstallForm installForm = null, bool deleteConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetSmokeApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config, out string cache);
|
||||
if (File.Exists(sdk32_o))
|
||||
directory.GetSmokeApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config, out string cache);
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
if (File.Exists(sdk32))
|
||||
if (File.Exists(api32))
|
||||
{
|
||||
File.Delete(sdk32);
|
||||
File.Delete(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted SmokeAPI: {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted SmokeAPI: {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk32_o, sdk32);
|
||||
File.Move(api32_o, api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Steamworks: {Path.GetFileName(sdk32_o)} -> {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Steamworks: {Path.GetFileName(api32_o)} -> {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
if (File.Exists(sdk64))
|
||||
if (File.Exists(api64))
|
||||
{
|
||||
File.Delete(sdk64);
|
||||
File.Delete(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted SmokeAPI: {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted SmokeAPI: {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk64_o, sdk64);
|
||||
File.Move(api64_o, api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Steamworks: {Path.GetFileName(sdk64_o)} -> {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Steamworks: {Path.GetFileName(api64_o)} -> {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (deleteConfig && File.Exists(config))
|
||||
{
|
||||
|
@ -120,30 +120,30 @@ internal static class SmokeAPI
|
|||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted old CreamAPI configuration: {Path.GetFileName(oldConfig)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
directory.GetSmokeApiComponents(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config, out _);
|
||||
if (File.Exists(sdk32) && !File.Exists(sdk32_o))
|
||||
directory.GetSmokeApiComponents(out string api32, out string api32_o, out string api64, out string api64_o, out string config, out _);
|
||||
if (File.Exists(api32) && !File.Exists(api32_o))
|
||||
{
|
||||
File.Move(sdk32, sdk32_o);
|
||||
File.Move(api32, api32_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Steamworks: {Path.GetFileName(sdk32)} -> {Path.GetFileName(sdk32_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Steamworks: {Path.GetFileName(api32)} -> {Path.GetFileName(api32_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk32_o))
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
Properties.Resources.Steamworks32.Write(sdk32);
|
||||
Properties.Resources.Steamworks32.Write(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote SmokeAPI: {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote SmokeAPI: {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64) && !File.Exists(sdk64_o))
|
||||
if (File.Exists(api64) && !File.Exists(api64_o))
|
||||
{
|
||||
File.Move(sdk64, sdk64_o);
|
||||
File.Move(api64, api64_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Steamworks: {Path.GetFileName(sdk64)} -> {Path.GetFileName(sdk64_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Steamworks: {Path.GetFileName(api64)} -> {Path.GetFileName(api64_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
Properties.Resources.Steamworks64.Write(sdk64);
|
||||
Properties.Resources.Steamworks64.Write(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote SmokeAPI: {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote SmokeAPI: {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (generateConfig)
|
||||
{
|
||||
|
|
|
@ -13,15 +13,15 @@ internal static class UplayR1
|
|||
{
|
||||
internal static void GetUplayR1Components(
|
||||
this string directory,
|
||||
out string sdk32, out string sdk32_o,
|
||||
out string sdk64, out string sdk64_o,
|
||||
out string api32, out string api32_o,
|
||||
out string api64, out string api64_o,
|
||||
out string config
|
||||
)
|
||||
{
|
||||
sdk32 = directory + @"\uplay_r1_loader.dll";
|
||||
sdk32_o = directory + @"\uplay_r1_loader_o.dll";
|
||||
sdk64 = directory + @"\uplay_r1_loader64.dll";
|
||||
sdk64_o = directory + @"\uplay_r1_loader64_o.dll";
|
||||
api32 = directory + @"\uplay_r1_loader.dll";
|
||||
api32_o = directory + @"\uplay_r1_loader_o.dll";
|
||||
api64 = directory + @"\uplay_r1_loader64.dll";
|
||||
api64_o = directory + @"\uplay_r1_loader64_o.dll";
|
||||
config = directory + @"\UplayR1Unlocker.jsonc";
|
||||
}
|
||||
|
||||
|
@ -52,30 +52,30 @@ internal static class UplayR1
|
|||
|
||||
internal static async Task Uninstall(string directory, InstallForm installForm = null, bool deleteConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetUplayR1Components(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32_o))
|
||||
directory.GetUplayR1Components(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
if (File.Exists(sdk32))
|
||||
if (File.Exists(api32))
|
||||
{
|
||||
File.Delete(sdk32);
|
||||
File.Delete(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted Uplay R1 Unlocker: {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted Uplay R1 Unlocker: {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk32_o, sdk32);
|
||||
File.Move(api32_o, api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Uplay R1: {Path.GetFileName(sdk32_o)} -> {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Uplay R1: {Path.GetFileName(api32_o)} -> {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
if (File.Exists(sdk64))
|
||||
if (File.Exists(api64))
|
||||
{
|
||||
File.Delete(sdk64);
|
||||
File.Delete(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted Uplay R1 Unlocker: {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted Uplay R1 Unlocker: {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk64_o, sdk64);
|
||||
File.Move(api64_o, api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Uplay R1: {Path.GetFileName(sdk64_o)} -> {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Uplay R1: {Path.GetFileName(api64_o)} -> {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (deleteConfig && File.Exists(config))
|
||||
{
|
||||
|
@ -87,30 +87,30 @@ internal static class UplayR1
|
|||
|
||||
internal static async Task Install(string directory, ProgramSelection selection, InstallForm installForm = null, bool generateConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetUplayR1Components(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32) && !File.Exists(sdk32_o))
|
||||
directory.GetUplayR1Components(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32) && !File.Exists(api32_o))
|
||||
{
|
||||
File.Move(sdk32, sdk32_o);
|
||||
File.Move(api32, api32_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Uplay R1: {Path.GetFileName(sdk32)} -> {Path.GetFileName(sdk32_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Uplay R1: {Path.GetFileName(api32)} -> {Path.GetFileName(api32_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk32_o))
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
Properties.Resources.Uplay32.Write(sdk32);
|
||||
Properties.Resources.Uplay32.Write(api32);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote Uplay R1 Unlocker: {Path.GetFileName(sdk32)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote Uplay R1 Unlocker: {Path.GetFileName(api32)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64) && !File.Exists(sdk64_o))
|
||||
if (File.Exists(api64) && !File.Exists(api64_o))
|
||||
{
|
||||
File.Move(sdk64, sdk64_o);
|
||||
File.Move(api64, api64_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Uplay R1: {Path.GetFileName(sdk64)} -> {Path.GetFileName(sdk64_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Uplay R1: {Path.GetFileName(api64)} -> {Path.GetFileName(api64_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
Properties.Resources.Uplay64.Write(sdk64);
|
||||
Properties.Resources.Uplay64.Write(api64);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote Uplay R1 Unlocker: {Path.GetFileName(sdk64)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote Uplay R1 Unlocker: {Path.GetFileName(api64)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (generateConfig)
|
||||
{
|
||||
|
|
|
@ -13,17 +13,17 @@ internal static class UplayR2
|
|||
{
|
||||
internal static void GetUplayR2Components(
|
||||
this string directory,
|
||||
out string old_sdk32, out string old_sdk64,
|
||||
out string sdk32, out string sdk32_o,
|
||||
out string sdk64, out string sdk64_o,
|
||||
out string old_api32, out string old_api64,
|
||||
out string api32, out string api32_o,
|
||||
out string api64, out string api64_o,
|
||||
out string config)
|
||||
{
|
||||
old_sdk32 = directory + @"\uplay_r2_loader.dll";
|
||||
old_sdk64 = directory + @"\uplay_r2_loader64.dll";
|
||||
sdk32 = directory + @"\upc_r2_loader.dll";
|
||||
sdk32_o = directory + @"\upc_r2_loader_o.dll";
|
||||
sdk64 = directory + @"\upc_r2_loader64.dll";
|
||||
sdk64_o = directory + @"\upc_r2_loader64_o.dll";
|
||||
old_api32 = directory + @"\uplay_r2_loader.dll";
|
||||
old_api64 = directory + @"\uplay_r2_loader64.dll";
|
||||
api32 = directory + @"\upc_r2_loader.dll";
|
||||
api32_o = directory + @"\upc_r2_loader_o.dll";
|
||||
api64 = directory + @"\upc_r2_loader64.dll";
|
||||
api64_o = directory + @"\upc_r2_loader64_o.dll";
|
||||
config = directory + @"\UplayR2Unlocker.jsonc";
|
||||
}
|
||||
|
||||
|
@ -56,32 +56,32 @@ internal static class UplayR2
|
|||
|
||||
internal static async Task Uninstall(string directory, InstallForm installForm = null, bool deleteConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetUplayR2Components(out string old_sdk32, out string old_sdk64, out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32_o))
|
||||
directory.GetUplayR2Components(out string old_api32, out string old_api64, out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
string sdk = File.Exists(old_sdk32) ? old_sdk32 : sdk32;
|
||||
if (File.Exists(sdk))
|
||||
string api = File.Exists(old_api32) ? old_api32 : api32;
|
||||
if (File.Exists(api))
|
||||
{
|
||||
File.Delete(sdk);
|
||||
File.Delete(api);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted Uplay R2 Unlocker: {Path.GetFileName(sdk)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted Uplay R2 Unlocker: {Path.GetFileName(api)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk32_o, sdk);
|
||||
File.Move(api32_o, api);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Uplay R2: {Path.GetFileName(sdk32_o)} -> {Path.GetFileName(sdk)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Uplay R2: {Path.GetFileName(api32_o)} -> {Path.GetFileName(api)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
string sdk = File.Exists(old_sdk64) ? old_sdk64 : sdk64;
|
||||
if (File.Exists(sdk))
|
||||
string api = File.Exists(old_api64) ? old_api64 : api64;
|
||||
if (File.Exists(api))
|
||||
{
|
||||
File.Delete(sdk);
|
||||
File.Delete(api);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Deleted Uplay R2 Unlocker: {Path.GetFileName(sdk)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Deleted Uplay R2 Unlocker: {Path.GetFileName(api)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
File.Move(sdk64_o, sdk);
|
||||
File.Move(api64_o, api);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Restored Uplay R2: {Path.GetFileName(sdk64_o)} -> {Path.GetFileName(sdk)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Restored Uplay R2: {Path.GetFileName(api64_o)} -> {Path.GetFileName(api)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (deleteConfig && File.Exists(config))
|
||||
{
|
||||
|
@ -93,32 +93,32 @@ internal static class UplayR2
|
|||
|
||||
internal static async Task Install(string directory, ProgramSelection selection, InstallForm installForm = null, bool generateConfig = true) => await Task.Run(() =>
|
||||
{
|
||||
directory.GetUplayR2Components(out string old_sdk32, out string old_sdk64, out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
string sdk = File.Exists(old_sdk32) ? old_sdk32 : sdk32;
|
||||
if (File.Exists(sdk) && !File.Exists(sdk32_o))
|
||||
directory.GetUplayR2Components(out string old_api32, out string old_api64, out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
string api = File.Exists(old_api32) ? old_api32 : api32;
|
||||
if (File.Exists(api) && !File.Exists(api32_o))
|
||||
{
|
||||
File.Move(sdk, sdk32_o);
|
||||
File.Move(api, api32_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Uplay R2: {Path.GetFileName(sdk)} -> {Path.GetFileName(sdk32_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Uplay R2: {Path.GetFileName(api)} -> {Path.GetFileName(api32_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk32_o))
|
||||
if (File.Exists(api32_o))
|
||||
{
|
||||
Properties.Resources.Upc32.Write(sdk);
|
||||
Properties.Resources.Upc32.Write(api);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote Uplay R2 Unlocker: {Path.GetFileName(sdk)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote Uplay R2 Unlocker: {Path.GetFileName(api)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
sdk = File.Exists(old_sdk64) ? old_sdk64 : sdk64;
|
||||
if (File.Exists(sdk) && !File.Exists(sdk64_o))
|
||||
api = File.Exists(old_api64) ? old_api64 : api64;
|
||||
if (File.Exists(api) && !File.Exists(api64_o))
|
||||
{
|
||||
File.Move(sdk, sdk64_o);
|
||||
File.Move(api, api64_o);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Renamed Uplay R2: {Path.GetFileName(sdk)} -> {Path.GetFileName(sdk64_o)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Renamed Uplay R2: {Path.GetFileName(api)} -> {Path.GetFileName(api64_o)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (File.Exists(sdk64_o))
|
||||
if (File.Exists(api64_o))
|
||||
{
|
||||
Properties.Resources.Upc64.Write(sdk);
|
||||
Properties.Resources.Upc64.Write(api);
|
||||
if (installForm is not null)
|
||||
installForm.UpdateUser($"Wrote Uplay R2 Unlocker: {Path.GetFileName(sdk)}", InstallationLog.Action, info: false);
|
||||
installForm.UpdateUser($"Wrote Uplay R2 Unlocker: {Path.GetFileName(api)}", InstallationLog.Action, info: false);
|
||||
}
|
||||
if (generateConfig)
|
||||
{
|
||||
|
|
|
@ -41,22 +41,22 @@ internal static class UbisoftLibrary
|
|||
{
|
||||
List<string> dllDirectories = new();
|
||||
if (Program.Canceled || !Directory.Exists(gameDirectory)) return null;
|
||||
gameDirectory.GetUplayR1Components(out string sdk32, out string sdk32_o, out string sdk64, out string sdk64_o, out string config);
|
||||
if (File.Exists(sdk32)
|
||||
|| File.Exists(sdk32_o)
|
||||
|| File.Exists(sdk64)
|
||||
|| File.Exists(sdk64_o)
|
||||
gameDirectory.GetUplayR1Components(out string api32, out string api32_o, out string api64, out string api64_o, out string config);
|
||||
if (File.Exists(api32)
|
||||
|| File.Exists(api32_o)
|
||||
|| File.Exists(api64)
|
||||
|| File.Exists(api64_o)
|
||||
|| File.Exists(config))
|
||||
dllDirectories.Add(gameDirectory);
|
||||
else
|
||||
{
|
||||
gameDirectory.GetUplayR2Components(out string old_sdk32, out string old_sdk64, out sdk32, out sdk32_o, out sdk64, out sdk64_o, out config);
|
||||
if (File.Exists(old_sdk32)
|
||||
|| File.Exists(old_sdk64)
|
||||
|| File.Exists(sdk32)
|
||||
|| File.Exists(sdk32_o)
|
||||
|| File.Exists(sdk64)
|
||||
|| File.Exists(sdk64_o)
|
||||
gameDirectory.GetUplayR2Components(out string old_api32, out string old_api64, out api32, out api32_o, out api64, out api64_o, out config);
|
||||
if (File.Exists(old_api32)
|
||||
|| File.Exists(old_api64)
|
||||
|| File.Exists(api32)
|
||||
|| File.Exists(api32_o)
|
||||
|| File.Exists(api64)
|
||||
|| File.Exists(api64_o)
|
||||
|| File.Exists(config))
|
||||
dllDirectories.Add(gameDirectory);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue