Skip to content

Commit

Permalink
GameLauncher: Convert profile.xml to profile.txt for Crashlogs (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotaxis authored Oct 3, 2023
1 parent 9de36eb commit bbf20a4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SeventhHeavenUI/Classes/GameLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
using System.Windows;
using System.Windows.Interop;
using System.Xml;

using Profile = Iros._7th.Workshop.Profile;

namespace SeventhHeaven.Classes
{
public enum FF7Version
Expand Down Expand Up @@ -1682,9 +1683,13 @@ private void CollectCrashReport()
// === 7th files ===
archive.AddEntry("7thWrapperLoader.log", Path.Combine(Sys.InstallPath, "7thWrapperLoader.log"));
archive.AddEntry("applog.txt", File.Open(Sys.PathToApplog, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
archive.AddEntry("profile.xml", Sys.PathToCurrentProfileFile);
archive.AddEntry("settings.xml", Sys.PathToSettings);
archive.AddEntry("registry_transaction.bat", Path.Combine(Sys.PathToTempFolder, "registry_transaction.bat"));
// Convert profile.xml to profile.txt
Profile currentProfile = Util.Deserialize<Profile>(Sys.PathToCurrentProfileFile);
IEnumerable<string> profileDetails = currentProfile.GetDetails();
File.WriteAllLines(Path.Combine(Sys.PathToTempFolder, "profile.txt"), profileDetails);
archive.AddEntry("profile.txt", Path.Combine(Sys.PathToTempFolder, "profile.txt"));

// =================================================================================================

Expand Down

0 comments on commit bbf20a4

Please sign in to comment.