Skip to content

Commit

Permalink
Improved 32-bit app compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
WinExperiments committed Mar 15, 2024
1 parent 5bdd533 commit 27040c6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
29 changes: 28 additions & 1 deletion Rectify11.Phase2/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static bool SafeFileDeletion(string path)
}
public static bool SafeFileCopy(string file)
{
// whatever, its only for one case
// whatever, its only for a few cases
try
{
if (!SafeFileDeletion(Path.Combine(Variables.sys32Folder, file))) return false;
Expand All @@ -58,6 +58,33 @@ public static bool SafeFileCopy(string file)
}
}
public static bool SafeFileCopy(string src, string dest)
{
try
{
if (!SafeFileDeletion(dest)) return false;
File.Copy(src, dest, true);
return true;
}
catch
{
return false;
}
}
public static bool SafeFileCopyWOW64(string file)
{
// whatever, its only for a few cases
try
{
if (!SafeFileDeletion(Path.Combine(Variables.sysWOWFolder, file))) return false;
File.Copy(Path.Combine(Variables.r11Files, file), Path.Combine(Variables.sysWOWFolder, file), true);
return true;
}
catch
{
return false;
}
}
public static bool SafeFileCopyWOW64(string src, string dest)
{
try
{
Expand Down
8 changes: 8 additions & 0 deletions Rectify11.Phase2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ private static void Main(string[] args)
SafeFileCopy("duires.dll");
SafeFileCopy("ImmersiveFontHandler.dll");
SafeFileCopy("twinuifonts.dll");
SafeFileCopyWOW64("iconres.dll");
SafeFileCopyWOW64("duires.dll");
SafeFileCopyWOW64("ImmersiveFontHandler.dll");
SafeFileCopyWOW64("twinuifonts.dll");
InstallFonts();

r11Reg?.Close();
Expand Down Expand Up @@ -325,6 +329,10 @@ private static void Main(string[] args)
SafeFileDeletion(Path.Combine(Variables.sys32Folder, "duires.dll"));
SafeFileDeletion(Path.Combine(Variables.sys32Folder, "ImmersiveFontHandler.dll"));
SafeFileDeletion(Path.Combine(Variables.sys32Folder, "twinuifonts.dll"));
SafeFileDeletion(Path.Combine(Variables.sysWOWFolder,"iconres.dll"));
SafeFileDeletion(Path.Combine(Variables.sysWOWFolder, "duires.dll"));
SafeFileDeletion(Path.Combine(Variables.sysWOWFolder, "ImmersiveFontHandler.dll"));
SafeFileDeletion(Path.Combine(Variables.sysWOWFolder, "twinuifonts.dll"));

Console.WriteLine("");
Console.Write("Press any key to continue...");
Expand Down
6 changes: 3 additions & 3 deletions Rectify11.Phase2/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Rectify11")]
[assembly: AssemblyProduct("Rectify11Installer.2")]
[assembly: AssemblyCopyright("Copyright © 2022 The Rectify11 Team")]
[assembly: AssemblyCopyright("Copyright © 2024 The Rectify11 Team")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,6 +32,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.48.0")]
[assembly: AssemblyFileVersion("3.0.48.0")]
[assembly: AssemblyVersion("3.2.63.1")]
[assembly: AssemblyFileVersion("3.2.63.1")]
[assembly: NeutralResourcesLanguageAttribute("en")]
4 changes: 2 additions & 2 deletions Rectify11Installer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.2.63.0")]
[assembly: AssemblyFileVersion("3.2.63.0")]
[assembly: AssemblyVersion("3.2.63.1")]
[assembly: AssemblyFileVersion("3.2.63.1")]
[assembly: NeutralResourcesLanguage("")]

0 comments on commit 27040c6

Please sign in to comment.