diff --git a/BizHawk.Client.EmuHawk/FileLoader.cs b/BizHawk.Client.EmuHawk/FileLoader.cs index 9333983890..4676e82825 100644 --- a/BizHawk.Client.EmuHawk/FileLoader.cs +++ b/BizHawk.Client.EmuHawk/FileLoader.cs @@ -81,7 +81,8 @@ namespace BizHawk.Client.EmuHawk OpenLuaConsole(); if (GlobalWin.Tools.Has()) { - GlobalWin.Tools.LuaConsole.LoadLuaFile(filename); + if (OSTailoredCode.IsUnixHost) Console.WriteLine($"The Lua environment can currently only be created on Windows, {filename} will not be loaded."); + else GlobalWin.Tools.LuaConsole.LoadLuaFile(filename); } } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 79f0d3eaad..440eca5746 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -383,7 +383,8 @@ namespace BizHawk.Client.EmuHawk //load Lua Script if requested in the command line arguments if (_argParser.luaScript != null) { - GlobalWin.Tools.LuaConsole.LoadLuaFile(_argParser.luaScript); + if (OSTailoredCode.IsUnixHost) Console.WriteLine($"The Lua environment can currently only be created on Windows, {_argParser.luaScript} will not be loaded."); + else GlobalWin.Tools.LuaConsole.LoadLuaFile(_argParser.luaScript); } GlobalWin.Tools.AutoLoad(); diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index d00974ee8f..eb62c6c8c6 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -148,6 +148,18 @@ namespace BizHawk.Client.EmuHawk } } + if (OSTailoredCode.IsUnixHost) + { + OpenSessionMenuItem.Enabled = false; + RecentSessionsSubMenu.Enabled = false; + RecentScriptsSubMenu.Enabled = false; + NewScriptMenuItem.Enabled = false; + OpenScriptMenuItem.Enabled = false; + NewScriptToolbarItem.Enabled = false; + OpenScriptToolbarItem.Enabled = false; + ConsoleLog("The Lua environment can currently only be created on Windows. You may not load scripts."); + } + LuaListView.AllColumns.Clear(); SetColumns(); } @@ -1249,6 +1261,11 @@ namespace BizHawk.Client.EmuHawk private void LuaConsole_DragDrop(object sender, DragEventArgs e) { + if (OSTailoredCode.IsUnixHost) + { + Console.WriteLine("The Lua environment can currently only be created on Windows, no scripts will be loaded."); + return; + } var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); try {