mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 04:34:16 +01:00
feat: add a disclaimer for release builds when running as a debug build to injector
This commit is contained in:
parent
21dcdcd891
commit
4033b83706
1 changed files with 7 additions and 5 deletions
|
|
@ -16,16 +16,18 @@ namespace Dalamud.Injector {
|
||||||
static private Process process = null;
|
static private Process process = null;
|
||||||
|
|
||||||
private static void Main(string[] args) {
|
private static void Main(string[] args) {
|
||||||
#if !DEBUG
|
|
||||||
AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs eventArgs)
|
AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
File.WriteAllText("InjectorException.txt", eventArgs.ExceptionObject.ToString());
|
File.WriteAllText("InjectorException.txt", eventArgs.ExceptionObject.ToString());
|
||||||
|
#if !DEBUG
|
||||||
MessageBox.Show("Failed to inject the XIVLauncher in-game addon.\nPlease try restarting your game and your PC.\nIf this keeps happening, please report this error.", "XIVLauncher Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("Failed to inject the XIVLauncher in-game addon.\nPlease try restarting your game and your PC.\nIf this keeps happening, please report this error.", "XIVLauncher Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
#else
|
||||||
|
MessageBox.Show("Couldn't inject.\nMake sure that Dalamud was not injected into your target process as a release build before and that the target process can be accessed with VM_WRITE permissions.\n\n" + eventArgs.ExceptionObject, "Debug Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
#endif
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
var pid = -1;
|
var pid = -1;
|
||||||
if (args.Length == 1) {
|
if (args.Length == 1) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue