Add basics of mod archival during updating

pull/32/head
Miepee 5 years ago
parent 56cb5528ce
commit 52dccdb73e

@ -1,10 +1,9 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // This code was generated by a tool.
// Laufzeitversion:4.0.30319.42000
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Changes to this file may cause incorrect behavior and will be lost if
// der Code erneut generiert wird. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -12,46 +11,32 @@ namespace AM2RLauncher.Language {
using System; using System;
/// <summary> [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. [System.Diagnostics.DebuggerNonUserCodeAttribute()]
/// </summary> [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
// 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()]
public class Text { 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() { internal Text() {
} }
/// <summary> [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. public static System.Resources.ResourceManager ResourceManager {
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.Equals(null, resourceMan)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AM2RLauncher.Language.Text", typeof(Text).Assembly); System.Resources.ResourceManager temp = new System.Resources.ResourceManager("AM2RLauncher.Language.Text", typeof(Text).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
/// <summary> [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle public static System.Globalization.CultureInfo Culture {
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
@ -60,791 +45,532 @@ namespace AM2RLauncher.Language {
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ABORT ähnelt.
/// </summary>
public static string Abort { public static string Abort {
get { get {
return ResourceManager.GetString("Abort", resourceCulture); return ResourceManager.GetString("Abort", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ADD NEW MOD ähnelt.
/// </summary>
public static string AddNewMod { public static string AddNewMod {
get { get {
return ResourceManager.GetString("AddNewMod", resourceCulture); return ResourceManager.GetString("AddNewMod", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Select a mod to be installed. ähnelt.
/// </summary>
public static string AddNewModToolTip { public static string AddNewModToolTip {
get { get {
return ResourceManager.GetString("AddNewModToolTip", resourceCulture); return ResourceManager.GetString("AddNewModToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Can&apos;t create an APK. ähnelt.
/// </summary>
public static string ApkButtonDisabledToolTip { public static string ApkButtonDisabledToolTip {
get { get {
return ResourceManager.GetString("ApkButtonDisabledToolTip", resourceCulture); return ResourceManager.GetString("ApkButtonDisabledToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Create an APK for $NAME ähnelt.
/// </summary>
public static string ApkButtonEnabledToolTip { public static string ApkButtonEnabledToolTip {
get { get {
return ResourceManager.GetString("ApkButtonEnabledToolTip", resourceCulture); return ResourceManager.GetString("ApkButtonEnabledToolTip", resourceCulture);
} }
} }
/// <summary>
/// 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.
/// </summary>
public static string ArchiveNotes { public static string ArchiveNotes {
get { get {
return ResourceManager.GetString("ArchiveNotes", resourceCulture); return ResourceManager.GetString("ArchiveNotes", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Author(s): ähnelt.
/// </summary>
public static string Author { public static string Author {
get { get {
return ResourceManager.GetString("Author", resourceCulture); return ResourceManager.GetString("Author", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Automatically update AM2R ähnelt.
/// </summary>
public static string AutoUpdateAM2R { public static string AutoUpdateAM2R {
get { get {
return ResourceManager.GetString("AutoUpdateAM2R", resourceCulture); return ResourceManager.GetString("AutoUpdateAM2R", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Automatically update the AM2RLauncher ähnelt.
/// </summary>
public static string AutoUpdateLauncher { public static string AutoUpdateLauncher {
get { get {
return ResourceManager.GetString("AutoUpdateLauncher", resourceCulture); return ResourceManager.GetString("AutoUpdateLauncher", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Changelog ähnelt.
/// </summary>
public static string ChangelogTab { public static string ChangelogTab {
get { get {
return ResourceManager.GetString("ChangelogTab", resourceCulture); return ResourceManager.GetString("ChangelogTab", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Are you sure you want to cancel this now? This will delete all your progress! ähnelt.
/// </summary>
public static string CloseOnCloningText { public static string CloseOnCloningText {
get { get {
return ResourceManager.GetString("CloseOnCloningText", resourceCulture); return ResourceManager.GetString("CloseOnCloningText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Sorry, you can&apos;t close this while it&apos;s installing! Please wait until it&apos;s finished. ähnelt.
/// </summary>
public static string CloseOnInstallingText { public static string CloseOnInstallingText {
get { get {
return ResourceManager.GetString("CloseOnInstallingText", resourceCulture); return ResourceManager.GetString("CloseOnInstallingText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die There was a problem with your Patchdata folder. It has been deleted, please download it again. ähnelt.
/// </summary>
public static string CorruptPatchData { public static string CorruptPatchData {
get { get {
return ResourceManager.GetString("CorruptPatchData", resourceCulture); return ResourceManager.GetString("CorruptPatchData", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die CREATE APK ähnelt.
/// </summary>
public static string CreateAPK { public static string CreateAPK {
get { get {
return ResourceManager.GetString("CreateAPK", resourceCulture); return ResourceManager.GetString("CreateAPK", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die CREATING APK ähnelt.
/// </summary>
public static string CreatingAPK { public static string CreatingAPK {
get { get {
return ResourceManager.GetString("CreatingAPK", resourceCulture); return ResourceManager.GetString("CreatingAPK", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Current profile: ähnelt.
/// </summary>
public static string CurrentProfile { public static string CurrentProfile {
get { get {
return ResourceManager.GetString("CurrentProfile", resourceCulture); return ResourceManager.GetString("CurrentProfile", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Enter custom game environment variables: ähnelt.
/// </summary>
public static string CustomEnvVarLabel { public static string CustomEnvVarLabel {
get { get {
return ResourceManager.GetString("CustomEnvVarLabel", resourceCulture); return ResourceManager.GetString("CustomEnvVarLabel", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Use custom download mirror ähnelt.
/// </summary>
public static string CustomMirrorCheck { public static string CustomMirrorCheck {
get { get {
return ResourceManager.GetString("CustomMirrorCheck", resourceCulture); return ResourceManager.GetString("CustomMirrorCheck", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME couldn&apos;t be deleted. ähnelt.
/// </summary>
public static string DeleteModButtonCantDelete { public static string DeleteModButtonCantDelete {
get { get {
return ResourceManager.GetString("DeleteModButtonCantDelete", resourceCulture); return ResourceManager.GetString("DeleteModButtonCantDelete", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME was successfully deleted! ähnelt.
/// </summary>
public static string DeleteModButtonSuccess { public static string DeleteModButtonSuccess {
get { get {
return ResourceManager.GetString("DeleteModButtonSuccess", resourceCulture); return ResourceManager.GetString("DeleteModButtonSuccess", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die DELETE MOD ähnelt.
/// </summary>
public static string DeleteModButtonText { public static string DeleteModButtonText {
get { get {
return ResourceManager.GetString("DeleteModButtonText", resourceCulture); return ResourceManager.GetString("DeleteModButtonText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Delete $NAME. ähnelt.
/// </summary>
public static string DeleteModButtonToolTip { public static string DeleteModButtonToolTip {
get { get {
return ResourceManager.GetString("DeleteModButtonToolTip", resourceCulture); return ResourceManager.GetString("DeleteModButtonToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die This will delete all files for $NAME. Are you sure you want to continue? ähnelt.
/// </summary>
public static string DeleteModWarning { public static string DeleteModWarning {
get { get {
return ResourceManager.GetString("DeleteModWarning", resourceCulture); return ResourceManager.GetString("DeleteModWarning", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The Official AM2R Discord ähnelt.
/// </summary>
public static string DiscordToolTip { public static string DiscordToolTip {
get { get {
return ResourceManager.GetString("DiscordToolTip", resourceCulture); return ResourceManager.GetString("DiscordToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die DOWNLOAD ähnelt.
/// </summary>
public static string Download { public static string Download {
get { get {
return ResourceManager.GetString("Download", resourceCulture); return ResourceManager.GetString("Download", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die DOWNLOADING ähnelt.
/// </summary>
public static string Downloading { public static string Downloading {
get { get {
return ResourceManager.GetString("Downloading", resourceCulture); return ResourceManager.GetString("Downloading", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Download source: ähnelt.
/// </summary>
public static string DownloadSource { public static string DownloadSource {
get { get {
return ResourceManager.GetString("DownloadSource", resourceCulture); return ResourceManager.GetString("DownloadSource", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Error ähnelt.
/// </summary>
public static string ErrorWindowTitle { public static string ErrorWindowTitle {
get { get {
return ResourceManager.GetString("ErrorWindowTitle", resourceCulture); return ResourceManager.GetString("ErrorWindowTitle", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The Community-Developers Github Page ähnelt.
/// </summary>
public static string GithubToolTip { public static string GithubToolTip {
get { get {
return ResourceManager.GetString("GithubToolTip", resourceCulture); return ResourceManager.GetString("GithubToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Use high quality music when patching to Android ähnelt.
/// </summary>
public static string HighQualityAndroid { public static string HighQualityAndroid {
get { get {
return ResourceManager.GetString("HighQualityAndroid", resourceCulture); return ResourceManager.GetString("HighQualityAndroid", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Use high quality music when patching to PC ähnelt.
/// </summary>
public static string HighQualityPC { public static string HighQualityPC {
get { get {
return ResourceManager.GetString("HighQualityPC", resourceCulture); return ResourceManager.GetString("HighQualityPC", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die INSTALL ähnelt.
/// </summary>
public static string Install { public static string Install {
get { get {
return ResourceManager.GetString("Install", resourceCulture); return ResourceManager.GetString("Install", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die INSTALLING ähnelt.
/// </summary>
public static string Installing { public static string Installing {
get { get {
return ResourceManager.GetString("Installing", resourceCulture); return ResourceManager.GetString("Installing", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Couldn&apos;t establish an internet connection! Try again later! ähnelt.
/// </summary>
public static string InternetConnectionDrop { public static string InternetConnectionDrop {
get { get {
return ResourceManager.GetString("InternetConnectionDrop", resourceCulture); return ResourceManager.GetString("InternetConnectionDrop", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME is an invalid git URL! ähnelt.
/// </summary>
public static string InvalidGitURL { public static string InvalidGitURL {
get { get {
return ResourceManager.GetString("InvalidGitURL", resourceCulture); return ResourceManager.GetString("InvalidGitURL", resourceCulture);
} }
} }
/// <summary>
/// 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.
/// </summary>
public static string JavaNotFound { public static string JavaNotFound {
get { get {
return ResourceManager.GetString("JavaNotFound", resourceCulture); return ResourceManager.GetString("JavaNotFound", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Launcher Language: (requires restart to take effect) ähnelt.
/// </summary>
public static string LanguageNotice { public static string LanguageNotice {
get { get {
return ResourceManager.GetString("LanguageNotice", resourceCulture); return ResourceManager.GetString("LanguageNotice", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Settings ähnelt.
/// </summary>
public static string LauncherSettingsTab { public static string LauncherSettingsTab {
get { get {
return ResourceManager.GetString("LauncherSettingsTab", resourceCulture); return ResourceManager.GetString("LauncherSettingsTab", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die GitHub (Primary) ähnelt.
/// </summary>
public static string MirrorGithubText { public static string MirrorGithubText {
get { get {
return ResourceManager.GetString("MirrorGithubText", resourceCulture); return ResourceManager.GetString("MirrorGithubText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die GitLab (Mirror) ähnelt.
/// </summary>
public static string MirrorGitlabText { public static string MirrorGitlabText {
get { get {
return ResourceManager.GetString("MirrorGitlabText", resourceCulture); return ResourceManager.GetString("MirrorGitlabText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME is already installed! ähnelt.
/// </summary>
public static string ModIsAlreadyInstalledMessage { public static string ModIsAlreadyInstalledMessage {
get { get {
return ResourceManager.GetString("ModIsAlreadyInstalledMessage", resourceCulture); return ResourceManager.GetString("ModIsAlreadyInstalledMessage", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME cannot be installed! It&apos;s for $OS. Download the $CURRENTOS version instead if it exists, or ask the mod authors to make one. ähnelt.
/// </summary>
public static string ModIsForWrongOS { public static string ModIsForWrongOS {
get { get {
return ResourceManager.GetString("ModIsForWrongOS", resourceCulture); return ResourceManager.GetString("ModIsForWrongOS", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME is an invalid AM2R mod! ähnelt.
/// </summary>
public static string ModIsInvalidMessage { public static string ModIsInvalidMessage {
get { get {
return ResourceManager.GetString("ModIsInvalidMessage", resourceCulture); return ResourceManager.GetString("ModIsInvalidMessage", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die $NAME was successfully added! Go to the Play Tab in order to install it! ähnelt.
/// </summary>
public static string ModSuccessfullyInstalledMessage { public static string ModSuccessfullyInstalledMessage {
get { get {
return ResourceManager.GetString("ModSuccessfullyInstalledMessage", resourceCulture); return ResourceManager.GetString("ModSuccessfullyInstalledMessage", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die News ähnelt.
/// </summary>
public static string NewsTab { public static string NewsTab {
get { get {
return ResourceManager.GetString("NewsTab", resourceCulture); return ResourceManager.GetString("NewsTab", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Couldn&apos;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.
/// </summary>
public static string NoInternetConnection { public static string NoInternetConnection {
get { get {
return ResourceManager.GetString("NoInternetConnection", resourceCulture); return ResourceManager.GetString("NoInternetConnection", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die OPEN PROFILE FOLDER ähnelt.
/// </summary>
public static string OpenProfileFolder { public static string OpenProfileFolder {
get { get {
return ResourceManager.GetString("OpenProfileFolder", resourceCulture); return ResourceManager.GetString("OpenProfileFolder", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Opens the folder where game files are located for $NAME. ähnelt.
/// </summary>
public static string OpenProfileFolderToolTip { public static string OpenProfileFolderToolTip {
get { get {
return ResourceManager.GetString("OpenProfileFolderToolTip", resourceCulture); return ResourceManager.GetString("OpenProfileFolderToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die OPEN PROFILE SAVE FOLDER ähnelt.
/// </summary>
public static string OpenSaveFolder { public static string OpenSaveFolder {
get { get {
return ResourceManager.GetString("OpenSaveFolder", resourceCulture); return ResourceManager.GetString("OpenSaveFolder", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Opens the folder where save files are located for $NAME. ähnelt.
/// </summary>
public static string OpenSaveFolderToolTip { public static string OpenSaveFolderToolTip {
get { get {
return ResourceManager.GetString("OpenSaveFolderToolTip", resourceCulture); return ResourceManager.GetString("OpenSaveFolderToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die PLAY ähnelt.
/// </summary>
public static string Play { public static string Play {
get { get {
return ResourceManager.GetString("Play", resourceCulture); return ResourceManager.GetString("Play", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Currently downloading . . . ähnelt.
/// </summary>
public static string PlayButtonDownladingToolTip { public static string PlayButtonDownladingToolTip {
get { get {
return ResourceManager.GetString("PlayButtonDownladingToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonDownladingToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Download the necessary patch files. ähnelt.
/// </summary>
public static string PlayButtonDownloadToolTip { public static string PlayButtonDownloadToolTip {
get { get {
return ResourceManager.GetString("PlayButtonDownloadToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonDownloadToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Currently installing. . . ähnelt.
/// </summary>
public static string PlayButtonInstallingToolTip { public static string PlayButtonInstallingToolTip {
get { get {
return ResourceManager.GetString("PlayButtonInstallingToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonInstallingToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Install $NAME ähnelt.
/// </summary>
public static string PlayButtonInstallToolTip { public static string PlayButtonInstallToolTip {
get { get {
return ResourceManager.GetString("PlayButtonInstallToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonInstallToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Currently already playing! ähnelt.
/// </summary>
public static string PlayButtonPlayingToolTip { public static string PlayButtonPlayingToolTip {
get { get {
return ResourceManager.GetString("PlayButtonPlayingToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonPlayingToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Play ähnelt.
/// </summary>
public static string PlayButtonPlayToolTip { public static string PlayButtonPlayToolTip {
get { get {
return ResourceManager.GetString("PlayButtonPlayToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonPlayToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Select your AM2R_1.1.zip ähnelt.
/// </summary>
public static string PlayButtonSelect11ToolTip { public static string PlayButtonSelect11ToolTip {
get { get {
return ResourceManager.GetString("PlayButtonSelect11ToolTip", resourceCulture); return ResourceManager.GetString("PlayButtonSelect11ToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die PLAYING ähnelt.
/// </summary>
public static string Playing { public static string Playing {
get { get {
return ResourceManager.GetString("Playing", resourceCulture); return ResourceManager.GetString("Playing", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Play ähnelt.
/// </summary>
public static string PlayTab { public static string PlayTab {
get { get {
return ResourceManager.GetString("PlayTab", resourceCulture); return ResourceManager.GetString("PlayTab", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Create game debug logs ähnelt.
/// </summary>
public static string ProfileDebugCheckBox { public static string ProfileDebugCheckBox {
get { get {
return ResourceManager.GetString("ProfileDebugCheckBox", resourceCulture); return ResourceManager.GetString("ProfileDebugCheckBox", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Profile notes: ähnelt.
/// </summary>
public static string ProfileNotes { public static string ProfileNotes {
get { get {
return ResourceManager.GetString("ProfileNotes", resourceCulture); return ResourceManager.GetString("ProfileNotes", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Mod Settings ähnelt.
/// </summary>
public static string ProfileSettingsTab { public static string ProfileSettingsTab {
get { get {
return ResourceManager.GetString("ProfileSettingsTab", resourceCulture); return ResourceManager.GetString("ProfileSettingsTab", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Progress: ähnelt.
/// </summary>
public static string ProgressbarProgress { public static string ProgressbarProgress {
get { get {
return ResourceManager.GetString("ProgressbarProgress", resourceCulture); return ResourceManager.GetString("ProgressbarProgress", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The Official AM2R Subreddit ähnelt.
/// </summary>
public static string RedditToolTip { public static string RedditToolTip {
get { get {
return ResourceManager.GetString("RedditToolTip", resourceCulture); return ResourceManager.GetString("RedditToolTip", resourceCulture);
} }
} }
/// <summary>
/// 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.
/// </summary>
public static string SaveLocationWarning { public static string SaveLocationWarning {
get { get {
return ResourceManager.GetString("SaveLocationWarning", resourceCulture); return ResourceManager.GetString("SaveLocationWarning", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die SELECT AM2R_1.1.zip ähnelt.
/// </summary>
public static string Select11 { public static string Select11 {
get { get {
return ResourceManager.GetString("Select11", resourceCulture); return ResourceManager.GetString("Select11", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Select AM2R_1.1.zip ähnelt.
/// </summary>
public static string Select11FileDialog { public static string Select11FileDialog {
get { get {
return ResourceManager.GetString("Select11FileDialog", resourceCulture); return ResourceManager.GetString("Select11FileDialog", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Select your Mod ähnelt.
/// </summary>
public static string SelectModFileDialog { public static string SelectModFileDialog {
get { get {
return ResourceManager.GetString("SelectModFileDialog", resourceCulture); return ResourceManager.GetString("SelectModFileDialog", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Success ähnelt.
/// </summary>
public static string SuccessWindowTitle { public static string SuccessWindowTitle {
get { get {
return ResourceManager.GetString("SuccessWindowTitle", resourceCulture); return ResourceManager.GetString("SuccessWindowTitle", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die System Language ähnelt.
/// </summary>
public static string SystemLanguage { public static string SystemLanguage {
get { get {
return ResourceManager.GetString("SystemLanguage", resourceCulture); return ResourceManager.GetString("SystemLanguage", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Show Launcher ähnelt.
/// </summary>
public static string TrayButtonShow { public static string TrayButtonShow {
get { get {
return ResourceManager.GetString("TrayButtonShow", resourceCulture); return ResourceManager.GetString("TrayButtonShow", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Can&apos;t access the Folder in order to download the update! Consider moving the program, or disabling auto-updates. ähnelt.
/// </summary>
public static string UnauthorizedAccessMessage { public static string UnauthorizedAccessMessage {
get { get {
return ResourceManager.GetString("UnauthorizedAccessMessage", resourceCulture); return ResourceManager.GetString("UnauthorizedAccessMessage", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Unhandled Exception has occured in your Application. ähnelt.
/// </summary>
public static string UnhandledException { public static string UnhandledException {
get { get {
return ResourceManager.GetString("UnhandledException", resourceCulture); return ResourceManager.GetString("UnhandledException", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Select Mod Update ähnelt.
/// </summary>
public static string UpdateMod { public static string UpdateMod {
get { get {
return ResourceManager.GetString("UpdateMod", resourceCulture); return ResourceManager.GetString("UpdateMod", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die UPDATE MOD ähnelt.
/// </summary>
public static string UpdateModButtonText { public static string UpdateModButtonText {
get { get {
return ResourceManager.GetString("UpdateModButtonText", resourceCulture); return ResourceManager.GetString("UpdateModButtonText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Select a zip to update $NAME. ähnelt.
/// </summary>
public static string UpdateModButtonToolTip { public static string UpdateModButtonToolTip {
get { get {
return ResourceManager.GetString("UpdateModButtonToolTip", resourceCulture); return ResourceManager.GetString("UpdateModButtonToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Can&apos;t update $NAME with $SELECT. Add $SELECT as a new mod instead! ähnelt.
/// </summary>
public static string UpdateModButtonWrongMod { public static string UpdateModButtonWrongMod {
get { get {
return ResourceManager.GetString("UpdateModButtonWrongMod", resourceCulture); return ResourceManager.GetString("UpdateModButtonWrongMod", resourceCulture);
} }
} }
/// <summary>
/// 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.
/// </summary>
public static string UpdateModWarning { public static string UpdateModWarning {
get { get {
return ResourceManager.GetString("UpdateModWarning", resourceCulture); return ResourceManager.GetString("UpdateModWarning", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Version: ähnelt.
/// </summary>
public static string VersionLabel { public static string VersionLabel {
get { get {
return ResourceManager.GetString("VersionLabel", resourceCulture); return ResourceManager.GetString("VersionLabel", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die OK ähnelt.
/// </summary>
public static string WarningWindowOk { public static string WarningWindowOk {
get { get {
return ResourceManager.GetString("WarningWindowOk", resourceCulture); return ResourceManager.GetString("WarningWindowOk", resourceCulture);
} }
} }
/// <summary>
/// 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.
/// </summary>
public static string WarningWindowText { public static string WarningWindowText {
get { get {
return ResourceManager.GetString("WarningWindowText", resourceCulture); return ResourceManager.GetString("WarningWindowText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die WARNING ähnelt.
/// </summary>
public static string WarningWindowTitle { public static string WarningWindowTitle {
get { get {
return ResourceManager.GetString("WarningWindowTitle", resourceCulture); return ResourceManager.GetString("WarningWindowTitle", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Xdelta not found! Cannot install Profiles without it. Please install xdelta3 from your local package manager. ähnelt.
/// </summary>
public static string XdeltaNotFound { public static string XdeltaNotFound {
get { get {
return ResourceManager.GetString("XdeltaNotFound", resourceCulture); return ResourceManager.GetString("XdeltaNotFound", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The Community-Developers YouTube Channel ähnelt.
/// </summary>
public static string YoutubeToolTip { public static string YoutubeToolTip {
get { get {
return ResourceManager.GetString("YoutubeToolTip", resourceCulture); return ResourceManager.GetString("YoutubeToolTip", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Zip Archives (*.zip) ähnelt.
/// </summary>
public static string ZipArchiveText { public static string ZipArchiveText {
get { get {
return ResourceManager.GetString("ZipArchiveText", resourceCulture); return ResourceManager.GetString("ZipArchiveText", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The selected Zip is not AM2R 1.1! Please choose another Zip file. ähnelt.
/// </summary>
public static string ZipIsNotAM2R11 { public static string ZipIsNotAM2R11 {
get { get {
return ResourceManager.GetString("ZipIsNotAM2R11", resourceCulture); return ResourceManager.GetString("ZipIsNotAM2R11", resourceCulture);
} }
} }
public static string ArchiveMod {
get {
return ResourceManager.GetString("ArchiveMod", resourceCulture);
}
}
} }
} }

@ -382,4 +382,7 @@ Proceed with caution.</value>
<data name="ZipIsNotAM2R11" xml:space="preserve"> <data name="ZipIsNotAM2R11" xml:space="preserve">
<value>The selected Zip is not AM2R 1.1! Please choose another Zip file.</value> <value>The selected Zip is not AM2R 1.1! Please choose another Zip file.</value>
</data> </data>
<data name="ArchiveMod" xml:space="preserve">
<value>Do you want to archive $NAME?</value>
</data>
</root> </root>

@ -104,46 +104,8 @@ namespace AM2RLauncher
if (currentXML.Version != profileList[0].Version) if (currentXML.Version != profileList[0].Version)
{ {
log.Info("New game version (" + profileList[0].Version + ") detected! Beginning archival of version " + currentXML.Version + "..."); log.Info("New game version (" + profileList[0].Version + ") detected! Beginning archival of version " + currentXML.Version + "...");
Profile.ArchiveProfile(currentXML);
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<ProfileXML>(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.");
}
profileDropDown.SelectedIndex = 0; profileDropDown.SelectedIndex = 0;
LoadProfilesAndAdjustLists(); LoadProfilesAndAdjustLists();
} }
} }
@ -540,8 +502,6 @@ namespace AM2RLauncher
{ {
log.Info("User requested to add mod. Requesting user input for new mod .zip..."); log.Info("User requested to add mod. Requesting user input for new mod .zip...");
ProfileXML addedProfile;
OpenFileDialog fileFinder = new OpenFileDialog OpenFileDialog fileFinder = new OpenFileDialog
{ {
Directory = new Uri(CrossPlatformOperations.CURRENTPATH), Directory = new Uri(CrossPlatformOperations.CURRENTPATH),
@ -557,8 +517,13 @@ namespace AM2RLauncher
return; return;
} }
if (!String.IsNullOrWhiteSpace(fileFinder.FileName)) // This is default if (String.IsNullOrWhiteSpace(fileFinder.FileName))
{ {
log.Error("User did not supply valid input. Cancelling import.");
LoadProfilesAndAdjustLists();
return;
}
log.Info("User selected \"" + fileFinder.FileName + "\""); log.Info("User selected \"" + fileFinder.FileName + "\"");
// If either a directory was selected or the file somehow went missing, cancel // If either a directory was selected or the file somehow went missing, cancel
@ -621,20 +586,12 @@ namespace AM2RLauncher
return; return;
} }
addedProfile = profile;
log.Info(profile.Name + " successfully installed."); log.Info(profile.Name + " successfully installed.");
MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", profile.Name), Language.Text.SuccessWindowTitle); MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", profile.Name), Language.Text.SuccessWindowTitle);
}
else
{
log.Error("User did not supply valid input. Cancelling import.");
LoadProfilesAndAdjustLists();
return;
}
LoadProfilesAndAdjustLists(); 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) if (settingsProfileDropDown.SelectedIndex == -1)
settingsProfileDropDown.SelectedIndex = 0; settingsProfileDropDown.SelectedIndex = 0;
} }
@ -682,7 +639,8 @@ namespace AM2RLauncher
{ {
deleteModButton.Enabled = true; deleteModButton.Enabled = true;
deleteModButton.ToolTip = Language.Text.DeleteModButtonToolTip.Replace("$NAME", settingsProfileDropDown.Items[settingsProfileDropDown.SelectedIndex].Text); 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); updateModButton.ToolTip = Language.Text.UpdateModButtonToolTip.Replace("$NAME", settingsProfileDropDown.Items[settingsProfileDropDown.SelectedIndex].Text);
} }
@ -979,8 +937,14 @@ namespace AM2RLauncher
return; return;
} }
if (!String.IsNullOrWhiteSpace(fileFinder.FileName)) // This is default // Exit if nothing was selected
if (String.IsNullOrWhiteSpace(fileFinder.FileName))
{ {
log.Info("Nothing was selected, cancelling mod update.");
LoadProfilesAndAdjustLists();
return;
}
log.Info("User selected \"" + fileFinder.FileName + "\""); log.Info("User selected \"" + fileFinder.FileName + "\"");
// If either a directory was selected or the file somehow went missing, cancel // If either a directory was selected or the file somehow went missing, cancel
@ -994,40 +958,58 @@ namespace AM2RLauncher
string modsDir = new DirectoryInfo(CrossPlatformOperations.CURRENTPATH + "/Mods").FullName; string modsDir = new DirectoryInfo(CrossPlatformOperations.CURRENTPATH + "/Mods").FullName;
string extractedName = modFile.Name.Replace(".zip", "_new"); string extractedName = modFile.Name.Replace(".zip", "_new");
string extractedFolder = modsDir + "/" + extractedName;
// Extract it and see if it contains a profile.xml. If not, this is invalid // Extract it and see if it contains a profile.xml. If not, this is invalid
// If for some reason old files remain, delete them
if (Directory.Exists(extractedFolder))
Directory.Delete(extractedFolder, true);
// Directory doesn't exist -> extract! // Directory doesn't exist -> extract!
ZipFile.ExtractToDirectory(fileFinder.FileName, modsDir + "/" + extractedName); ZipFile.ExtractToDirectory(fileFinder.FileName, extractedFolder);
// Let's check if profile.xml exists in there! If it doesn't throw an error and cleanup // 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")) if (!File.Exists(extractedFolder + "/profile.xml"))
{ {
log.Error(fileFinder.FileName + " does not contain profile.xml! Cancelling mod update."); 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); MessageBox.Show(Language.Text.ModIsInvalidMessage.Replace("$NAME", extractedName), Language.Text.ErrorWindowTitle, MessageBoxType.Error);
Directory.Delete(modsDir + "/" + extractedName, true); Directory.Delete(extractedFolder, true);
File.Delete(CrossPlatformOperations.CURRENTPATH + "/Mods/" + modFile.Name); File.Delete(CrossPlatformOperations.CURRENTPATH + "/Mods/" + modFile.Name);
return; return;
} }
// Check by *name*, if the mod was installed already // Check by *name*, if the mod was installed already
ProfileXML profile = Serializer.Deserialize<ProfileXML>(File.ReadAllText(modsDir + "/" + extractedName + "/profile.xml")); ProfileXML profile = Serializer.Deserialize<ProfileXML>(File.ReadAllText(extractedFolder + "/profile.xml"));
if (profileList.FirstOrDefault(p => p.Name == profile.Name) != null || Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name)) if (profileList.FirstOrDefault(p => p.Name == profile.Name) != null || Directory.Exists(CrossPlatformOperations.CURRENTPATH + "/Profiles/" + profile.Name))
{ {
// Mod is already installed, so we can update! // Mod is already installed, so we can update!
DialogResult result = MessageBox.Show(Language.Text.UpdateModWarning.Replace("$NAME", currentProfile.Name), Language.Text.WarningWindowTitle, DialogResult updateResult = MessageBox.Show(Language.Text.UpdateModWarning.Replace("$NAME", currentProfile.Name), Language.Text.WarningWindowTitle,
MessageBoxButtons.OKCancel, MessageBoxType.Warning, MessageBoxDefaultButton.Cancel); MessageBoxButtons.OKCancel, MessageBoxType.Warning, MessageBoxDefaultButton.Cancel);
if (result == DialogResult.Ok) if (updateResult == DialogResult.Ok)
{
// If the profile isn't installed, don't ask about archiving it
if (Profile.IsProfileInstalled(currentProfile))
{ {
// Delete profile //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); DeleteProfileAndAdjustLists(currentProfile);
// Rename directory to take the old one's place // Rename directory to take the old one's place
string originalFolder = modsDir + "/" + extractedName.Replace("_new", ""); string originalFolder = modsDir + "/" + extractedName.Replace("_new", "");
Directory.Move(modsDir + "/" + extractedName, originalFolder); Directory.Move(extractedFolder, originalFolder);
} }
else // Cancel the operation! else // Cancel the operation!
{ {
@ -1048,7 +1030,7 @@ namespace AM2RLauncher
if (abort) if (abort)
{ {
// File cleanup // File cleanup
HelperMethods.DeleteDirectory(modsDir + "/" + extractedName); HelperMethods.DeleteDirectory(extractedFolder);
LoadProfilesAndAdjustLists(); LoadProfilesAndAdjustLists();
return; return;
} }
@ -1056,11 +1038,10 @@ namespace AM2RLauncher
log.Info("Successfully updated mod profile " + profile.Name + "."); log.Info("Successfully updated mod profile " + profile.Name + ".");
MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", currentProfile.Name), Language.Text.SuccessWindowTitle); MessageBox.Show(Language.Text.ModSuccessfullyInstalledMessage.Replace("$NAME", currentProfile.Name), Language.Text.SuccessWindowTitle);
UpdateStateMachine(); UpdateStateMachine();
}
ProfileXML currentSelectedProfile = profileList[settingsProfileDropDown.SelectedIndex];
LoadProfilesAndAdjustLists(); LoadProfilesAndAdjustLists();
settingsProfileDropDown.SelectedIndex = profileList.FindIndex(p => p.Name == currentSelectedProfile.Name);
settingsProfileDropDown.SelectedIndex = profileList.FindIndex(p => p.Name == currentProfile.Name);
if (settingsProfileDropDown.SelectedIndex == -1) if (settingsProfileDropDown.SelectedIndex == -1)
settingsProfileDropDown.SelectedIndex = 0; settingsProfileDropDown.SelectedIndex = 0;
} }

@ -285,7 +285,8 @@ namespace AM2RLauncher
{ {
// Archive version notes // Archive version notes
if (!profile.Installable) 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); profileDropDown.Items.Add(profile.Name);
} }
@ -337,5 +338,11 @@ namespace AM2RLauncher
Profile.DeleteProfile(profile); Profile.DeleteProfile(profile);
LoadProfilesAndAdjustLists(); LoadProfilesAndAdjustLists();
} }
private void ArchiveProfileAndAdjustLists(ProfileXML profile)
{
Profile.ArchiveProfile(profile);
LoadProfilesAndAdjustLists();
}
} }
} }

@ -45,12 +45,6 @@ public static class Profile
/// </summary> /// </summary>
private static string lastAM2R11ZipMD5 = ""; private static string lastAM2R11ZipMD5 = "";
/*/// <summary>
/// Checks if AM2R 1.1 has been installed already, aka if a valid AM2R 1.1 Zip exists.
/// </summary>
/// <returns><see langword="true"/> if yes, <see langword="false"/> if not.</returns>*/
/// <summary> /// <summary>
/// Checks if AM2R 1.1 has been installed already, aka if a valid AM2R 1.1 Zip exists. /// Checks if AM2R 1.1 has been installed already, aka if a valid AM2R 1.1 Zip exists.
/// </summary> /// </summary>
@ -131,10 +125,6 @@ public static class Profile
} }
log.Info("Repository pulled successfully."); log.Info("Repository pulled successfully.");
} }
/*
/// <summary>
/// Scans the PatchData and Mods folders for valid profile entries, and loads them.
/// </summary>*/
/// <summary> /// <summary>
/// Scans the PatchData and Mods folders for valid profile entries, creates and returns a list of 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; return profileList;
} }
/// <summary>
/// Archives a given Profile by making a copy with "Name (version)". Does silently nothing if user archives already exist
/// </summary>
/// <param name="profile">The profile to archive</param>
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<ProfileXML>(profile));
profile = Serializer.Deserialize<ProfileXML>(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<ProfileXML>(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.");
}
}
/// <summary> /// <summary>
/// Deletes a profile from the Mods and Profiles folder. /// Deletes a profile from the Mods and Profiles folder.
/// </summary> /// </summary>

Loading…
Cancel
Save