1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

linux build quick fix

This commit is contained in:
M0N7Y5 2024-08-27 05:48:22 +02:00
parent 5a31cc35ba
commit 81a2f95279
7 changed files with 3841 additions and 3828 deletions

View file

@ -299,6 +299,7 @@ void bf::System::Console::PutChar(char c)
void bf::System::Console::ReopenHandles() void bf::System::Console::ReopenHandles()
{ {
#ifdef _MSC_VER
FILE* fDummy; FILE* fDummy;
freopen_s(&fDummy, "CONOUT$", "w", stdout); freopen_s(&fDummy, "CONOUT$", "w", stdout);
freopen_s(&fDummy, "CONOUT$", "w", stderr); freopen_s(&fDummy, "CONOUT$", "w", stderr);
@ -310,6 +311,7 @@ void bf::System::Console::ReopenHandles()
SetStdHandle(STD_OUTPUT_HANDLE, hConOut); SetStdHandle(STD_OUTPUT_HANDLE, hConOut);
SetStdHandle(STD_ERROR_HANDLE, hConOut); SetStdHandle(STD_ERROR_HANDLE, hConOut);
SetStdHandle(STD_INPUT_HANDLE, hConIn); SetStdHandle(STD_INPUT_HANDLE, hConIn);
#endif
} }
void bf::System::Runtime::Init(int version, int flags, BfRtCallbacks* callbacks) void bf::System::Runtime::Init(int version, int flags, BfRtCallbacks* callbacks)

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ using System.Threading;
using IDE.util; using IDE.util;
namespace IDE.ui; namespace IDE.ui;
#if BF_PLATFORM_WINDOWS
class ConsolePanel : Panel class ConsolePanel : Panel
{ {
class View : Widget class View : Widget
@ -369,7 +369,9 @@ class ConsolePanel : Panel
public virtual void Init() public virtual void Init()
{ {
#if BF_PLATFORM_WINDOWS
mConsoleProvider = new WinNativeConsoleProvider(); mConsoleProvider = new WinNativeConsoleProvider();
#endif
} }
public override void Serialize(StructuredData data) public override void Serialize(StructuredData data)
@ -810,3 +812,4 @@ class ConsolePanel : Panel
mView.SetFocus(); mView.SetFocus();
} }
} }
#endif

View file

@ -83,8 +83,11 @@ namespace IDE.ui
data.GetString("Type", type); data.GetString("Type", type);
Panel panel = null; Panel panel = null;
#if BF_PLATFORM_WINDOWS
if (type == "") if (type == "")
return gApp.mTerminalPanel; return gApp.mTerminalPanel;
#endif
if (type == "CallStackPanel") if (type == "CallStackPanel")
panel = gApp.mCallStackPanel; panel = gApp.mCallStackPanel;
@ -98,7 +101,9 @@ namespace IDE.ui
} }
else if (type == "TerminalPanel") else if (type == "TerminalPanel")
{ {
#if BF_PLATFORM_WINDOWS
panel = gApp.mTerminalPanel; panel = gApp.mTerminalPanel;
#endif
} }
else if (type == "ImmediatePanel") else if (type == "ImmediatePanel")
{ {
@ -168,11 +173,15 @@ namespace IDE.ui
} }
else if (type == "TerminalPanel") else if (type == "TerminalPanel")
{ {
#if BF_PLATFORM_WINDOWS
panel = gApp.mTerminalPanel; panel = gApp.mTerminalPanel;
#endif
} }
else if (type == "ConsolePanel") else if (type == "ConsolePanel")
{ {
#if BF_PLATFORM_WINDOWS
panel = gApp.mConsolePanel; panel = gApp.mConsolePanel;
#endif
} }
if (panel != null) if (panel != null)

View file

@ -3047,8 +3047,10 @@ namespace IDE.ui
if (!path.IsWhiteSpace) if (!path.IsWhiteSpace)
{ {
#if BF_PLATFORM_WINDOWS
gApp.ShowTerminal(); gApp.ShowTerminal();
gApp.mTerminalPanel.OpenDirectory(path); gApp.mTerminalPanel.OpenDirectory(path);
#endif
} }
}); });
} }

View file

@ -13,7 +13,7 @@ using Beefy.utils;
using IDE.util; using IDE.util;
namespace IDE.ui; namespace IDE.ui;
#if BF_PLATFORM_WINDOWS
class TerminalPanel : ConsolePanel class TerminalPanel : ConsolePanel
{ {
public override void Serialize(StructuredData data) public override void Serialize(StructuredData data)
@ -58,3 +58,4 @@ class TerminalPanel : ConsolePanel
consoleProvider.Attach(); consoleProvider.Attach();
} }
} }
#endif

View file

@ -8,6 +8,7 @@ using System.IO;
using System.Threading; using System.Threading;
namespace IDE.util; namespace IDE.util;
#if BF_PLATFORM_WINDOWS
class ConsoleProvider class ConsoleProvider
{ {
public enum UpdateState public enum UpdateState
@ -1325,3 +1326,4 @@ class BeefConConsoleProvider : ConsoleProvider
mPipe.EndMessage(); mPipe.EndMessage();
} }
} }
#endif