diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs b/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs
index c4b1e8a..663b438 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
//
-// Dieser Code wurde von einem Tool generiert.
-// Laufzeitversion:4.0.30319.42000
+// This code was generated by a tool.
//
-// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
-// der Code erneut generiert wird.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
//
//------------------------------------------------------------------------------
@@ -12,46 +11,32 @@ namespace AM2RLauncher.Language {
using System;
- ///
- /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
- ///
- // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
- // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
- // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
- // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Text {
- private static global::System.Resources.ResourceManager resourceMan;
+ private static System.Resources.ResourceManager resourceMan;
- private static global::System.Globalization.CultureInfo resourceCulture;
+ private static System.Globalization.CultureInfo resourceCulture;
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Text() {
}
- ///
- /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager {
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Resources.ResourceManager ResourceManager {
get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AM2RLauncher.Language.Text", typeof(Text).Assembly);
+ if (object.Equals(null, resourceMan)) {
+ System.Resources.ResourceManager temp = new System.Resources.ResourceManager("AM2RLauncher.Language.Text", typeof(Text).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
- ///
- /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
- /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture {
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -60,791 +45,532 @@ namespace AM2RLauncher.Language {
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die ABORT ähnelt.
- ///
public static string Abort {
get {
return ResourceManager.GetString("Abort", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die ADD NEW MOD ähnelt.
- ///
public static string AddNewMod {
get {
return ResourceManager.GetString("AddNewMod", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Select a mod to be installed. ähnelt.
- ///
public static string AddNewModToolTip {
get {
return ResourceManager.GetString("AddNewModToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Can't create an APK. ähnelt.
- ///
public static string ApkButtonDisabledToolTip {
get {
return ResourceManager.GetString("ApkButtonDisabledToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Create an APK for $NAME ähnelt.
- ///
public static string ApkButtonEnabledToolTip {
get {
return ResourceManager.GetString("ApkButtonEnabledToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die This is an archive of a previously installed Community Update. It cannot be re-installed and will remove itself if its game files are deleted. It shares saves with the currently installed Community Updates, so be sure to create a backup of your saves before running this profile! ähnelt.
- ///
public static string ArchiveNotes {
get {
return ResourceManager.GetString("ArchiveNotes", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Author(s): ähnelt.
- ///
public static string Author {
get {
return ResourceManager.GetString("Author", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Automatically update AM2R ähnelt.
- ///
public static string AutoUpdateAM2R {
get {
return ResourceManager.GetString("AutoUpdateAM2R", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Automatically update the AM2RLauncher ähnelt.
- ///
public static string AutoUpdateLauncher {
get {
return ResourceManager.GetString("AutoUpdateLauncher", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Changelog ähnelt.
- ///
public static string ChangelogTab {
get {
return ResourceManager.GetString("ChangelogTab", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Are you sure you want to cancel this now? This will delete all your progress! ähnelt.
- ///
public static string CloseOnCloningText {
get {
return ResourceManager.GetString("CloseOnCloningText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Sorry, you can't close this while it's installing! Please wait until it's finished. ähnelt.
- ///
public static string CloseOnInstallingText {
get {
return ResourceManager.GetString("CloseOnInstallingText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die There was a problem with your Patchdata folder. It has been deleted, please download it again. ähnelt.
- ///
public static string CorruptPatchData {
get {
return ResourceManager.GetString("CorruptPatchData", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die CREATE APK ähnelt.
- ///
public static string CreateAPK {
get {
return ResourceManager.GetString("CreateAPK", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die CREATING APK ähnelt.
- ///
public static string CreatingAPK {
get {
return ResourceManager.GetString("CreatingAPK", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Current profile: ähnelt.
- ///
public static string CurrentProfile {
get {
return ResourceManager.GetString("CurrentProfile", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Enter custom game environment variables: ähnelt.
- ///
public static string CustomEnvVarLabel {
get {
return ResourceManager.GetString("CustomEnvVarLabel", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Use custom download mirror ähnelt.
- ///
public static string CustomMirrorCheck {
get {
return ResourceManager.GetString("CustomMirrorCheck", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME couldn't be deleted. ähnelt.
- ///
public static string DeleteModButtonCantDelete {
get {
return ResourceManager.GetString("DeleteModButtonCantDelete", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME was successfully deleted! ähnelt.
- ///
public static string DeleteModButtonSuccess {
get {
return ResourceManager.GetString("DeleteModButtonSuccess", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die DELETE MOD ähnelt.
- ///
public static string DeleteModButtonText {
get {
return ResourceManager.GetString("DeleteModButtonText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Delete $NAME. ähnelt.
- ///
public static string DeleteModButtonToolTip {
get {
return ResourceManager.GetString("DeleteModButtonToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die This will delete all files for $NAME. Are you sure you want to continue? ähnelt.
- ///
public static string DeleteModWarning {
get {
return ResourceManager.GetString("DeleteModWarning", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The Official AM2R Discord ähnelt.
- ///
public static string DiscordToolTip {
get {
return ResourceManager.GetString("DiscordToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die DOWNLOAD ähnelt.
- ///
public static string Download {
get {
return ResourceManager.GetString("Download", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die DOWNLOADING ähnelt.
- ///
public static string Downloading {
get {
return ResourceManager.GetString("Downloading", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Download source: ähnelt.
- ///
public static string DownloadSource {
get {
return ResourceManager.GetString("DownloadSource", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Error ähnelt.
- ///
public static string ErrorWindowTitle {
get {
return ResourceManager.GetString("ErrorWindowTitle", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The Community-Developers Github Page ähnelt.
- ///
public static string GithubToolTip {
get {
return ResourceManager.GetString("GithubToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Use high quality music when patching to Android ähnelt.
- ///
public static string HighQualityAndroid {
get {
return ResourceManager.GetString("HighQualityAndroid", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Use high quality music when patching to PC ähnelt.
- ///
public static string HighQualityPC {
get {
return ResourceManager.GetString("HighQualityPC", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die INSTALL ähnelt.
- ///
public static string Install {
get {
return ResourceManager.GetString("Install", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die INSTALLING ähnelt.
- ///
public static string Installing {
get {
return ResourceManager.GetString("Installing", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Couldn't establish an internet connection! Try again later! ähnelt.
- ///
public static string InternetConnectionDrop {
get {
return ResourceManager.GetString("InternetConnectionDrop", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME is an invalid git URL! ähnelt.
- ///
public static string InvalidGitURL {
get {
return ResourceManager.GetString("InvalidGitURL", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Java not found! Cannot generate an APK without a Java installation. Please make sure that Java is installed and added to PATH. ähnelt.
- ///
public static string JavaNotFound {
get {
return ResourceManager.GetString("JavaNotFound", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Launcher Language: (requires restart to take effect) ähnelt.
- ///
public static string LanguageNotice {
get {
return ResourceManager.GetString("LanguageNotice", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Settings ähnelt.
- ///
public static string LauncherSettingsTab {
get {
return ResourceManager.GetString("LauncherSettingsTab", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die GitHub (Primary) ähnelt.
- ///
public static string MirrorGithubText {
get {
return ResourceManager.GetString("MirrorGithubText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die GitLab (Mirror) ähnelt.
- ///
public static string MirrorGitlabText {
get {
return ResourceManager.GetString("MirrorGitlabText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME is already installed! ähnelt.
- ///
public static string ModIsAlreadyInstalledMessage {
get {
return ResourceManager.GetString("ModIsAlreadyInstalledMessage", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME cannot be installed! It's for $OS. Download the $CURRENTOS version instead if it exists, or ask the mod authors to make one. ähnelt.
- ///
public static string ModIsForWrongOS {
get {
return ResourceManager.GetString("ModIsForWrongOS", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME is an invalid AM2R mod! ähnelt.
- ///
public static string ModIsInvalidMessage {
get {
return ResourceManager.GetString("ModIsInvalidMessage", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die $NAME was successfully added! Go to the Play Tab in order to install it! ähnelt.
- ///
public static string ModSuccessfullyInstalledMessage {
get {
return ResourceManager.GetString("ModSuccessfullyInstalledMessage", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die News ähnelt.
- ///
public static string NewsTab {
get {
return ResourceManager.GetString("NewsTab", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Couldn't establish an internet connection! You can still play the game, but updates will not occur until the launcher is restarted and can connect to the internet. ähnelt.
- ///
public static string NoInternetConnection {
get {
return ResourceManager.GetString("NoInternetConnection", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die OPEN PROFILE FOLDER ähnelt.
- ///
public static string OpenProfileFolder {
get {
return ResourceManager.GetString("OpenProfileFolder", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Opens the folder where game files are located for $NAME. ähnelt.
- ///
public static string OpenProfileFolderToolTip {
get {
return ResourceManager.GetString("OpenProfileFolderToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die OPEN PROFILE SAVE FOLDER ähnelt.
- ///
public static string OpenSaveFolder {
get {
return ResourceManager.GetString("OpenSaveFolder", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Opens the folder where save files are located for $NAME. ähnelt.
- ///
public static string OpenSaveFolderToolTip {
get {
return ResourceManager.GetString("OpenSaveFolderToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die PLAY ähnelt.
- ///
public static string Play {
get {
return ResourceManager.GetString("Play", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Currently downloading . . . ähnelt.
- ///
public static string PlayButtonDownladingToolTip {
get {
return ResourceManager.GetString("PlayButtonDownladingToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Download the necessary patch files. ähnelt.
- ///
public static string PlayButtonDownloadToolTip {
get {
return ResourceManager.GetString("PlayButtonDownloadToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Currently installing. . . ähnelt.
- ///
public static string PlayButtonInstallingToolTip {
get {
return ResourceManager.GetString("PlayButtonInstallingToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Install $NAME ähnelt.
- ///
public static string PlayButtonInstallToolTip {
get {
return ResourceManager.GetString("PlayButtonInstallToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Currently already playing! ähnelt.
- ///
public static string PlayButtonPlayingToolTip {
get {
return ResourceManager.GetString("PlayButtonPlayingToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Play ähnelt.
- ///
public static string PlayButtonPlayToolTip {
get {
return ResourceManager.GetString("PlayButtonPlayToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Select your AM2R_1.1.zip ähnelt.
- ///
public static string PlayButtonSelect11ToolTip {
get {
return ResourceManager.GetString("PlayButtonSelect11ToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die PLAYING ähnelt.
- ///
public static string Playing {
get {
return ResourceManager.GetString("Playing", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Play ähnelt.
- ///
public static string PlayTab {
get {
return ResourceManager.GetString("PlayTab", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Create game debug logs ähnelt.
- ///
public static string ProfileDebugCheckBox {
get {
return ResourceManager.GetString("ProfileDebugCheckBox", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Profile notes: ähnelt.
- ///
public static string ProfileNotes {
get {
return ResourceManager.GetString("ProfileNotes", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Mod Settings ähnelt.
- ///
public static string ProfileSettingsTab {
get {
return ResourceManager.GetString("ProfileSettingsTab", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Progress: ähnelt.
- ///
public static string ProgressbarProgress {
get {
return ResourceManager.GetString("ProgressbarProgress", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The Official AM2R Subreddit ähnelt.
- ///
public static string RedditToolTip {
get {
return ResourceManager.GetString("RedditToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die WARNING: This profile uses the default save location! This could corrupt your save data - please ensure that you have made a backup. ähnelt.
- ///
public static string SaveLocationWarning {
get {
return ResourceManager.GetString("SaveLocationWarning", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die SELECT AM2R_1.1.zip ähnelt.
- ///
public static string Select11 {
get {
return ResourceManager.GetString("Select11", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Select AM2R_1.1.zip ähnelt.
- ///
public static string Select11FileDialog {
get {
return ResourceManager.GetString("Select11FileDialog", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Select your Mod ähnelt.
- ///
public static string SelectModFileDialog {
get {
return ResourceManager.GetString("SelectModFileDialog", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Success ähnelt.
- ///
public static string SuccessWindowTitle {
get {
return ResourceManager.GetString("SuccessWindowTitle", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die System Language ähnelt.
- ///
public static string SystemLanguage {
get {
return ResourceManager.GetString("SystemLanguage", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Show Launcher ähnelt.
- ///
public static string TrayButtonShow {
get {
return ResourceManager.GetString("TrayButtonShow", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Can't access the Folder in order to download the update! Consider moving the program, or disabling auto-updates. ähnelt.
- ///
public static string UnauthorizedAccessMessage {
get {
return ResourceManager.GetString("UnauthorizedAccessMessage", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Unhandled Exception has occured in your Application. ähnelt.
- ///
public static string UnhandledException {
get {
return ResourceManager.GetString("UnhandledException", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Select Mod Update ähnelt.
- ///
public static string UpdateMod {
get {
return ResourceManager.GetString("UpdateMod", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die UPDATE MOD ähnelt.
- ///
public static string UpdateModButtonText {
get {
return ResourceManager.GetString("UpdateModButtonText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Select a zip to update $NAME. ähnelt.
- ///
public static string UpdateModButtonToolTip {
get {
return ResourceManager.GetString("UpdateModButtonToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Can't update $NAME with $SELECT. Add $SELECT as a new mod instead! ähnelt.
- ///
public static string UpdateModButtonWrongMod {
get {
return ResourceManager.GetString("UpdateModButtonWrongMod", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die This will replace all files for $NAME with the selected new version. Are you sure you want to continue? ähnelt.
- ///
public static string UpdateModWarning {
get {
return ResourceManager.GetString("UpdateModWarning", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Version: ähnelt.
- ///
public static string VersionLabel {
get {
return ResourceManager.GetString("VersionLabel", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die OK ähnelt.
- ///
public static string WarningWindowOk {
get {
return ResourceManager.GetString("WarningWindowOk", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The AM2RLauncher can NOT validate custom mirror links.
- ///
- ///If somebody is telling you to paste a link in this field, they may be trying to infect your computer.
- ///
- ///Proceed with caution. ähnelt.
- ///
public static string WarningWindowText {
get {
return ResourceManager.GetString("WarningWindowText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die WARNING ähnelt.
- ///
public static string WarningWindowTitle {
get {
return ResourceManager.GetString("WarningWindowTitle", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Xdelta not found! Cannot install Profiles without it. Please install xdelta3 from your local package manager. ähnelt.
- ///
public static string XdeltaNotFound {
get {
return ResourceManager.GetString("XdeltaNotFound", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The Community-Developers YouTube Channel ähnelt.
- ///
public static string YoutubeToolTip {
get {
return ResourceManager.GetString("YoutubeToolTip", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die Zip Archives (*.zip) ähnelt.
- ///
public static string ZipArchiveText {
get {
return ResourceManager.GetString("ZipArchiveText", resourceCulture);
}
}
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The selected Zip is not AM2R 1.1! Please choose another Zip file. ähnelt.
- ///
public static string ZipIsNotAM2R11 {
get {
return ResourceManager.GetString("ZipIsNotAM2R11", resourceCulture);
}
}
+
+ public static string ArchiveMod {
+ get {
+ return ResourceManager.GetString("ArchiveMod", resourceCulture);
+ }
+ }
}
}
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.resx b/AM2RLauncher/AM2RLauncher/Language/Text.resx
index 1ba47a2..7b98fb9 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.resx
@@ -382,4 +382,7 @@ Proceed with caution.
The selected Zip is not AM2R 1.1! Please choose another Zip file.
+
+ Do you want to archive $NAME?
+
\ No newline at end of file
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
index 53adf08..aa49ac9 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
@@ -104,46 +104,8 @@ namespace AM2RLauncher
if (currentXML.Version != profileList[0].Version)
{
log.Info("New game version (" + profileList[0].Version + ") detected! Beginning archival of version " + currentXML.Version + "...");
-
- string profileArchivePath = CrossPlatformOperations.CURRENTPATH + "/Profiles/Community Updates (" + currentXML.Version + ")";
-
- // Do NOT overwrite if a path with this name already exists! It is likely an existing user archive.
- if (!Directory.Exists(profileArchivePath))
- {
- // Rename current Community Updates
- Directory.Move(CrossPlatformOperations.CURRENTPATH + "/Profiles/Community Updates (Latest)", profileArchivePath);
-
- currentXML.Name = "Community Updates (" + currentXML.Version + ")";
-
- // Set as non-installable so that it's just treated as a launching reference
- currentXML.Installable = false;
- currentXML.SupportsAndroid = false;
-
- string modArchivePath = CrossPlatformOperations.CURRENTPATH + "/Mods/" + currentXML.Name;
-
- // Do NOT overwrite if a path with this name already exists! It is likely an existing user archive.
- if (!Directory.Exists(modArchivePath))
- {
- Directory.CreateDirectory(modArchivePath);
- File.WriteAllText(modArchivePath + "/profile.xml", Serializer.Serialize(currentXML));
- log.Info("Finished archival.");
- }
- else
- {
- HelperMethods.DeleteDirectory(profileArchivePath);
- log.Info("Cancelling archival! User-defined archive in Mods already exists.");
- }
-
-
- }
- else // If our desired rename already exists, it's probably a user archive... so we just delete the folder and move on with installation of the new version.
- {
- HelperMethods.DeleteDirectory(CrossPlatformOperations.CURRENTPATH + "/Profiles/Community Updates (Latest)");
- log.Info("Cancelling archival! User-defined archive in Profiles already exists.");
- }
-
+ Profile.ArchiveProfile(currentXML);
profileDropDown.SelectedIndex = 0;
-
LoadProfilesAndAdjustLists();
}
}
@@ -540,8 +502,6 @@ namespace AM2RLauncher
{
log.Info("User requested to add mod. Requesting user input for new mod .zip...");
- ProfileXML addedProfile;
-
OpenFileDialog fileFinder = new OpenFileDialog
{
Directory = new Uri(CrossPlatformOperations.CURRENTPATH),
@@ -557,84 +517,81 @@ namespace AM2RLauncher
return;
}
- if (!String.IsNullOrWhiteSpace(fileFinder.FileName)) // This is default
+ if (String.IsNullOrWhiteSpace(fileFinder.FileName))
{
- log.Info("User selected \"" + fileFinder.FileName + "\"");
-
- // If either a directory was selected or the file somehow went missing, cancel
- if (!File.Exists(fileFinder.FileName))
- {
- log.Error("Selected mod .zip file not found! Cancelling import.");
- return;
- }
-
- FileInfo modFile = new FileInfo(fileFinder.FileName);
+ log.Error("User did not supply valid input. Cancelling import.");
+ LoadProfilesAndAdjustLists();
+ return;
+ }
- string modsDir = new DirectoryInfo(CrossPlatformOperations.CURRENTPATH + "/Mods").FullName;
- string extractedName = modFile.Name.Replace(".zip", "");
+ log.Info("User selected \"" + fileFinder.FileName + "\"");
- // Extract it and see if it contains a profile.xml. If not, this is invalid
+ // If either a directory was selected or the file somehow went missing, cancel
+ if (!File.Exists(fileFinder.FileName))
+ {
+ log.Error("Selected mod .zip file not found! Cancelling import.");
+ return;
+ }
- // Check first, if the directory is already there, if yes, throw a message
- if (Directory.Exists(modsDir + "/" + extractedName))
- {
- ProfileXML profile2 = Serializer.Deserialize(File.ReadAllText(modsDir + "/" + extractedName + "/profile.xml"));
- log.Error("Mod is already imported as " + extractedName + "! Cancelling mod import.");
+ FileInfo modFile = new FileInfo(fileFinder.FileName);
- MessageBox.Show(Language.Text.ModIsAlreadyInstalledMessage.Replace("$NAME", profile2.Name), Language.Text.WarningWindowTitle, MessageBoxType.Warning);
- return;
- }
- // Directory doesn't exist -> extract!
- ZipFile.ExtractToDirectory(fileFinder.FileName, modsDir + "/" + extractedName);
- log.Info("Imported and extracted mod .zip as " + extractedName);
+ string modsDir = new DirectoryInfo(CrossPlatformOperations.CURRENTPATH + "/Mods").FullName;
+ string extractedName = modFile.Name.Replace(".zip", "");
- // Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
- if (!File.Exists(modsDir + "/" + extractedName + "/profile.xml"))
- {
- log.Error(fileFinder.FileName + " does not contain profile.xml! Cancelling mod import.");
+ // Extract it and see if it contains a profile.xml. If not, this is invalid
- MessageBox.Show(Language.Text.ModIsInvalidMessage.Replace("$NAME", extractedName), Language.Text.ErrorWindowTitle, MessageBoxType.Error);
- Directory.Delete(modsDir + "/" + extractedName, true);
- File.Delete(CrossPlatformOperations.CURRENTPATH + "/Mods/" + modFile.Name);
- return;
- }
+ // Check first, if the directory is already there, if yes, throw a message
+ if (Directory.Exists(modsDir + "/" + extractedName))
+ {
+ ProfileXML profile2 = Serializer.Deserialize(File.ReadAllText(modsDir + "/" + extractedName + "/profile.xml"));
+ log.Error("Mod is already imported as " + extractedName + "! Cancelling mod import.");
- ProfileXML profile = Serializer.Deserialize(File.ReadAllText(modsDir + "/" + extractedName + "/profile.xml"));
+ MessageBox.Show(Language.Text.ModIsAlreadyInstalledMessage.Replace("$NAME", profile2.Name), Language.Text.WarningWindowTitle, MessageBoxType.Warning);
+ return;
+ }
+ // Directory doesn't exist -> extract!
+ ZipFile.ExtractToDirectory(fileFinder.FileName, modsDir + "/" + extractedName);
+ log.Info("Imported and extracted mod .zip as " + extractedName);
- // Check if the OS versions match
- if (OS.Name != profile.OperatingSystem)
- {
- log.Error("Mod is for " + profile.OperatingSystem + " while current OS is " + OS.Name + ". Cancelling mod import.");
+ // Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
+ if (!File.Exists(modsDir + "/" + extractedName + "/profile.xml"))
+ {
+ log.Error(fileFinder.FileName + " does not contain profile.xml! Cancelling mod import.");
- MessageBox.Show(Language.Text.ModIsForWrongOS.Replace("$NAME", profile.Name).Replace("$OS", profile.OperatingSystem).Replace("$CURRENTOS", OS.Name),
- Language.Text.ErrorWindowTitle, MessageBoxType.Error);
- HelperMethods.DeleteDirectory(modsDir + "/" + extractedName);
- return;
- }
+ MessageBox.Show(Language.Text.ModIsInvalidMessage.Replace("$NAME", extractedName), Language.Text.ErrorWindowTitle, MessageBoxType.Error);
+ Directory.Delete(modsDir + "/" + extractedName, true);
+ File.Delete(CrossPlatformOperations.CURRENTPATH + "/Mods/" + modFile.Name);
+ return;
+ }
- // Check by *name*, if the mod was installed already
- if (profileList.FirstOrDefault(p => p.Name == profile.Name) != null || Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name))
- {
- log.Error(profile.Name + " is already installed.");
- MessageBox.Show(Language.Text.ModIsAlreadyInstalledMessage.Replace("$NAME", profile.Name), Language.Text.WarningWindowTitle, MessageBoxType.Warning);
- HelperMethods.DeleteDirectory(modsDir + "/" + extractedName);
- return;
- }
+ ProfileXML profile = Serializer.Deserialize(File.ReadAllText(modsDir + "/" + extractedName + "/profile.xml"));
- addedProfile = profile;
- log.Info(profile.Name + " successfully installed.");
- MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", profile.Name), Language.Text.SuccessWindowTitle);
+ // Check if the OS versions match
+ if (OS.Name != profile.OperatingSystem)
+ {
+ log.Error("Mod is for " + profile.OperatingSystem + " while current OS is " + OS.Name + ". Cancelling mod import.");
+ MessageBox.Show(Language.Text.ModIsForWrongOS.Replace("$NAME", profile.Name).Replace("$OS", profile.OperatingSystem).Replace("$CURRENTOS", OS.Name),
+ Language.Text.ErrorWindowTitle, MessageBoxType.Error);
+ HelperMethods.DeleteDirectory(modsDir + "/" + extractedName);
+ return;
}
- else
+
+ // Check by *name*, if the mod was installed already
+ if (profileList.FirstOrDefault(p => p.Name == profile.Name) != null || Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name))
{
- log.Error("User did not supply valid input. Cancelling import.");
- LoadProfilesAndAdjustLists();
+ log.Error(profile.Name + " is already installed.");
+ MessageBox.Show(Language.Text.ModIsAlreadyInstalledMessage.Replace("$NAME", profile.Name), Language.Text.WarningWindowTitle, MessageBoxType.Warning);
+ HelperMethods.DeleteDirectory(modsDir + "/" + extractedName);
return;
}
+ log.Info(profile.Name + " successfully installed.");
+ MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", profile.Name), Language.Text.SuccessWindowTitle);
+
LoadProfilesAndAdjustLists();
- settingsProfileDropDown.SelectedIndex = profileList.FindIndex(p => p.Name == addedProfile.Name);
+ // Adjust profileIndex to point to newly added mod. if its not found for whatever reason, we default to first community updates
+ settingsProfileDropDown.SelectedIndex = profileList.FindIndex(p => p.Name == profile.Name);
if (settingsProfileDropDown.SelectedIndex == -1)
settingsProfileDropDown.SelectedIndex = 0;
}
@@ -682,7 +639,8 @@ namespace AM2RLauncher
{
deleteModButton.Enabled = true;
deleteModButton.ToolTip = Language.Text.DeleteModButtonToolTip.Replace("$NAME", settingsProfileDropDown.Items[settingsProfileDropDown.SelectedIndex].Text);
- updateModButton.Enabled = true;
+ // On non-installable profiles we want to disable updating
+ updateModButton.Enabled = profileList[settingsProfileDropDown.SelectedIndex].Installable;
updateModButton.ToolTip = Language.Text.UpdateModButtonToolTip.Replace("$NAME", settingsProfileDropDown.Items[settingsProfileDropDown.SelectedIndex].Text);
}
@@ -979,88 +937,111 @@ namespace AM2RLauncher
return;
}
- if (!String.IsNullOrWhiteSpace(fileFinder.FileName)) // This is default
+ // Exit if nothing was selected
+ if (String.IsNullOrWhiteSpace(fileFinder.FileName))
{
- log.Info("User selected \"" + fileFinder.FileName + "\"");
+ log.Info("Nothing was selected, cancelling mod update.");
+ LoadProfilesAndAdjustLists();
+ return;
+ }
- // If either a directory was selected or the file somehow went missing, cancel
- if (!File.Exists(fileFinder.FileName))
- {
- log.Error("Selected mod .zip file not found! Cancelling mod update.");
- return;
- }
+ log.Info("User selected \"" + fileFinder.FileName + "\"");
- FileInfo modFile = new FileInfo(fileFinder.FileName);
+ // If either a directory was selected or the file somehow went missing, cancel
+ if (!File.Exists(fileFinder.FileName))
+ {
+ log.Error("Selected mod .zip file not found! Cancelling mod update.");
+ return;
+ }
- string modsDir = new DirectoryInfo(CrossPlatformOperations.CURRENTPATH + "/Mods").FullName;
- string extractedName = modFile.Name.Replace(".zip", "_new");
+ FileInfo modFile = new FileInfo(fileFinder.FileName);
- // Extract it and see if it contains a profile.xml. If not, this is invalid
+ string modsDir = new DirectoryInfo(CrossPlatformOperations.CURRENTPATH + "/Mods").FullName;
+ string extractedName = modFile.Name.Replace(".zip", "_new");
+ string extractedFolder = modsDir + "/" + extractedName;
- // Directory doesn't exist -> extract!
- ZipFile.ExtractToDirectory(fileFinder.FileName, modsDir + "/" + extractedName);
+ // Extract it and see if it contains a profile.xml. If not, this is invalid
- // Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
- if (!File.Exists(modsDir + "/" + extractedName + "/profile.xml"))
- {
- log.Error(fileFinder.FileName + " does not contain profile.xml! Cancelling mod update.");
- MessageBox.Show(Language.Text.ModIsInvalidMessage.Replace("$NAME", extractedName), Language.Text.ErrorWindowTitle, MessageBoxType.Error);
- Directory.Delete(modsDir + "/" + extractedName, true);
- File.Delete(CrossPlatformOperations.CURRENTPATH + "/Mods/" + modFile.Name);
- return;
- }
+ // If for some reason old files remain, delete them
+ if (Directory.Exists(extractedFolder))
+ Directory.Delete(extractedFolder, true);
- // Check by *name*, if the mod was installed already
- ProfileXML profile = Serializer.Deserialize(File.ReadAllText(modsDir + "/" + extractedName + "/profile.xml"));
+ // Directory doesn't exist -> extract!
+ ZipFile.ExtractToDirectory(fileFinder.FileName, extractedFolder);
- if (profileList.FirstOrDefault(p => p.Name == profile.Name) != null || Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name))
- {
- // Mod is already installed, so we can update!
- DialogResult result = MessageBox.Show(Language.Text.UpdateModWarning.Replace("$NAME", currentProfile.Name), Language.Text.WarningWindowTitle,
- MessageBoxButtons.OKCancel, MessageBoxType.Warning, MessageBoxDefaultButton.Cancel);
+ // Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup
+ if (!File.Exists(extractedFolder + "/profile.xml"))
+ {
+ log.Error(fileFinder.FileName + " does not contain profile.xml! Cancelling mod update.");
+ MessageBox.Show(Language.Text.ModIsInvalidMessage.Replace("$NAME", extractedName), Language.Text.ErrorWindowTitle, MessageBoxType.Error);
+ Directory.Delete(extractedFolder, true);
+ File.Delete(CrossPlatformOperations.CURRENTPATH + "/Mods/" + modFile.Name);
+ return;
+ }
- if (result == DialogResult.Ok)
- {
- // Delete profile
- DeleteProfileAndAdjustLists(currentProfile);
+ // Check by *name*, if the mod was installed already
+ ProfileXML profile = Serializer.Deserialize(File.ReadAllText(extractedFolder + "/profile.xml"));
- // Rename directory to take the old one's place
- string originalFolder = modsDir + "/" + extractedName.Replace("_new", "");
- Directory.Move(modsDir + "/" + extractedName, originalFolder);
+ if (profileList.FirstOrDefault(p => p.Name == profile.Name) != null || Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name))
+ {
+ // Mod is already installed, so we can update!
+ DialogResult updateResult = MessageBox.Show(Language.Text.UpdateModWarning.Replace("$NAME", currentProfile.Name), Language.Text.WarningWindowTitle,
+ MessageBoxButtons.OKCancel, MessageBoxType.Warning, MessageBoxDefaultButton.Cancel);
- }
- else // Cancel the operation!
+ if (updateResult == DialogResult.Ok)
+ {
+ // If the profile isn't installed, don't ask about archiving it
+ if (Profile.IsProfileInstalled(currentProfile))
{
- log.Error("User has cancelled mod update!");
- abort = true;
+ //TODO: localize
+ DialogResult archiveResult = MessageBox.Show(Language.Text.ArchiveMod.Replace("$NAME", currentProfile.Name + " " + Language.Text.VersionLabel + currentProfile.Version), Language.Text.WarningWindowTitle, MessageBoxButtons.YesNo, MessageBoxType.Warning, MessageBoxDefaultButton.No);
+
+ // User wants to archive profile
+ if (archiveResult == DialogResult.Yes)
+ {
+ ArchiveProfileAndAdjustLists(currentProfile);
+ DeleteProfileAndAdjustLists(currentProfile);
+ }
}
+ // No archiving, Delete profile instead
+ else
+ DeleteProfileAndAdjustLists(currentProfile);
+
+ // Rename directory to take the old one's place
+ string originalFolder = modsDir + "/" + extractedName.Replace("_new", "");
+ Directory.Move(extractedFolder, originalFolder);
}
- else
+ else // Cancel the operation!
{
- // Cancel the operation!
- // Show message to tell user that mod could not be found, install this separately
- log.Error("Mod is not installed! Cancelling mod update.");
- MessageBox.Show(Language.Text.UpdateModButtonWrongMod.Replace("$NAME", currentProfile.Name).Replace("$SELECT", profile.Name),
- Language.Text.WarningWindowTitle, MessageBoxButtons.OK);
+ log.Error("User has cancelled mod update!");
abort = true;
}
+ }
+ else
+ {
+ // Cancel the operation!
+ // Show message to tell user that mod could not be found, install this separately
+ log.Error("Mod is not installed! Cancelling mod update.");
+ MessageBox.Show(Language.Text.UpdateModButtonWrongMod.Replace("$NAME", currentProfile.Name).Replace("$SELECT", profile.Name),
+ Language.Text.WarningWindowTitle, MessageBoxButtons.OK);
+ abort = true;
+ }
- if (abort)
- {
- // File cleanup
- HelperMethods.DeleteDirectory(modsDir + "/" + extractedName);
- LoadProfilesAndAdjustLists();
- return;
- }
-
- log.Info("Successfully updated mod profile " + profile.Name + ".");
- MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", currentProfile.Name), Language.Text.SuccessWindowTitle);
- UpdateStateMachine();
+ if (abort)
+ {
+ // File cleanup
+ HelperMethods.DeleteDirectory(extractedFolder);
+ LoadProfilesAndAdjustLists();
+ return;
}
- ProfileXML currentSelectedProfile = profileList[settingsProfileDropDown.SelectedIndex];
+ log.Info("Successfully updated mod profile " + profile.Name + ".");
+ MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", currentProfile.Name), Language.Text.SuccessWindowTitle);
+ UpdateStateMachine();
+
LoadProfilesAndAdjustLists();
- settingsProfileDropDown.SelectedIndex = profileList.FindIndex(p => p.Name == currentSelectedProfile.Name);
+
+ settingsProfileDropDown.SelectedIndex = profileList.FindIndex(p => p.Name == currentProfile.Name);
if (settingsProfileDropDown.SelectedIndex == -1)
settingsProfileDropDown.SelectedIndex = 0;
}
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs
index 733f02b..382c791 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs
@@ -285,7 +285,8 @@ namespace AM2RLauncher
{
// Archive version notes
if (!profile.Installable)
- profile.ProfileNotes = Language.Text.ArchiveNotes;
+ //TODO: have different text for non-community archive
+ profile.ProfileNotes = Language.Text.ArchiveNotes + "\n\n" + profile.ProfileNotes;
profileDropDown.Items.Add(profile.Name);
}
@@ -337,5 +338,11 @@ namespace AM2RLauncher
Profile.DeleteProfile(profile);
LoadProfilesAndAdjustLists();
}
+
+ private void ArchiveProfileAndAdjustLists(ProfileXML profile)
+ {
+ Profile.ArchiveProfile(profile);
+ LoadProfilesAndAdjustLists();
+ }
}
}
\ No newline at end of file
diff --git a/AM2RLauncher/AM2RLauncherCore/Profile.cs b/AM2RLauncher/AM2RLauncherCore/Profile.cs
index 5142580..7c16c87 100644
--- a/AM2RLauncher/AM2RLauncherCore/Profile.cs
+++ b/AM2RLauncher/AM2RLauncherCore/Profile.cs
@@ -45,12 +45,6 @@ public static class Profile
///
private static string lastAM2R11ZipMD5 = "";
- /*///
- /// Checks if AM2R 1.1 has been installed already, aka if a valid AM2R 1.1 Zip exists.
- ///
-
- /// if yes, if not.*/
-
///
/// Checks if AM2R 1.1 has been installed already, aka if a valid AM2R 1.1 Zip exists.
///
@@ -131,10 +125,6 @@ public static class Profile
}
log.Info("Repository pulled successfully.");
}
-/*
- ///
- /// Scans the PatchData and Mods folders for valid profile entries, and loads them.
- /// */
///
/// Scans the PatchData and Mods folders for valid profile entries, creates and returns a list of them.
@@ -187,6 +177,59 @@ public static class Profile
return profileList;
}
+ ///
+ /// Archives a given Profile by making a copy with "Name (version)". Does silently nothing if user archives already exist
+ ///
+ /// The profile to archive
+ public static void ArchiveProfile(ProfileXML profile)
+ {
+ // temporarily serialize and deserialize to essentially "clone" the variable as otherwise we'd modify references
+ File.WriteAllText(Path.GetTempPath() + "/" + profile.Name, Serializer.Serialize(profile));
+ profile = Serializer.Deserialize(File.ReadAllText(Path.GetTempPath() + "/" + profile.Name));
+
+ string originalName = profile.Name;
+ // Change name to include version and be unique
+ profile.Name += " (" + profile.Version + ")";
+ // if we're archiving community updates, remove the "latest" part
+ profile.Name = profile.Name.Replace("Community Updates Latest", "Community Updates");
+
+ log.Info("Archiving " + profile.Name);
+
+ string profileArchivePath = CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name;
+
+ // Do NOT overwrite if a path with this name already exists! It is likely an existing user archive.
+ if (!Directory.Exists(profileArchivePath))
+ {
+ // Rename current profile if we have it installed
+ if (Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + originalName))
+ Directory.Move(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + originalName, profileArchivePath);
+
+ // Set as non-installable so that it's just treated as a launching reference
+ profile.Installable = false;
+
+ string modArchivePath = CrossPlatformOperations.CURRENTPATH + "/Mods/" + profile.Name;
+
+ // Do NOT overwrite if a path with this name already exists! It is likely an existing user archive.
+ if (!Directory.Exists(modArchivePath))
+ {
+ Directory.CreateDirectory(modArchivePath);
+ File.WriteAllText(modArchivePath + "/profile.xml", Serializer.Serialize(profile));
+ log.Info("Finished archival.");
+ }
+ else
+ {
+ HelperMethods.DeleteDirectory(profileArchivePath);
+ log.Info("Cancelling archival! User-defined archive in Mods already exists.");
+ }
+ }
+ // If our desired rename already exists, it's probably a user archive... so we just delete the original folder and move on with installation of the new version.
+ else
+ {
+ HelperMethods.DeleteDirectory(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + originalName);
+ log.Info("Cancelling archival! User-defined archive in Profiles already exists.");
+ }
+ }
+
///
/// Deletes a profile from the Mods and Profiles folder.
///