public static bool TestDll()
        {
            try {
                return(InteropEmu.TestDll());
            } catch {
            }

            bool dllExists;

            if (Program.IsMono)
            {
                dllExists = File.Exists(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "libMesenCore.dll"));
            }
            else
            {
                dllExists = File.Exists("MesenCore.dll");
            }

            if (!dllExists)
            {
                MesenMsgBox.Show("UnableToStartMissingFiles", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MesenMsgBox.Show("UnableToStartMissingDependencies", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return(false);
        }
Exemple #2
0
        public static bool TestDll()
        {
            try {
                return(InteropEmu.TestDll());
            } catch {
            }

            if (!File.Exists("WinMesen.dll"))
            {
                MesenMsgBox.Show("UnableToStartMissingFiles", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                if (MesenMsgBox.Show("UnableToStartMissingDependencies", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    if (!RuntimeChecker.DownloadRuntime())
                    {
                        MesenMsgBox.Show("CouldNotInstallRuntime", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else
                    {
                        Process.Start(Process.GetCurrentProcess().MainModule.FileName);
                    }
                }
            }
            return(false);
        }