Some naming consistency + cleaning

pull/35/head
Miepee 4 years ago
parent 8f66290032
commit 33f8e974cd

@ -44,7 +44,7 @@ internal static class MainClass
#endif
//Log Wine
if (OS.IsThisRunningFromWine) log.Info("Currently running from WINE!");
if (OS.IsThisRunningFromWINE) log.Info("Currently running from WINE!");
// Try catch in case it ever crashes before actually getting to the Eto application
try

@ -498,7 +498,7 @@ public partial class MainForm : Form
bool useHQMusic = hqMusicAndroidCheck.Checked.Value;
Progress<int> progressIndicator = new Progress<int>(UpdateProgressBar);
await Task.Run(() => Profile.CreateAPK(profileList[profileIndex.Value], useHQMusic, progressIndicator));
await Task.Run(() => Profile.CreateApk(profileList[profileIndex.Value], useHQMusic, progressIndicator));
SetApkButtonState(ApkButtonState.Create);
DisableProgressBar();

@ -5,7 +5,6 @@ using AM2RLauncher.Properties;
using Eto.Drawing;
using Eto.Forms;
using log4net;
using Pablo.Controls;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -284,7 +283,7 @@ public partial class MainForm : Form
// Version number label
Label versionLabel = new Label
{
Text = $"v{VERSION}{(OS.IsThisRunningFromWine ? "-WINE" : "")}",
Text = $"v{VERSION}{(OS.IsThisRunningFromWINE ? "-WINE" : "")}",
Width = 48, TextAlignment = TextAlignment.Right, TextColor = LauncherColors.Green,
Font = new Font(SystemFont.Default, 12)
};
@ -300,7 +299,7 @@ public partial class MainForm : Form
mainLayout.AddSpace();
// Yes, I'm hard-coding this string. Linux users can english.
Label wineLabel = OS.IsThisRunningFromWine ? new Label { Text = "Unsupported", TextColor = LauncherColors.Red, TextAlignment = TextAlignment.Right } : null;
Label wineLabel = OS.IsThisRunningFromWINE ? new Label { Text = "Unsupported", TextColor = LauncherColors.Red, TextAlignment = TextAlignment.Right } : null;
mainLayout.AddColumn(versionLabel, wineLabel);
drawable.Content = mainLayout;

@ -2,7 +2,6 @@
using System;
using System.IO;
using System.Net;
using System.Net.NetworkInformation;
using System.Security.Cryptography;
namespace AM2RLauncherLib;

@ -51,7 +51,7 @@ public static class OS
/// <summary>
/// Checks if this is run via WINE.
/// </summary>
public static readonly bool IsThisRunningFromWine = CheckIfRunFromWINE();
public static readonly bool IsThisRunningFromWINE = CheckIfRunFromWINE();
/// <summary>
/// Checks if this is run via Flatpak.

@ -461,7 +461,7 @@ public static class Profile
if (OS.IsLinux)
{
string assetsPath = profilePath;
profilePath = profilePath.Substring(0, profilePath.LastIndexOf("/"));
profilePath = $"{Core.ProfilesPath}/{profile.Name}";
// Rename all songs to lowercase
foreach (FileInfo file in new DirectoryInfo(assetsPath).GetFiles())
@ -571,7 +571,7 @@ public static class Profile
/// <param name="profile"><see cref="ProfileXML"/> to be compiled into an APK.</param>
/// <param name="useHqMusic">Whether to create the APK with high quality music or not.</param>
/// <param name="progress">Provides the current progress of this method.</param>
public static void CreateAPK(ProfileXML profile, bool useHqMusic, IProgress<int> progress)
public static void CreateApk(ProfileXML profile, bool useHqMusic, IProgress<int> progress)
{
// Overall safety check just in case of bad situations
if (!profile.SupportsAndroid)
@ -695,7 +695,7 @@ public static class Profile
// Write log header to file
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append($"AM2RLauncher {Core.Version} log generated at {date}");
if (OS.IsThisRunningFromWine)
if (OS.IsThisRunningFromWINE)
stringBuilder.Append("Using WINE!");
File.WriteAllText(logFile, stringBuilder.ToString());
@ -725,15 +725,16 @@ public static class Profile
if (!File.Exists(am2rConfigPath))
File.WriteAllText(am2rConfigPath, "[Screen]\nFullscreen=\"0\"\nScale=\"3\"");
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = false;
startInfo.WorkingDirectory = gameDirectory;
ProcessStartInfo startInfo = new ProcessStartInfo
{
UseShellExecute = false,
WorkingDirectory = gameDirectory,
#if NOAPPIMAGE
startInfo.FileName = $"{gameDirectory}/runner";
FileName = $"{gameDirectory}/runner"
#else
startInfo.FileName = $"{gameDirectory}/AM2R.AppImage";
FileName = $"{gameDirectory}/AM2R.AppImage"
#endif
};
log.Info($"CWD of Profile is {startInfo.WorkingDirectory}");

Loading…
Cancel
Save