Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions MaiChartManager/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,38 @@ private void StartClicked(object? sender, EventArgs? e)
return;
}

try
{
string mlDllPath = Path.Combine(StaticSettings.GamePath, "MelonLoader", "MelonLoader.dll");
if (!File.Exists(mlDllPath))
{
mlDllPath = Path.Combine(StaticSettings.GamePath, "..", "MelonLoader", "MelonLoader.dll");
}

if (File.Exists(mlDllPath))
{
var versionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(mlDllPath);
string version = versionInfo.ProductVersion ?? "unknown";

if (!version.StartsWith("0.6.4"))
{
// i8n pls
var dialogResult = MessageBox.Show(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not very important and no need to msgbox on startup. banner in mod setting page is ok

$"Detected MelonLoader version {version}, but 0.6.4 is recommended for stability. Continue anyway?",
"MelonLoader Version Warning",
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning);

if (dialogResult == DialogResult.No) return;
}
}
}
catch (Exception ex)
{
// add i8n, pleeeeease
Console.WriteLine($"Failed to check MelonLoader version: {ex.Message}");
}
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.

if (ContainsSpecialCharacters(StaticSettings.GamePath))
{
MessageBox.Show(Locale.PathContainsSpecialChars, Locale.PathContainsSpecialCharsTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
Expand Down