- Minor refactoring
- Fixed an NRE from cancelling file writes
- Added more information to IO warnings
- Updated the help menu
- Added a custom program icon created by [Mattahan](https://www.mattahan.com)
This commit is contained in:
pointfeev 2023-10-31 18:03:25 -04:00
parent 0cca00b907
commit a840ad2b7b
14 changed files with 36 additions and 37 deletions

View file

@ -71,9 +71,9 @@ internal class CustomForm : Form
+ "a good majority of games, you must find, download and install those to the game yourself. This process includes manually installing new\n" + "a good majority of games, you must find, download and install those to the game yourself. This process includes manually installing new\n"
+ "DLCs and manually updating the previously manually installed DLCs after game updates.\n\n" + "DLCs and manually updating the previously manually installed DLCs after game updates.\n\n"
+ $"For reliable and quick assistance, all bugs, crashes and other issues should be referred to the [GitHub Issues]({repository}/issues) page!\n\n" + $"For reliable and quick assistance, all bugs, crashes and other issues should be referred to the [GitHub Issues]({repository}/issues) page!\n\n"
+ $"HOWEVER: Please read the [template issue]({repository}/issues/new/choose) corresponding to your problem should one exist! Also, note that the [GitHub Issues]({repository}/issues) page is not\n" + $"HOWEVER: Please read the [FAQ entry]({repository}/issues/new/choose) and/or [template issue]({repository}/issues/new/choose) corresponding to your problem should one exist! Also, note that the [GitHub Issues]({repository}/issues)\n"
+ "your personal assistance hotline, rather it is for genuine bugs/crashes/issues with the program itself. If you post an issue which has already\n" + "page is not your personal assistance hotline, rather it is for genuine bugs/crashes/issues with the program itself. If you post an issue which\n"
+ "been explained within the template issues and/or within this text, I will just close it.\n\n" + "has already been explained within the FAQ, template issues, and/or within this text in general, I will just close it and you will be ignored.\n\n"
+ "SteamCMD installation and appinfo cache can be found at [C:\\ProgramData\\CreamInstaller]().\n" + "SteamCMD installation and appinfo cache can be found at [C:\\ProgramData\\CreamInstaller]().\n"
+ $"The program automatically and very quickly updates from [GitHub]({repository}) by choice of the user through a dialog on startup.\n" + $"The program automatically and very quickly updates from [GitHub]({repository}) by choice of the user through a dialog on startup.\n"
+ $"The program source and other information can be found on [GitHub]({repository})."); + $"The program source and other information can be found on [GitHub]({repository}).");

View file

@ -3,8 +3,8 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.22621.0</TargetFramework> <TargetFramework>net7.0-windows10.0.22621.0</TargetFramework>
<UseWindowsForms>True</UseWindowsForms> <UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon> <ApplicationIcon>Resources\program.ico</ApplicationIcon>
<Version>4.9.9</Version> <Version>4.10.0</Version>
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright> <Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>
<Company>CreamInstaller</Company> <Company>CreamInstaller</Company>
<Product>Automatic DLC Unlocker Installer &amp; Configuration Generator</Product> <Product>Automatic DLC Unlocker Installer &amp; Configuration Generator</Product>
@ -91,6 +91,9 @@
<None Remove="Resources\UplayR2\upc_r2_loader.dll" /> <None Remove="Resources\UplayR2\upc_r2_loader.dll" />
<None Remove="Resources\UplayR2\upc_r2_loader64.dll" /> <None Remove="Resources\UplayR2\upc_r2_loader64.dll" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="Resources\program.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Resources\Koaloader\audioses-32\audioses.dll" /> <EmbeddedResource Include="Resources\Koaloader\audioses-32\audioses.dll" />
<EmbeddedResource Include="Resources\Koaloader\audioses-64\audioses.dll" /> <EmbeddedResource Include="Resources\Koaloader\audioses-64\audioses.dll" />

View file

@ -2,18 +2,18 @@
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
using CreamInstaller.Forms;
using CreamInstaller.Resources; using CreamInstaller.Resources;
using CreamInstaller.Utility; using CreamInstaller.Utility;
using Gameloop.Vdf.Linq; using Gameloop.Vdf.Linq;
#if DEBUG
using CreamInstaller.Forms;
#endif
namespace CreamInstaller.Platforms.Steam; namespace CreamInstaller.Platforms.Steam;

View file

