Skip to content

Commit

Permalink
split all functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rounk-ctrl committed Sep 20, 2023
1 parent 45d3f6c commit 58782c6
Show file tree
Hide file tree
Showing 5 changed files with 874 additions and 862 deletions.
8 changes: 6 additions & 2 deletions Rectify11Installer/Core/Backend/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Rectify11Installer.Core
{
internal class Common
{
#region Public Methods
/// <summary>
/// writes all the needed files
/// </summary>
Expand Down Expand Up @@ -121,8 +122,8 @@ public static bool CreateDirs()
public static bool CreateUninstall()
{
// backup
if (!SafeFileOperation(Assembly.GetExecutingAssembly().Location, Path.Combine(Variables.r11Folder, "Uninstall.exe"), OperationType.Copy))
return false;
// fails anyways if you use uninstaller.exe
SafeFileOperation(Assembly.GetExecutingAssembly().Location, Path.Combine(Variables.r11Folder, "Uninstall.exe"), OperationType.Copy);
Logger.WriteLine("Installer copied to " + Path.Combine(Variables.r11Folder, "Uninstall.exe"));

var r11key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", true)?.CreateSubKey("Rectify11", true);
Expand Down Expand Up @@ -264,7 +265,9 @@ public static bool Cleanup()
}
return true;
}
#endregion

#region Private Methods
private enum OperationType
{
Write = 0,
Expand Down Expand Up @@ -377,5 +380,6 @@ private static bool SafeDirectoryDeletion(string path)
return false;
}
}
#endregion
}
}
Loading

0 comments on commit 58782c6

Please sign in to comment.