From 2ea7d8669feb91dc101614926264d9b4482d46ef Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 19 Dec 2022 00:30:30 -0500 Subject: [PATCH] Fixed Searching for Titanfall 2 installs to prevent looping in win11 platforms. Fixed Multi mod install --- .../.vs/VTOL/DesignTimeBuild/.dtbcache.v2 | Bin 463504 -> 463504 bytes VTOL_2.0.0/MainWindow.xaml.cs | 32 ++-- VTOL_2.0.0/Pages/Page_Home.xaml.cs | 70 +++++-- VTOL_2.0.0/Pages/Page_Mods.xaml.cs | 4 +- VTOL_2.0.0/Pages/Page_Thunderstore.xaml | 16 +- VTOL_2.0.0/Pages/Page_Thunderstore.xaml.cs | 176 ++++++++++++++---- VTOL_2.0.0/VTOL.csproj | 6 +- VTOL_2.0.0/VTOL.sln | 8 +- 8 files changed, 233 insertions(+), 79 deletions(-) diff --git a/VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2 b/VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2 index ccc1568446dcbced052dc0b1deaea2f9a4053844..d2509170daa2dd304d83bdd8c930afbef5b199b2 100644 GIT binary patch delta 12876 zcmai)2b2^=*M@gys&&LB~c%)*j0tmL3%FcQDdh+9DG6c$XI+^$3Csna`6Y2Ud+!HjmWrcIe#(0NAJ!fDew zP3~AYW9p2;_FW4*6s&yT_DWcD>8#79XWpxssJ-}w+}_tu$Sa`7%#yw5f$UN9grFp-&iznzkpomn^_F?{iwHO&?;-(WHm9CoS&7D=e`bc7gDZb$4WGa;znMzK~^td&*Tzb3B$w}qp z71Nqap(V6$G+42oXqM}vUcmE2pz+A92<9%lZ%tZmc*9ARuN4GFkBrLHFMyO+-j}S|5=ec+fA08 zQ#3L)a?{*&X`SIC1$X9Fn}o=DkvrdAAUiMA$jr!Hl=m%7WO`Er%7 zh}@O#DrvpCq&2ey{qt9sj@%q~o$Q>ek?SLOgS$~$=V|Lrk-OR5BCWS->ur&{-Q6Lr zcWUeW$SrUSrFD_EE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Fj?Zc? z*QjaHD{RrVT&}YheNiv^l38>;mm5^NXYa7|MlLtm=`%Wg)}%LcxkaUmz70!n<+8|5 zzpT@*m~=6hB`SRxX|qGyxZJL$y~$yV?%*0wBl6TXYf-FEs7 zoqp4#_i(w_*51_GIio$mUP?kl0KSHq6%<6J(W1M1H-{;QE*_g%B@VJ?rT^d+Rt zqEB*p)Scdu61L_sE|1%5zNgoG->i9p%adx&wD9yPE>GL(4|MuNlYWZJQkC9+%~yR* TM5+(XkH*k=X+&zo`iuVu;wX@@ diff --git a/VTOL_2.0.0/MainWindow.xaml.cs b/VTOL_2.0.0/MainWindow.xaml.cs index b5966416..eae2cb7b 100644 --- a/VTOL_2.0.0/MainWindow.xaml.cs +++ b/VTOL_2.0.0/MainWindow.xaml.cs @@ -38,7 +38,6 @@ public partial class MainWindow : Window bool Profile_card = false; public User_Settings User_Settings_Vars = new User_Settings(); public string AppDataFolder = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); - public string DocumentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); public TlsPaperTrailLogger logger2 = new TlsPaperTrailLogger("logs5.papertrailapp.com", 38137); @@ -63,27 +62,32 @@ public MainWindow() InitializeComponent(); //System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR"); + //System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");Do - if (Directory.Exists(DocumentsFolder) && Directory.Exists(AppDataFolder)) - { - if (!Directory.Exists(AppDataFolder + @"\VTOL_DATA\Settings")) + if (!File.Exists(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json")) + { string DocumentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + if (Directory.Exists(DocumentsFolder) && Directory.Exists(AppDataFolder)) { - TryCreateDirectory(AppDataFolder + @"\VTOL_DATA\Settings"); + if (!Directory.Exists(AppDataFolder + @"\VTOL_DATA\Settings")) - } + { + TryCreateDirectory(AppDataFolder + @"\VTOL_DATA\Settings"); - if (File.Exists(DocumentsFolder + @"\VTOL_DATA\Settings\User_Settings.Json") && !File.Exists(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json")) - { - TryCopyFile(DocumentsFolder + @"\VTOL_DATA\Settings\User_Settings.Json", AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json"); + } - if (File.Exists(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json")) + if (File.Exists(DocumentsFolder + @"\VTOL_DATA\Settings\User_Settings.Json") && !File.Exists(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json")) { - TryDeleteDirectory(DocumentsFolder + @"\VTOL_DATA\",true); + TryCopyFile(DocumentsFolder + @"\VTOL_DATA\Settings\User_Settings.Json", AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json"); + + if (File.Exists(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json")) + { + TryDeleteDirectory(DocumentsFolder + @"\VTOL_DATA\", true); + } } } - } + } if (Directory.Exists(AppDataFolder)) { @@ -683,7 +687,7 @@ private void Northstar_Dialog_IsVisibleChanged(object sender, DependencyProperty { From = Northstar_Dialog.Opacity, To = 1, - Duration = new Duration(TimeSpan.FromSeconds(0.8)), + Duration = new Duration(TimeSpan.FromSeconds(0.2)), AutoReverse = false }; Northstar_Dialog.BeginAnimation(OpacityProperty, da); @@ -698,7 +702,7 @@ private void Northstar_Dialog_IsVisibleChanged(object sender, DependencyProperty { From = Northstar_Dialog.Opacity, To = 0, - Duration = new Duration(TimeSpan.FromSeconds(0.8)), + Duration = new Duration(TimeSpan.FromSeconds(0.2)), AutoReverse = false }; Northstar_Dialog.BeginAnimation(OpacityProperty, da); diff --git a/VTOL_2.0.0/Pages/Page_Home.xaml.cs b/VTOL_2.0.0/Pages/Page_Home.xaml.cs index d155849d..12f249f2 100644 --- a/VTOL_2.0.0/Pages/Page_Home.xaml.cs +++ b/VTOL_2.0.0/Pages/Page_Home.xaml.cs @@ -343,7 +343,7 @@ public Page_Home() DispatcherTimer Log_Changes_Timer = new DispatcherTimer(); DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(2); - Log_Changes_Timer.Interval = TimeSpan.FromSeconds(60); + Log_Changes_Timer.Interval = TimeSpan.FromSeconds(10); timer.Tick += timer_Tick; Log_Changes_Timer.Tick += Log_Changes_Timer_Tick; timer.Start(); @@ -883,7 +883,6 @@ void INIT() MasterServer_URL = User_Settings_Vars.MasterServerUrl; Current_Install_Folder = User_Settings_Vars.NorthstarInstallLocation; - Console.WriteLine(Current_Install_Folder); if (IsValidPath(Current_Install_Folder)) { @@ -902,7 +901,7 @@ void INIT() { string FINAL = ""; Current_Install_Folder = InstalledApplications.GetApplictionInstallPath("Titanfall2"); - if (IsValidPath(Current_Install_Folder)) + if (Directory.Exists(Current_Install_Folder)) { FINAL = Current_Install_Folder; if (!Current_Install_Folder.EndsWith(@"\")) @@ -935,12 +934,13 @@ void INIT() } else { + Console.WriteLine("Null_Settings"); string FINAL = ""; Current_Install_Folder = InstalledApplications.GetApplictionInstallPath("Titanfall2"); + if (IsValidPath(Current_Install_Folder)) { - FINAL = Current_Install_Folder; if (!Current_Install_Folder.EndsWith(@"\")) { string fix = Current_Install_Folder + @"\"; @@ -957,16 +957,56 @@ void INIT() } else { + string Current_Install_Folder_x = Auto_Find_And_verify(InstalledApplications.GetApplictionInstallPath("Steam")).Replace(@"\\", @"\").Replace("/", @"\"); + - SnackBar.Appearance = ControlAppearance.Danger; - SnackBar.Title = "WARNING!"; - SnackBar.Message = VTOL.Resources.Languages.Language.Page_Home_INIT_InvalidInstallPathPleaseManuallyLocateTheCorrectFolder; - SnackBar.Show(); + Current_Install_Folder = Auto_Find_And_verify().Replace(@"\\", @"\").Replace("/", @"\"); - throw new Exception("Could Not Install Ns after all of it :("); + if (IsValidPath(Current_Install_Folder)) + { + if (!Current_Install_Folder.EndsWith(@"\")) + { + string fix = Current_Install_Folder + @"\"; + User_Settings_Vars.NorthstarInstallLocation = fix; + Current_Install_Folder = fix.Replace(@"\\", @"\").Replace("/", @"\"); + string User_Settings_Json_Strings = Newtonsoft.Json.JsonConvert.SerializeObject(User_Settings_Vars); + using (var StreamWriter = new StreamWriter(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json", false)) + { + StreamWriter.WriteLine(User_Settings_Json_Strings); + StreamWriter.Close(); + } + } - return; + } + else if(IsValidPath(Current_Install_Folder_x)) + { + if (!Current_Install_Folder.EndsWith(@"\")) + { + string fix = Current_Install_Folder + @"\"; + User_Settings_Vars.NorthstarInstallLocation = fix; + Current_Install_Folder = fix.Replace(@"\\", @"\").Replace("/", @"\"); + string User_Settings_Json_Strings = Newtonsoft.Json.JsonConvert.SerializeObject(User_Settings_Vars); + using (var StreamWriter = new StreamWriter(AppDataFolder + @"\VTOL_DATA\Settings\User_Settings.Json", false)) + { + StreamWriter.WriteLine(User_Settings_Json_Strings); + StreamWriter.Close(); + } + } + } + else + { + + + SnackBar.Appearance = ControlAppearance.Danger; + SnackBar.Title = "WARNING!"; + SnackBar.Message = VTOL.Resources.Languages.Language.Page_Home_INIT_InvalidInstallPathPleaseManuallyLocateTheCorrectFolder; + SnackBar.Show(); + + throw new Exception("Could Not Install Ns after all of it :("); + + return; + } } @@ -1423,10 +1463,9 @@ private static string GetShortcutTarget(string file) return ""; } } - private string Auto_Find_And_verify() + private string Auto_Find_And_verify(string path = @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Steam") { - string path = @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Steam"; if (!Directory.Exists(path) || !File.Exists(Path.Combine(path, "Steam.lnk"))) { @@ -1440,9 +1479,7 @@ private string Auto_Find_And_verify() } catch { - Main.logger2.Open(); - Main.logger2.Log("A User with the install - " + Current_Install_Folder + " failed an auto install and verify."); - Main.logger2.Close(); + } //Titanfall2_Directory_TextBox.Background = Brushes.Red; @@ -1497,8 +1534,7 @@ private string Auto_Find_And_verify() } - if (Directory.Exists(@"C:\Program Files (x86)\Origin Games\Titanfall2") && File.Exists(@"C:\Program Files (x86)\Origin Games\Titanfall2\Titanfall2.exe")) - return @"C:\Program Files (x86)\Origin Games\Titanfall2"; + //Titanfall2_Directory_TextBox.Background = Brushes.Red; //Install_NS_EXE_Textbox.Background = Brushes.Red; //Send_Fatal_Notif(GetTextResource("NOTIF_FATAL_GAME_INSTALL_NOT_FOUND")); diff --git a/VTOL_2.0.0/Pages/Page_Mods.xaml.cs b/VTOL_2.0.0/Pages/Page_Mods.xaml.cs index b7376bca..62b0da1f 100644 --- a/VTOL_2.0.0/Pages/Page_Mods.xaml.cs +++ b/VTOL_2.0.0/Pages/Page_Mods.xaml.cs @@ -338,7 +338,7 @@ async void Call_Mods_From_Folder() } int Flag_mod = 0; string ToolTip_Dynamic = VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_ThereIsAnIssueDetectedWithYourMod; - if (!File.Exists(dirInfo.FullName + @"\Locked_Folder" + @"\mod.json") ) + if (!File.Exists(dirInfo.FullName + @"\Locked_Folder" + @"\mod.json") && !Directory.Exists(dirInfo.FullName + @"\" + "Multipack")) { ToolTip_Dynamic = VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_PleaseOpenYourFolderAt + dirInfo.Parent + VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_AndManuallyRepairTheMod + dirInfo.Name; Flag_mod = 100; @@ -350,7 +350,7 @@ async void Call_Mods_From_Folder() int Flag_mod = 0; string ToolTip_Dynamic = VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_ThereIsAnIssueDetectedWithYourMod; - if (!File.Exists(dirInfo.FullName + @"\mod.json")) + if (!File.Exists(dirInfo.FullName + @"\mod.json") && !Directory.Exists(dirInfo.FullName + @"\" + "Multipack")) { ToolTip_Dynamic = VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_PleaseOpenYourFolderAt + dirInfo.Parent + VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_AndManuallyRepairTheMod + dirInfo.Name; diff --git a/VTOL_2.0.0/Pages/Page_Thunderstore.xaml b/VTOL_2.0.0/Pages/Page_Thunderstore.xaml index ced91b7f..a411b23f 100644 --- a/VTOL_2.0.0/Pages/Page_Thunderstore.xaml +++ b/VTOL_2.0.0/Pages/Page_Thunderstore.xaml @@ -10,7 +10,7 @@ xmlns:cntrls="clr-namespace:VTOL" d:DesignHeight="670" d:DesignWidth="1148" - Title="Page_Thunderstore" UseLayoutRounding="True"> + Title="Page_Thunderstore" UseLayoutRounding="True" Loaded="Page_Loaded_1"> @@ -129,7 +129,7 @@ - +