Skip to content

Commit

Permalink
final changes before rp3 (i promise)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojask committed Dec 23, 2022
1 parent 1d1a1e3 commit 845e187
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions Rectify11Installer/Core/Installer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ public async Task<bool> Install(frmWizard frm)
File.Delete(Path.Combine(Variables.r11Folder, "files.7z"));
File.Delete(Path.Combine(Variables.r11Folder, "vcredist32.exe"));
File.Delete(Path.Combine(Variables.r11Folder, "vcredist64.exe"));
File.Delete(Path.Combine(Variables.r11Folder, "newfiles.txt"));
try
{
Directory.Delete(Path.Combine(Variables.r11Folder, "themes"), true);
Expand Down
20 changes: 20 additions & 0 deletions Rectify11Installer/Pages/InstallOptnsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ void Application_Idle(object sender, System.EventArgs e)
{
if (!idleinit)
{
if (Directory.Exists(Path.Combine(Variables.r11Folder, "Backup")))
{
File.WriteAllText(Path.Combine(Variables.r11Folder, "newfiles.txt"), Properties.Resources.newfiles);
if (!Directory.Exists(Path.Combine(Variables.r11Folder, "Backup", "oldfiles")))
{
Directory.CreateDirectory(Path.Combine(Variables.r11Folder, "Backup", "oldfiles"));
}
string[] newFiles = File.ReadAllLines(Path.Combine(Variables.r11Folder, "newfiles.txt"));
foreach (string file in newFiles)
{
if (File.Exists(Path.Combine(Variables.r11Folder, "Backup", "oldfiles", file)))
{
File.Delete(Path.Combine(Variables.r11Folder, "Backup", "oldfiles", file));
}
if (File.Exists(Path.Combine(Variables.r11Folder, "Backup", file)))
{
File.Move(Path.Combine(Variables.r11Folder, "Backup", file), Path.Combine(Variables.r11Folder, "Backup", "oldfiles", file));
}
}
}
Patches list = PatchesParser.GetAll();
PatchesPatch[] ok = list.Items;
var basicNode = treeView1.Nodes[0].Nodes[0];
Expand Down
11 changes: 0 additions & 11 deletions Rectify11Installer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ private static void Main()
Application.SetCompatibleTextRenderingDefault(false);
//Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ko");
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
if (Directory.Exists(Path.Combine(Variables.r11Folder, "Backup")))
{
string[] newFiles = File.ReadAllLines(Properties.Resources.newfiles);
foreach (string file in newFiles)
{
if (File.Exists(Path.Combine(Variables.r11Folder, "Backup", file)))
{
File.Move(Path.Combine(Variables.r11Folder, "Backup", file), Path.Combine(Variables.r11Folder, "Backup", file + "_old"));
}
}
}
Application.Run(new frmWizard());
}
}
Expand Down
Binary file modified Rectify11Installer/Resources/files.7z
Binary file not shown.

0 comments on commit 845e187

Please sign in to comment.