diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs b/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs
index 6a6a6e3..69e03ec 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.Designer.cs
@@ -141,12 +141,6 @@ namespace AM2RLauncher.Language {
}
}
- public static string CustomEnvVarLabel {
- get {
- return ResourceManager.GetString("CustomEnvVarLabel", resourceCulture);
- }
- }
-
public static string CustomMirrorCheck {
get {
return ResourceManager.GetString("CustomMirrorCheck", resourceCulture);
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.de.resx b/AM2RLauncher/AM2RLauncher/Language/Text.de.resx
index c74137a..33708ac 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.de.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.de.resx
@@ -165,9 +165,6 @@
Aktuelles Profil:
-
- Benutzerdefinierte Spielumgebungsvariablen eingeben:
-
Nutze benutzerdefinierten Spiegelserver
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.es.resx b/AM2RLauncher/AM2RLauncher/Language/Text.es.resx
index 6b94e99..935b1bf 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.es.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.es.resx
@@ -165,9 +165,6 @@
Perfil actual:
-
- Introducir variables personalizadas del entorno de juego:
-
Utilizar enlace de descarga personalizado
@@ -386,4 +383,7 @@ Procede con cautela.
Esta es una versión archivada de un Mod instalado anteriormente. No puede ser reinstalada y se eliminará automáticamente si se borran sus archivos de juego.
+
+ El Espacio Oficial de Matrix para AM2R
+
\ No newline at end of file
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx b/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx
index 171abe7..61f577b 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx
@@ -167,9 +167,6 @@ ce profil !
Profil actuel :
-
- Entrez des variables d'environnement de jeu personnalisées :
-
Utiliser un mirroir personnalisé
@@ -388,4 +385,7 @@ Soyez prudent.
Il s'agit d'une archive d'un mod précédemment installé. Il ne peut pas être réinstallé et se supprimera de lui-même si ses fichiers de jeu sont supprimés.
+
+ Le Matrix Space AM2R officiel
+
\ No newline at end of file
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.it.resx b/AM2RLauncher/AM2RLauncher/Language/Text.it.resx
index 70e05b6..a1fcfe4 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.it.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.it.resx
@@ -165,9 +165,6 @@
Profilo corrente:
-
- Inserisci variabili personalizzate dell'ambiente di gioco:
-
Usa un mirror di download personalizzato.
@@ -386,4 +383,7 @@ Procedi con cautela.
Questo è un archivio di una Mod precedentemente installata. Non può essere re-installata e si rimuoverà da sola se i suoi file di gioco vengono rimossi.
+
+ La Matrix Space ufficiale di AM2R
+
\ No newline at end of file
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx b/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx
index c52ba8e..a0af8fa 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx
@@ -165,9 +165,6 @@
現在のプロファイル:
-
- ゲームのカスタム環境変数の入力:
-
ダウンロードするサイトを指定
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx b/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx
index 36b104b..c70599f 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx
@@ -165,9 +165,6 @@
Perfil atual:
-
- Insira variáveis de ambiente customizadas para o jogo:
-
Usar link de download customizado
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.resx b/AM2RLauncher/AM2RLauncher/Language/Text.resx
index 6059df9..0ea2444 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.resx
@@ -165,9 +165,6 @@
Current profile:
-
- Enter custom game environment variables:
-
Use custom download mirror
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx b/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx
index 4c86c02..3110535 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx
@@ -165,9 +165,6 @@
Текущий профиль:
-
- Введите пользовательские переменные игры:
-
Использовать пользовательское зеркало для загрузки
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx b/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx
index 4661dbf..06a0a74 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx
@@ -165,9 +165,6 @@
当前游戏实例:
-
- 输入自定义的游戏环境变量:
-
使用自定义的下载镜像
@@ -388,4 +385,7 @@
此为以前安装过的 Mod 的归档,无法重新安装,若对应的游戏文件被删除,该归档也会自行删除。
+
+ AM2R 官方 Matrix 空间
+
\ No newline at end of file
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
index c2aa4ca..5f821cd 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
@@ -136,7 +136,7 @@ public partial class MainForm : Form
{
//Only pull if Patchdata is cloned and user wants it updated
LoadProfilesAndAdjustLists();
- if (!Profile.IsPatchDataCloned() || !(bool)autoUpdateAM2RCheck.Checked)
+ if (!Profile.IsPatchDataCloned() || !autoUpdateAM2RCheck.Checked.Value)
return;
SetPlayButtonState(PlayButtonState.Downloading);
@@ -427,13 +427,12 @@ public partial class MainForm : Form
trayIndicator.Visible = true;
WindowState windowStateBeforeLaunching = WindowState;
Minimize();
-
- string envVarText = customEnvVarTextBox?.Text;
+
bool createDebugLogs = profileDebugLogCheck.Checked.Value;
try
{
- await Task.Run(() => Profile.RunGame(profile, createDebugLogs, envVarText));
+ await Task.Run(() => Profile.RunGame(profile, createDebugLogs));
}
catch
{
@@ -559,14 +558,14 @@ public partial class MainForm : Form
private void AutoUpdateAM2RCheckChanged(object sender, EventArgs e)
{
log.Info("Auto Update AM2R has been set to " + autoUpdateAM2RCheck.Checked + ".");
- WriteToConfig("AutoUpdateAM2R", (bool)autoUpdateAM2RCheck.Checked);
+ WriteToConfig("AutoUpdateAM2R", autoUpdateAM2RCheck.Checked.Value);
}
/// Gets called when gets clicked and writes its new value to the config.
private void AutoUpdateLauncherCheckChanged(object sender, EventArgs e)
{
log.Info("Auto Update Launcher has been set to " + autoUpdateAM2RCheck.Checked + ".");
- WriteToConfig("AutoUpdateLauncher", (bool)autoUpdateAM2RCheck.Checked);
+ WriteToConfig("AutoUpdateLauncher", autoUpdateAM2RCheck.Checked.Value);
}
/// Gets called when gets clicked and writes its new value to the config.
@@ -624,12 +623,12 @@ public partial class MainForm : Form
private void CustomMirrorCheckChanged(object sender, EventArgs e)
{
log.Info("Use Custom Mirror option has been set to " + customMirrorCheck.Checked + ".");
- WriteToConfig("CustomMirrorEnabled", (bool)customMirrorCheck.Checked);
+ WriteToConfig("CustomMirrorEnabled", customMirrorCheck.Checked.Value);
EnableMirrorControlsAccordingly();
// Create warning dialog when enabling
- if ((bool)customMirrorCheck.Checked)
+ if (customMirrorCheck.Checked.Value)
{
MessageBox.Show(this, Text.WarningWindowText, Text.WarningWindowTitle, MessageBoxType.Warning);
currentMirror = customMirrorTextBox.Text;
@@ -671,16 +670,7 @@ public partial class MainForm : Form
log.Info("Custom Mirror has been set to " + currentMirror + ".");
}
-
- ///
- /// If has lost focus, we write its text to the config.
- ///
- private void CustomEnvVarTextBoxLostFocus(object sender, EventArgs e)
- {
- log.Info("Custom Environment variables have been set to \"" + customEnvVarTextBox.Text + "\".");
- WriteToConfig("CustomEnvVar", customEnvVarTextBox.Text);
- }
-
+
#endregion
#region MOD SETTINGS
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs
index 07766d8..06b364c 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs
@@ -542,31 +542,7 @@ public partial class MainForm : Form
Text = Text.ProfileDebugCheckBox,
TextColor = colorGreen
};
-
- //TODO: potentially make this on all platforms?
- // Custom environment variables label
- Label customEnvVarLabel = new Label();
- if (OS.IsLinux)
- {
- customEnvVarLabel = new Label
- {
- Text = Text.CustomEnvVarLabel,
- TextColor = colorGreen
- };
- }
-
- // Custom environment variables textbox
- customEnvVarTextBox = null;
- if (OS.IsLinux)
- {
- customEnvVarTextBox = new TextBox
- {
- Text = ReadFromConfig("CustomEnvVar"),
- BackgroundColor = colorBGNoAlpha,
- TextColor = colorGreen
- };
- }
-
+
// Mirror list
mirrorLabel = new Label
{
@@ -617,9 +593,7 @@ public partial class MainForm : Form
autoUpdateLauncherCheck,
hqMusicPCCheck,
hqMusicAndroidCheck,
- profileDebugLogCheck,
- customEnvVarLabel,
- (Control)customEnvVarTextBox ?? new Label(),
+ profileDebugLogCheck,
mirrorLabel,
mirrorDropDown,
customMirrorCheck,
@@ -800,8 +774,6 @@ public partial class MainForm : Form
deleteModButton.Click += DeleteModButtonClicked;
updateModButton.Click += UpdateModButtonClicked;
profileDebugLogCheck.CheckedChanged += ProfileDebugLogCheckedChanged;
- if (OS.IsLinux)
- customEnvVarTextBox.LostFocus += CustomEnvVarTextBoxLostFocus;
//TODO: Retest if these now work on mac
newsWebView.DocumentLoaded += (_, _) => ChangeToEmptyPageOnNoInternet(newsPage, newsNoConnectionLabel);
@@ -901,8 +873,6 @@ public partial class MainForm : Form
/// A , where the user can input their custom mirror.
private readonly TextBox customMirrorTextBox;
- /// A , where the user can input their custom environment variables.
- private readonly TextBox customEnvVarTextBox;
/// A , where the notes from the current selected profile in are displayed.
private readonly TextArea profileNotesTextArea;
diff --git a/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs b/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs
index 6bebaa7..a2bb1e6 100644
--- a/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs
+++ b/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs
@@ -51,10 +51,6 @@ public class LauncherConfigXML
[XmlAttribute("ProfileDebugLog")]
public bool ProfileDebugLog
{ get; set; }
- /// Indicates the custom environment variable(s) as text. Used for
- [XmlAttribute("CustomEnvVar")]
- public string CustomEnvVar
- { get; set; }
/// Indicates the Width of the Launcher.
[XmlAttribute("Width")]
public int Width
@@ -108,7 +104,6 @@ public class LauncherConfigXML
CustomMirrorEnabled = false;
CustomMirrorText = "";
ProfileDebugLog = true;
- CustomEnvVar = "";
Width = 600;
Height = 600;
IsMaximized = false;
@@ -124,7 +119,6 @@ public class LauncherConfigXML
/// Parameter that indicates if is enabled or not.
/// Parameter that saves the index of the selected profile of .
/// Parameter that saves the index of the selected mirror in .
- /// Parameter that saves custom Environment variables that will be used on Linux for launching a game.
/// Parameter that indicates if is enabled or not.
/// Parameter that indicates if is enabled or not.
/// Parameter that's used for .
@@ -132,7 +126,7 @@ public class LauncherConfigXML
/// Parameter that indicates the height of .
/// Parameter that indicates if has been set to fullscreen or not.
public LauncherConfigXML(bool autoUpdateAM2R, bool autoUpdateLauncher, string language, bool musicHQPC, bool musicHQAndroid,
- string profileIndex, int mirrorIndex, bool profileDebugLog, string customEnvVar, bool customMirrorEnabled,
+ string profileIndex, int mirrorIndex, bool profileDebugLog, bool customMirrorEnabled,
string customMirrorText, int width, int height, bool isMaximized)
{
AutoUpdateAM2R = autoUpdateAM2R;
@@ -145,7 +139,6 @@ public class LauncherConfigXML
CustomMirrorEnabled = customMirrorEnabled;
CustomMirrorText = customMirrorText;
ProfileDebugLog = profileDebugLog;
- CustomEnvVar = customEnvVar;
Width = width;
Height = height;
IsMaximized = isMaximized;
diff --git a/AM2RLauncher/AM2RLauncherLib/Profile.cs b/AM2RLauncher/AM2RLauncherLib/Profile.cs
index e8365dd..6463b29 100644
--- a/AM2RLauncher/AM2RLauncherLib/Profile.cs
+++ b/AM2RLauncher/AM2RLauncherLib/Profile.cs
@@ -651,8 +651,7 @@ public static class Profile
///
/// The that should be run.
/// Whether game logging should take place.
- /// Environment variables with which the game should be launched. Linux only.
- public static void RunGame(ProfileXML profile, bool useLogging, string envVars = "")
+ public static void RunGame(ProfileXML profile, bool useLogging)
{
// These are used on all OS for game logging
string savePath = OS.IsWindows ? Environment.ExpandEnvironmentVariables(profile.SaveLocation)
@@ -707,25 +706,6 @@ public static class Profile
else if (OS.IsLinux)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
- log.Info($"User does {(String.IsNullOrWhiteSpace(envVars) ? "not" : "")} have custom environment variables set.");
-
- // Set environment variables to startInfo
- if (!String.IsNullOrWhiteSpace(envVars))
- {
- // All env vars are of format "myVar=myValue foo=bar" etc., so split them by space
- string[] providedVariables = envVars.Split(' ');
- foreach (string providedVariable in providedVariables)
- {
- // After that, we split by '=' where the left is the variable and right is the value
- // If there is a malformed env var, this will throw.
- string[] variableAsArray = providedVariable.Split('=');
- string variable = variableAsArray[0];
- string value = variableAsArray[1];
-
- log.Info($"Adding user variable \"{variable}\" with value \"{value}\"");
- startInfo.EnvironmentVariables[variable] = value;
- }
- }
startInfo.UseShellExecute = false;
startInfo.WorkingDirectory = gameDirectory;