@ -8,16 +8,10 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Globalization;
using System.Resources;
using System.Runtime.CompilerServices;
namespace CreamInstaller.Properties { namespace CreamInstaller.Properties {
using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
@ -25,27 +19,27 @@ namespace CreamInstaller.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[DebuggerNonUserCode()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[CompilerGenerated()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
private static ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() { internal Resources() {
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
ResourceManager temp = new ResourceManager("CreamInstaller.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CreamInstaller.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
@ -56,8 +50,8 @@ namespace CreamInstaller.Properties {
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static CultureInfo Culture { internal static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
@ -69,10 +63,10 @@ namespace CreamInstaller.Properties {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary> /// </summary>
internal static Icon Icon { internal static System.Drawing.Icon Icon {
get { get {
object obj = ResourceManager.GetObject("Icon", resourceCulture); object obj = ResourceManager.GetObject("Icon", resourceCulture);
return ((Icon)(obj)); return ((System.Drawing.Icon)(obj));
} }
} }
} }

View file

@ -119,6 +119,6 @@
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\ini.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\resources\program.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>

View file

@ -79,7 +79,7 @@ internal static class Koaloader
{ {
/*if (installForm is not null) /*if (installForm is not null)
installForm.UpdateUser("Generating Koaloader configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/ installForm.UpdateUser("Generating Koaloader configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/
config.CreateFile(true, installForm).Close(); config.CreateFile(true, installForm)?.Close();
StreamWriter writer = new(config, true, Encoding.UTF8); StreamWriter writer = new(config, true, Encoding.UTF8);
WriteConfig(writer, targets, modules, installForm); WriteConfig(writer, targets, modules, installForm);
writer.Flush(); writer.Flush();

View file

@ -51,7 +51,7 @@ internal static class ScreamAPI
{ {
/*if (installForm is not null) /*if (installForm is not null)
installForm.UpdateUser("Generating ScreamAPI configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/ installForm.UpdateUser("Generating ScreamAPI configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/
config.CreateFile(true, installForm).Close(); config.CreateFile(true, installForm)?.Close();
StreamWriter writer = new(config, true, Encoding.UTF8); StreamWriter writer = new(config, true, Encoding.UTF8);
WriteConfig(writer, new(overrideCatalogItems.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), WriteConfig(writer, new(overrideCatalogItems.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String),
new(injectedEntitlements.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), installForm); new(injectedEntitlements.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), installForm);

View file

@ -53,7 +53,7 @@ internal static class SmokeAPI
{ {
/*if (installForm is not null) /*if (installForm is not null)
installForm.UpdateUser("Generating SmokeAPI configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/ installForm.UpdateUser("Generating SmokeAPI configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/
config.CreateFile(true, installForm).Close(); config.CreateFile(true, installForm)?.Close();
StreamWriter writer = new(config, true, Encoding.UTF8); StreamWriter writer = new(config, true, Encoding.UTF8);
WriteConfig(writer, selection.Id, new(extraApps.ToDictionary(extraApp => extraApp.Key, extraApp => extraApp.Value), PlatformIdComparer.String), WriteConfig(writer, selection.Id, new(extraApps.ToDictionary(extraApp => extraApp.Key, extraApp => extraApp.Value), PlatformIdComparer.String),
new(overrideDlc.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), new(overrideDlc.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String),

View file

@ -32,7 +32,7 @@ internal static class UplayR1
{ {
/*if (installForm is not null) /*if (installForm is not null)
installForm.UpdateUser("Generating Uplay R1 Unlocker configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/ installForm.UpdateUser("Generating Uplay R1 Unlocker configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/
config.CreateFile(true, installForm).Close(); config.CreateFile(true, installForm)?.Close();
StreamWriter writer = new(config, true, Encoding.UTF8); StreamWriter writer = new(config, true, Encoding.UTF8);
WriteConfig(writer, new(blacklistDlc.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), installForm); WriteConfig(writer, new(blacklistDlc.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), installForm);
writer.Flush(); writer.Flush();

View file

@ -34,7 +34,7 @@ internal static class UplayR2
{ {
/*if (installForm is not null) /*if (installForm is not null)
installForm.UpdateUser("Generating Uplay R2 Unlocker configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/ installForm.UpdateUser("Generating Uplay R2 Unlocker configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", LogTextBox.Operation);*/
config.CreateFile(true, installForm).Close(); config.CreateFile(true, installForm)?.Close();
StreamWriter writer = new(config, true, Encoding.UTF8); StreamWriter writer = new(config, true, Encoding.UTF8);
WriteConfig(writer, new(blacklistDlc.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), installForm); WriteConfig(writer, new(blacklistDlc.ToDictionary(dlc => dlc.Id, dlc => dlc), PlatformIdComparer.String), installForm);
writer.Flush(); writer.Flush();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View file

@ -243,10 +243,12 @@ internal static class SafeIO
case 5: // ERROR_ACCESS_DENIED case 5: // ERROR_ACCESS_DENIED
case 32: // ERROR_SHARING_VIOLATION case 32: // ERROR_SHARING_VIOLATION
case 33: // ERROR_LOCK_VIOLATION case 33: // ERROR_LOCK_VIOLATION
description += e.Message + "\n\n";
description += "Please close the program/game and press retry to continue . . . "; description += "Please close the program/game and press retry to continue . . . ";
break; break;
case 225: // ERROR_VIRUS_INFECTED case 225: // ERROR_VIRUS_INFECTED
case 226: // ERROR_VIRUS_DELETED case 226: // ERROR_VIRUS_DELETED
description += e.Message + "\n\n";
description += "Please resolve your anti-virus and press retry to continue . . . "; description += "Please resolve your anti-virus and press retry to continue . . . ";
break; break;
default: default:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB