Fix mac installation + remove unneded flatpak save stuff

pull/55/head
Miepee 4 years ago
parent 6b6911ae54
commit 84bf3bb637

@ -143,11 +143,6 @@ public partial class MainForm : Form
{ {
log.Info("Checking whether to transfer Flatpak saves..."); log.Info("Checking whether to transfer Flatpak saves...");
string oldHomePath = CrossPlatformOperations.Home; string oldHomePath = CrossPlatformOperations.Home;
// One can always set environment variables to other environment variables, and dotnet doesn't expand these by default
// However, since only Flatpak is majorly affected by this, I only do this workaround for there
if (oldHomePath == "$XDG_DATA_HOME")
oldHomePath = Environment.GetEnvironmentVariable("XDG_DATA_HOME");
log.Info("Old home path is " + oldHomePath); log.Info("Old home path is " + oldHomePath);
Environment.SetEnvironmentVariable("HOME", $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.DoNotVerify)}/AM2RProfileSaves"); Environment.SetEnvironmentVariable("HOME", $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.DoNotVerify)}/AM2RProfileSaves");
string newHomePath = CrossPlatformOperations.Home; string newHomePath = CrossPlatformOperations.Home;

@ -535,7 +535,7 @@ public static class Profile
File.Copy($"{Core.PatchDataPath}/data/PkgInfo", $"{tempPath.Replace("Resources", "")}/PkgInfo", true); File.Copy($"{Core.PatchDataPath}/data/PkgInfo", $"{tempPath.Replace("Resources", "")}/PkgInfo", true);
//Put profilePath back to what it was before //Put profilePath back to what it was before
tempPath = $"{Core.ProfilesPath}/{profile.Name}"; tempPath = $"{Path.GetTempPath()}/AM2RLauncherProfileTemp/";
} }
// Copy profile.xml so we can grab data to compare for updates later! // Copy profile.xml so we can grab data to compare for updates later!

Loading…
Cancel
Save