mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
linux build quick fix
This commit is contained in:
parent
5a31cc35ba
commit
81a2f95279
7 changed files with 3841 additions and 3828 deletions
|
@ -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)
|
||||||
|
|
|
@ -24,10 +24,9 @@ using IDE.Util;
|
||||||
using IDE.ui;
|
using IDE.ui;
|
||||||
using IDE.util;
|
using IDE.util;
|
||||||
|
|
||||||
[AttributeUsage(.Method, .ReflectAttribute | .AlwaysIncludeTarget, ReflectUser=.All)]
|
[AttributeUsage(.Method, .ReflectAttribute | .AlwaysIncludeTarget, ReflectUser = .All)]
|
||||||
struct IDECommandAttribute : Attribute
|
struct IDECommandAttribute : Attribute
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace IDE
|
namespace IDE
|
||||||
|
@ -57,7 +56,6 @@ namespace IDE
|
||||||
|
|
||||||
class DeferredUserRequest
|
class DeferredUserRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class DeferredShowPCLocation : DeferredUserRequest
|
class DeferredShowPCLocation : DeferredUserRequest
|
||||||
|
@ -124,10 +122,10 @@ namespace IDE
|
||||||
#if BF_PLATFORM_WINDOWS
|
#if BF_PLATFORM_WINDOWS
|
||||||
public static readonly String sPlatform64Name = "Win64";
|
public static readonly String sPlatform64Name = "Win64";
|
||||||
public static readonly String sPlatform32Name = "Win32";
|
public static readonly String sPlatform32Name = "Win32";
|
||||||
#elif BF_PLATFORM_LINUX
|
#elif BF_PLATFORM_LINUX
|
||||||
public static readonly String sPlatform64Name = "Linux64";
|
public static readonly String sPlatform64Name = "Linux64";
|
||||||
public static readonly String sPlatform32Name = "Linux32";
|
public static readonly String sPlatform32Name = "Linux32";
|
||||||
#elif BF_PLATFORM_MACOS
|
#elif BF_PLATFORM_MACOS
|
||||||
public static readonly String sPlatform64Name = "macOS";
|
public static readonly String sPlatform64Name = "macOS";
|
||||||
public static readonly String sPlatform32Name = null;
|
public static readonly String sPlatform32Name = null;
|
||||||
#else
|
#else
|
||||||
|
@ -197,8 +195,10 @@ namespace IDE
|
||||||
public bool mWantShowOutput;
|
public bool mWantShowOutput;
|
||||||
|
|
||||||
public OutputPanel mOutputPanel;
|
public OutputPanel mOutputPanel;
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
public TerminalPanel mTerminalPanel;
|
public TerminalPanel mTerminalPanel;
|
||||||
public ConsolePanel mConsolePanel;
|
public ConsolePanel mConsolePanel;
|
||||||
|
#endif
|
||||||
public ImmediatePanel mImmediatePanel;
|
public ImmediatePanel mImmediatePanel;
|
||||||
public FindResultsPanel mFindResultsPanel;
|
public FindResultsPanel mFindResultsPanel;
|
||||||
public WatchPanel mAutoWatchPanel;
|
public WatchPanel mAutoWatchPanel;
|
||||||
|
@ -428,7 +428,6 @@ namespace IDE
|
||||||
|
|
||||||
class OpenDebugConsoleCmd : ExecutionCmd
|
class OpenDebugConsoleCmd : ExecutionCmd
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class StartDebugCmd : ExecutionCmd
|
class StartDebugCmd : ExecutionCmd
|
||||||
|
@ -455,7 +454,6 @@ namespace IDE
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -577,7 +575,7 @@ namespace IDE
|
||||||
mEnableGCCollect = value;
|
mEnableGCCollect = value;
|
||||||
//GC.SetAutoCollectPeriod(mEnableGCCollect ? 2000 : -1);
|
//GC.SetAutoCollectPeriod(mEnableGCCollect ? 2000 : -1);
|
||||||
GC.SetAutoCollectPeriod(mEnableGCCollect ? 20 : -1);
|
GC.SetAutoCollectPeriod(mEnableGCCollect ? 20 : -1);
|
||||||
GC.SetCollectFreeThreshold(mEnableGCCollect ? 64*1024*1024 : -1);
|
GC.SetCollectFreeThreshold(mEnableGCCollect ? 64 * 1024 * 1024 : -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -598,14 +596,14 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[CallingConvention(.Stdcall),CLink]
|
[CallingConvention(.Stdcall), CLink]
|
||||||
static extern void IDEHelper_ProgramStart();
|
static extern void IDEHelper_ProgramStart();
|
||||||
[CallingConvention(.Stdcall),CLink]
|
[CallingConvention(.Stdcall), CLink]
|
||||||
static extern void IDEHelper_ProgramDone();
|
static extern void IDEHelper_ProgramDone();
|
||||||
|
|
||||||
public this()
|
public this()
|
||||||
{
|
{
|
||||||
ThreadPool.MaxStackSize = 8*1024*1024;
|
ThreadPool.MaxStackSize = 8 * 1024 * 1024;
|
||||||
|
|
||||||
sApp = this;
|
sApp = this;
|
||||||
gApp = this;
|
gApp = this;
|
||||||
|
@ -724,8 +722,10 @@ namespace IDE
|
||||||
RemoveAndDelete!(mProjectPanel);
|
RemoveAndDelete!(mProjectPanel);
|
||||||
RemoveAndDelete!(mClassViewPanel);
|
RemoveAndDelete!(mClassViewPanel);
|
||||||
RemoveAndDelete!(mOutputPanel);
|
RemoveAndDelete!(mOutputPanel);
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
RemoveAndDelete!(mTerminalPanel);
|
RemoveAndDelete!(mTerminalPanel);
|
||||||
RemoveAndDelete!(mConsolePanel);
|
RemoveAndDelete!(mConsolePanel);
|
||||||
|
#endif
|
||||||
RemoveAndDelete!(mImmediatePanel);
|
RemoveAndDelete!(mImmediatePanel);
|
||||||
RemoveAndDelete!(mFindResultsPanel);
|
RemoveAndDelete!(mFindResultsPanel);
|
||||||
RemoveAndDelete!(mAutoWatchPanel);
|
RemoveAndDelete!(mAutoWatchPanel);
|
||||||
|
@ -830,8 +830,10 @@ namespace IDE
|
||||||
dlg(mProjectPanel);
|
dlg(mProjectPanel);
|
||||||
dlg(mClassViewPanel);
|
dlg(mClassViewPanel);
|
||||||
dlg(mOutputPanel);
|
dlg(mOutputPanel);
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
dlg(mTerminalPanel);
|
dlg(mTerminalPanel);
|
||||||
dlg(mConsolePanel);
|
dlg(mConsolePanel);
|
||||||
|
#endif
|
||||||
dlg(mImmediatePanel);
|
dlg(mImmediatePanel);
|
||||||
dlg(mFindResultsPanel);
|
dlg(mFindResultsPanel);
|
||||||
dlg(mAutoWatchPanel);
|
dlg(mAutoWatchPanel);
|
||||||
|
@ -890,7 +892,7 @@ namespace IDE
|
||||||
{
|
{
|
||||||
if (((mBfBuildCompiler != null) && mBfBuildCompiler.HasQueuedCommands()) ||
|
if (((mBfBuildCompiler != null) && mBfBuildCompiler.HasQueuedCommands()) ||
|
||||||
((mBfResolveCompiler != null) && (mBfResolveCompiler.HasQueuedCommands()))
|
((mBfResolveCompiler != null) && (mBfResolveCompiler.HasQueuedCommands()))
|
||||||
#if IDE_C_SUPPORT
|
#if IDE_C_SUPPORT
|
||||||
|| (mDepClang.HasQueuedCommands()) ||
|
|| (mDepClang.HasQueuedCommands()) ||
|
||||||
(mResolveClang.HasQueuedCommands())
|
(mResolveClang.HasQueuedCommands())
|
||||||
#endif
|
#endif
|
||||||
|
@ -1042,7 +1044,7 @@ namespace IDE
|
||||||
for (String openFileName in fileDialog.FileNames)
|
for (String openFileName in fileDialog.FileNames)
|
||||||
{
|
{
|
||||||
String.NewOrSet!(mDeferredOpenFileName, openFileName);
|
String.NewOrSet!(mDeferredOpenFileName, openFileName);
|
||||||
mDeferredOpen =.DebugSession;
|
mDeferredOpen = .DebugSession;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1205,7 +1207,7 @@ namespace IDE
|
||||||
{
|
{
|
||||||
String text = scope String("The following files have been modified: ");
|
String text = scope String("The following files have been modified: ");
|
||||||
text.Join(", ", changedList.GetEnumerator());
|
text.Join(", ", changedList.GetEnumerator());
|
||||||
text .Append(". Save before closing?");
|
text.Append(". Save before closing?");
|
||||||
aDialog = ThemeFactory.mDefault.CreateDialog("Save files?", text, DarkTheme.sDarkTheme.mIconWarning);
|
aDialog = ThemeFactory.mDefault.CreateDialog("Save files?", text, DarkTheme.sDarkTheme.mIconWarning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1260,7 +1262,6 @@ namespace IDE
|
||||||
changedList.Add(fileName);
|
changedList.Add(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
WithSourceViewPanels(scope (sourceViewPanel) =>
|
WithSourceViewPanels(scope (sourceViewPanel) =>
|
||||||
{
|
{
|
||||||
|
@ -1331,7 +1332,8 @@ namespace IDE
|
||||||
|
|
||||||
void CloseTabs()
|
void CloseTabs()
|
||||||
{
|
{
|
||||||
WithDocumentTabbedViewsOf(window, scope (tabbedView) => {
|
WithDocumentTabbedViewsOf(window, scope (tabbedView) =>
|
||||||
|
{
|
||||||
tabbedView.CloseTabs(false, true, true);
|
tabbedView.CloseTabs(false, true, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1354,7 +1356,8 @@ namespace IDE
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (changedList.Count == 0) {
|
if (changedList.Count == 0)
|
||||||
|
{
|
||||||
CloseTabs();
|
CloseTabs();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1420,7 +1423,7 @@ namespace IDE
|
||||||
{
|
{
|
||||||
if ((sourceViewPanel.mParent != null) && (sourceViewPanel != excludeSourceViewPanel))
|
if ((sourceViewPanel.mParent != null) && (sourceViewPanel != excludeSourceViewPanel))
|
||||||
{
|
{
|
||||||
if (viewRefreshKind ==.Collapse)
|
if (viewRefreshKind == .Collapse)
|
||||||
sourceViewPanel.QueueCollapseRefresh();
|
sourceViewPanel.QueueCollapseRefresh();
|
||||||
else
|
else
|
||||||
sourceViewPanel.QueueFullRefresh(true);
|
sourceViewPanel.QueueFullRefresh(true);
|
||||||
|
@ -1904,7 +1907,6 @@ namespace IDE
|
||||||
SerializeWindow(sd, mMainWindow);
|
SerializeWindow(sd, mMainWindow);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
sd.Add("X", mRequestedWindowRect.mX);
|
sd.Add("X", mRequestedWindowRect.mX);
|
||||||
sd.Add("Y", mRequestedWindowRect.mY);
|
sd.Add("Y", mRequestedWindowRect.mY);
|
||||||
sd.Add("Width", mRequestedWindowRect.mWidth);
|
sd.Add("Width", mRequestedWindowRect.mWidth);
|
||||||
|
@ -2591,7 +2593,6 @@ namespace IDE
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
void CollapseRedo()
|
void CollapseRedo()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
|
@ -2609,7 +2610,6 @@ namespace IDE
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
void CollapseUndo()
|
void CollapseUndo()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
|
@ -2664,7 +2664,7 @@ namespace IDE
|
||||||
if (var sourceViewPanel = GetLastActiveDocumentPanel() as SourceViewPanel)
|
if (var sourceViewPanel = GetLastActiveDocumentPanel() as SourceViewPanel)
|
||||||
{
|
{
|
||||||
var sewc = sourceViewPanel.mEditWidget.mEditWidgetContent as SourceEditWidgetContent;
|
var sewc = sourceViewPanel.mEditWidget.mEditWidgetContent as SourceEditWidgetContent;
|
||||||
uint8[] newData = new uint8[sewc.mData.mTextLength*4];
|
uint8[] newData = new uint8[sewc.mData.mTextLength * 4];
|
||||||
|
|
||||||
var idData = ref sewc.mData.mTextIdData;
|
var idData = ref sewc.mData.mTextIdData;
|
||||||
/*idData.Prepare();
|
/*idData.Prepare();
|
||||||
|
@ -2981,8 +2981,6 @@ namespace IDE
|
||||||
LoadFailed();
|
LoadFailed();
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mWorkspace.Deserialize(data);
|
mWorkspace.Deserialize(data);
|
||||||
|
@ -3082,7 +3080,7 @@ namespace IDE
|
||||||
if (useVerSpec case .SemVer)
|
if (useVerSpec case .SemVer)
|
||||||
{
|
{
|
||||||
// First pass we just try to use the 'expected' project name
|
// First pass we just try to use the 'expected' project name
|
||||||
FindLoop: for (int pass < 2)
|
FindLoop:for (int pass < 2)
|
||||||
{
|
{
|
||||||
using (mBeefConfig.mRegistry.mMonitor.Enter())
|
using (mBeefConfig.mRegistry.mMonitor.Enter())
|
||||||
{
|
{
|
||||||
|
@ -3256,7 +3254,7 @@ namespace IDE
|
||||||
mActiveDocumentsTabbedView = tabbedView;
|
mActiveDocumentsTabbedView = tabbedView;
|
||||||
|
|
||||||
SourceViewTabButton activeTab = null;
|
SourceViewTabButton activeTab = null;
|
||||||
for (data.Enumerate("Tabs"))
|
for ( data.Enumerate("Tabs"))
|
||||||
{
|
{
|
||||||
Panel panel = Panel.Create(data);
|
Panel panel = Panel.Create(data);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
|
@ -3385,7 +3383,7 @@ namespace IDE
|
||||||
DeserializeDockingFrame(data, mDockingFrame);
|
DeserializeDockingFrame(data, mDockingFrame);
|
||||||
|
|
||||||
ClearAndDeleteItems(mRecentlyDisplayedFiles);
|
ClearAndDeleteItems(mRecentlyDisplayedFiles);
|
||||||
for (data.Enumerate("RecentFilesList"))
|
for ( data.Enumerate("RecentFilesList"))
|
||||||
{
|
{
|
||||||
String relPath = scope String();
|
String relPath = scope String();
|
||||||
data.GetCurString(relPath);
|
data.GetCurString(relPath);
|
||||||
|
@ -3503,7 +3501,7 @@ namespace IDE
|
||||||
mDebugger.SetDisplayTypes(referenceIdStr, formatStr, intDisplayType, mmDisplayType, floatDisplayType);
|
mDebugger.SetDisplayTypes(referenceIdStr, formatStr, intDisplayType, mmDisplayType, floatDisplayType);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (data.Enumerate("StepFilters"))
|
for ( data.Enumerate("StepFilters"))
|
||||||
{
|
{
|
||||||
String filter = scope String();
|
String filter = scope String();
|
||||||
data.GetCurString(filter);
|
data.GetCurString(filter);
|
||||||
|
@ -3511,7 +3509,7 @@ namespace IDE
|
||||||
mDebugger.CreateStepFilter(filter, false, .Filtered);
|
mDebugger.CreateStepFilter(filter, false, .Filtered);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (data.Enumerate("StepNotFilters"))
|
for ( data.Enumerate("StepNotFilters"))
|
||||||
{
|
{
|
||||||
String filter = scope String();
|
String filter = scope String();
|
||||||
data.GetCurString(filter);
|
data.GetCurString(filter);
|
||||||
|
@ -3719,7 +3717,6 @@ namespace IDE
|
||||||
success &= SaveFile(projectSource);
|
success &= SaveFile(projectSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
for (var project in mWorkspace.mProjects)
|
for (var project in mWorkspace.mProjects)
|
||||||
{
|
{
|
||||||
|
@ -4303,9 +4300,9 @@ namespace IDE
|
||||||
if (scale < 4.0f)
|
if (scale < 4.0f)
|
||||||
{
|
{
|
||||||
if (scale < 0)
|
if (scale < 0)
|
||||||
scale += 0.02f;//0.05f;
|
scale += 0.02f; //0.05f;
|
||||||
else //if (scale < 2.0f)
|
else //if (scale < 2.0f)
|
||||||
scale += 0.04f;//0.10f;
|
scale += 0.04f; //0.10f;
|
||||||
|
|
||||||
SetScale(scale);
|
SetScale(scale);
|
||||||
}
|
}
|
||||||
|
@ -4979,11 +4976,9 @@ namespace IDE
|
||||||
#unwarn
|
#unwarn
|
||||||
if (var processBfCompileCmd = cmd as ProcessBfCompileCmd)
|
if (var processBfCompileCmd = cmd as ProcessBfCompileCmd)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (var buildCompleteCmd = cmd as BuildCompletedCmd)
|
else if (var buildCompleteCmd = cmd as BuildCompletedCmd)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -5168,19 +5163,21 @@ namespace IDE
|
||||||
{
|
{
|
||||||
ShowPanel(mAutoWatchPanel, "Auto Watches");
|
ShowPanel(mAutoWatchPanel, "Auto Watches");
|
||||||
}
|
}
|
||||||
|
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
public void ShowTerminal()
|
public void ShowTerminal()
|
||||||
{
|
{
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
ShowPanel(mTerminalPanel, "Terminal");
|
ShowPanel(mTerminalPanel, "Terminal");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
public void ShowConsole()
|
public void ShowConsole()
|
||||||
{
|
{
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
ShowPanel(mConsolePanel, "Console");
|
ShowPanel(mConsolePanel, "Console");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
public void ShowImmediatePanel()
|
public void ShowImmediatePanel()
|
||||||
{
|
{
|
||||||
|
@ -5821,7 +5818,7 @@ namespace IDE
|
||||||
mSettings.mRecentFiles.mRecents[(int)RecentFiles.RecentKind.OpenedFile].mMenu = recentMenu.AddMenuItem("Open Recent &File");
|
mSettings.mRecentFiles.mRecents[(int)RecentFiles.RecentKind.OpenedFile].mMenu = recentMenu.AddMenuItem("Open Recent &File");
|
||||||
mSettings.mRecentFiles.mRecents[(int)RecentFiles.RecentKind.OpenedCrashDump].mMenu = recentMenu.AddMenuItem("Open Recent &Crash Dump");
|
mSettings.mRecentFiles.mRecents[(int)RecentFiles.RecentKind.OpenedCrashDump].mMenu = recentMenu.AddMenuItem("Open Recent &Crash Dump");
|
||||||
|
|
||||||
AddMenuItem(subMenu, "&Save File","Save File", new => UpdateMenuItem_HasActiveDocument);
|
AddMenuItem(subMenu, "&Save File", "Save File", new => UpdateMenuItem_HasActiveDocument);
|
||||||
AddMenuItem(subMenu, "Save &As...", "Save As", new => UpdateMenuItem_HasActiveDocument);
|
AddMenuItem(subMenu, "Save &As...", "Save As", new => UpdateMenuItem_HasActiveDocument);
|
||||||
AddMenuItem(subMenu, "Save A&ll", "Save All");
|
AddMenuItem(subMenu, "Save A&ll", "Save All");
|
||||||
let prefMenu = subMenu.AddMenuItem("&Preferences");
|
let prefMenu = subMenu.AddMenuItem("&Preferences");
|
||||||
|
@ -5899,11 +5896,11 @@ namespace IDE
|
||||||
var comptimeMenu = subMenu.AddMenuItem("Comptime");
|
var comptimeMenu = subMenu.AddMenuItem("Comptime");
|
||||||
var emitViewCompiler = comptimeMenu.AddMenuItem("Emit View Compiler");
|
var emitViewCompiler = comptimeMenu.AddMenuItem("Emit View Compiler");
|
||||||
var subItem = emitViewCompiler.AddMenuItem("Resolve", null,
|
var subItem = emitViewCompiler.AddMenuItem("Resolve", null,
|
||||||
new (menu) => { SetEmbedCompiler(.Resolve); } ,
|
new (menu) => { SetEmbedCompiler(.Resolve); },
|
||||||
new (menu) => { menu.SetCheckState((mSettings.mEditorSettings.mEmitCompiler == .Resolve) ? 1 : 0); },
|
new (menu) => { menu.SetCheckState((mSettings.mEditorSettings.mEmitCompiler == .Resolve) ? 1 : 0); },
|
||||||
null, true, (mSettings.mEditorSettings.mEmitCompiler == .Resolve) ? 1 : 0);
|
null, true, (mSettings.mEditorSettings.mEmitCompiler == .Resolve) ? 1 : 0);
|
||||||
subItem = emitViewCompiler.AddMenuItem("Build", null,
|
subItem = emitViewCompiler.AddMenuItem("Build", null,
|
||||||
new (menu) => { SetEmbedCompiler(.Build); } ,
|
new (menu) => { SetEmbedCompiler(.Build); },
|
||||||
new (menu) => { menu.SetCheckState((mSettings.mEditorSettings.mEmitCompiler == .Build) ? 1 : 0); },
|
new (menu) => { menu.SetCheckState((mSettings.mEditorSettings.mEmitCompiler == .Build) ? 1 : 0); },
|
||||||
null, true, (mSettings.mEditorSettings.mEmitCompiler == .Build) ? 1 : 0);
|
null, true, (mSettings.mEditorSettings.mEmitCompiler == .Build) ? 1 : 0);
|
||||||
|
|
||||||
|
@ -6006,7 +6003,6 @@ namespace IDE
|
||||||
sysMenu.Modify("&Continue", sysMenu.mHotKey, null, mDebugger.IsPaused());
|
sysMenu.Modify("&Continue", sysMenu.mHotKey, null, mDebugger.IsPaused());
|
||||||
else
|
else
|
||||||
sysMenu.Modify("&Start Debugging", sysMenu.mHotKey, null, mWorkspace.IsInitialized);
|
sysMenu.Modify("&Start Debugging", sysMenu.mHotKey, null, mWorkspace.IsInitialized);
|
||||||
|
|
||||||
});
|
});
|
||||||
AddMenuItem(subMenu, "Start Wit&hout Debugging", "Start Without Debugging", new => UpdateMenuItem_DebugStopped_HasWorkspace);
|
AddMenuItem(subMenu, "Start Wit&hout Debugging", "Start Without Debugging", new => UpdateMenuItem_DebugStopped_HasWorkspace);
|
||||||
AddMenuItem(subMenu, "Start With&out Compiling", "Start Without Compiling", new => UpdateMenuItem_DebugStopped_HasWorkspace);
|
AddMenuItem(subMenu, "Start With&out Compiling", "Start Without Compiling", new => UpdateMenuItem_DebugStopped_HasWorkspace);
|
||||||
|
@ -6032,8 +6028,8 @@ namespace IDE
|
||||||
if (mSettings.mEnableDevMode)
|
if (mSettings.mEnableDevMode)
|
||||||
{
|
{
|
||||||
var internalDebugMenu = subMenu.AddMenuItem("Internal");
|
var internalDebugMenu = subMenu.AddMenuItem("Internal");
|
||||||
internalDebugMenu.AddMenuItem("Error Test", null, new (menu) => { DoErrorTest(); } );
|
internalDebugMenu.AddMenuItem("Error Test", null, new (menu) => { DoErrorTest(); });
|
||||||
internalDebugMenu.AddMenuItem("Reconnect BeefPerf", null, new (menu) => { BeefPerf.RetryConnect(); } );
|
internalDebugMenu.AddMenuItem("Reconnect BeefPerf", null, new (menu) => { BeefPerf.RetryConnect(); });
|
||||||
AddMenuItem(internalDebugMenu, "Report Memory", "Report Memory");
|
AddMenuItem(internalDebugMenu, "Report Memory", "Report Memory");
|
||||||
internalDebugMenu.AddMenuItem("Crash", null, new (menu) => { int* ptr = null; *ptr = 123; });
|
internalDebugMenu.AddMenuItem("Crash", null, new (menu) => { int* ptr = null; *ptr = 123; });
|
||||||
internalDebugMenu.AddMenuItem("Show Welcome", null, new (menu) => { ShowWelcome(); });
|
internalDebugMenu.AddMenuItem("Show Welcome", null, new (menu) => { ShowWelcome(); });
|
||||||
|
@ -6703,7 +6699,7 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
editData.BuildHash(text);
|
editData.BuildHash(text);
|
||||||
} ) case .Err)
|
}) case .Err)
|
||||||
return false;
|
return false;
|
||||||
editData..GetFileTime();
|
editData..GetFileTime();
|
||||||
|
|
||||||
|
@ -7043,7 +7039,6 @@ namespace IDE
|
||||||
|
|
||||||
public void UpdateRecentFilesMenuItems(List<String> filesList)
|
public void UpdateRecentFilesMenuItems(List<String> filesList)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateRecentDisplayedFilesMenuItems()
|
public void UpdateRecentDisplayedFilesMenuItems()
|
||||||
|
@ -7928,7 +7923,7 @@ namespace IDE
|
||||||
|
|
||||||
mWantsClean = true;
|
mWantsClean = true;
|
||||||
mRunningTestScript = true;
|
mRunningTestScript = true;
|
||||||
mScriptManager.SetTimeoutMS(20*60*1000); // 20 minute timeout
|
mScriptManager.SetTimeoutMS(20 * 60 * 1000); // 20 minute timeout
|
||||||
mScriptManager.QueueCommandFile(absTestPath);
|
mScriptManager.QueueCommandFile(absTestPath);
|
||||||
case "-verbosity":
|
case "-verbosity":
|
||||||
if (value == "quiet")
|
if (value == "quiet")
|
||||||
|
@ -8262,8 +8257,10 @@ namespace IDE
|
||||||
|
|
||||||
if (!evt.mKeyFlags.HeldKeys.HasFlag(.Alt))
|
if (!evt.mKeyFlags.HeldKeys.HasFlag(.Alt))
|
||||||
{
|
{
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
mConsolePanel.SysKeyDown(evt);
|
mConsolePanel.SysKeyDown(evt);
|
||||||
mTerminalPanel.SysKeyDown(evt);
|
mTerminalPanel.SysKeyDown(evt);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evt.mHandled)
|
if (evt.mHandled)
|
||||||
|
@ -8439,8 +8436,10 @@ namespace IDE
|
||||||
|
|
||||||
void SysKeyUp(KeyCode keyCode)
|
void SysKeyUp(KeyCode keyCode)
|
||||||
{
|
{
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
mConsolePanel.SysKeyUp(keyCode);
|
mConsolePanel.SysKeyUp(keyCode);
|
||||||
mTerminalPanel.SysKeyUp(keyCode);
|
mTerminalPanel.SysKeyUp(keyCode);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowOpenFileInSolutionDialog()
|
void ShowOpenFileInSolutionDialog()
|
||||||
|
@ -8778,7 +8777,7 @@ namespace IDE
|
||||||
if (executionInstance.mProcess.AttachStandardInput(fileStream) case .Err)
|
if (executionInstance.mProcess.AttachStandardInput(fileStream) case .Err)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WriteLoop: while (!executionInstance.mStdInData.IsEmpty)
|
WriteLoop:while (!executionInstance.mStdInData.IsEmpty)
|
||||||
{
|
{
|
||||||
switch (fileStream.TryWrite(.((.)executionInstance.mStdInData.Ptr, executionInstance.mStdInData.Length)))
|
switch (fileStream.TryWrite(.((.)executionInstance.mStdInData.Ptr, executionInstance.mStdInData.Length)))
|
||||||
{
|
{
|
||||||
|
@ -8836,7 +8835,7 @@ namespace IDE
|
||||||
FileStream fileStream = (.)obj;
|
FileStream fileStream = (.)obj;
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
Loop: while (true)
|
Loop:while (true)
|
||||||
{
|
{
|
||||||
uint8[4096] data = ?;
|
uint8[4096] data = ?;
|
||||||
switch (fileStream.TryRead(data, -1))
|
switch (fileStream.TryRead(data, -1))
|
||||||
|
@ -9060,17 +9059,14 @@ namespace IDE
|
||||||
|
|
||||||
protected virtual void BeefCompileStarted()
|
protected virtual void BeefCompileStarted()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void BeefCompileDone()
|
protected virtual void BeefCompileDone()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void CompileDone(bool succeeded)
|
protected virtual void CompileDone(bool succeeded)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildCompletedCmd GetBuildCompletedCmd()
|
BuildCompletedCmd GetBuildCompletedCmd()
|
||||||
|
@ -9255,9 +9251,9 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if (let startDebugCmd = next as StartDebugCmd)
|
if (let startDebugCmd = next as StartDebugCmd)
|
||||||
{
|
{
|
||||||
#if BF_PLATFORM_WINDOWS
|
|
||||||
if ((mSettings.mDebugConsoleKind == .Native) && (mSettings.mKeepNativeConsoleOpen))
|
if ((mSettings.mDebugConsoleKind == .Native) && (mSettings.mKeepNativeConsoleOpen))
|
||||||
{
|
{
|
||||||
if (!startDebugCmd.mConnectedToConsole)
|
if (!startDebugCmd.mConnectedToConsole)
|
||||||
|
@ -9319,9 +9315,8 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
defer delete next;
|
defer delete next;
|
||||||
mExecutionQueue.RemoveAt(0);
|
mExecutionQueue.RemoveAt(0);
|
||||||
|
|
||||||
|
@ -9422,7 +9417,7 @@ namespace IDE
|
||||||
pipe.Stream.Write((int32)mDebugger.GetProcessId());
|
pipe.Stream.Write((int32)mDebugger.GetProcessId());
|
||||||
pipe.EndMessage();
|
pipe.EndMessage();
|
||||||
}
|
}
|
||||||
#endif*/
|
#endif*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (next is ExecutionQueueCmd)
|
else if (next is ExecutionQueueCmd)
|
||||||
|
@ -9606,7 +9601,7 @@ namespace IDE
|
||||||
{
|
{
|
||||||
String text = scope String();
|
String text = scope String();
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
if (LoadTextFile(fullPath, text, true, scope [?] () => { if (sourceHash != null) *sourceHash = SourceHash.Create(.MD5, text); } ) case .Ok)
|
if (LoadTextFile(fullPath, text, true, scope [?] () => { if (sourceHash != null) *sourceHash = SourceHash.Create(.MD5, text); }) case .Ok)
|
||||||
{
|
{
|
||||||
mFileWatcher.FileIsValid(fullPath);
|
mFileWatcher.FileIsValid(fullPath);
|
||||||
isValid = true;
|
isValid = true;
|
||||||
|
@ -10309,7 +10304,7 @@ namespace IDE
|
||||||
|
|
||||||
bool hadError = false;
|
bool hadError = false;
|
||||||
|
|
||||||
for ( ; i < result.Length - 2; i++)
|
for (; i < result.Length - 2; i++)
|
||||||
{
|
{
|
||||||
if ((result[i] == '$') && (result[i + 1] == '('))
|
if ((result[i] == '$') && (result[i + 1] == '('))
|
||||||
{
|
{
|
||||||
|
@ -10578,7 +10573,6 @@ namespace IDE
|
||||||
newString.Append(".a\"");
|
newString.Append(".a\"");
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
case "VSToolPath":
|
case "VSToolPath":
|
||||||
if (Workspace.PlatformType.GetPtrSizeByName(platformName) == 4)
|
if (Workspace.PlatformType.GetPtrSizeByName(platformName) == 4)
|
||||||
|
@ -10654,7 +10648,7 @@ namespace IDE
|
||||||
public void ReplaceVariables(String result)
|
public void ReplaceVariables(String result)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for ( ; i < result.Length - 2; i++)
|
for (; i < result.Length - 2; i++)
|
||||||
{
|
{
|
||||||
if ((result[i] == '$') && (result[i + 1] == '('))
|
if ((result[i] == '$') && (result[i + 1] == '('))
|
||||||
{
|
{
|
||||||
|
@ -10740,7 +10734,6 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ResolveConfigString(String platformName, Workspace.Options workspaceOptions, Project project, Project.Options options, StringView configString, String errorContext, String outResult)
|
public bool ResolveConfigString(String platformName, Workspace.Options workspaceOptions, Project project, Project.Options options, StringView configString, String errorContext, String outResult)
|
||||||
|
@ -10789,7 +10782,6 @@ namespace IDE
|
||||||
|
|
||||||
if (workspaceOptions.mToolsetType != .GNU)
|
if (workspaceOptions.mToolsetType != .GNU)
|
||||||
clangOptions.Append("-gcodeview ");
|
clangOptions.Append("-gcodeview ");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clangOptions.Append("-g ");
|
clangOptions.Append("-g ");
|
||||||
|
@ -10897,7 +10889,7 @@ namespace IDE
|
||||||
if (!isC)
|
if (!isC)
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(options.mCOptions.mOtherCPPFlags))
|
if (!String.IsNullOrEmpty(options.mCOptions.mOtherCPPFlags))
|
||||||
clangOptions.Append(options.mCOptions.mOtherCPPFlags, " ") ;
|
clangOptions.Append(options.mCOptions.mOtherCPPFlags, " ");
|
||||||
clangOptions.Append("-std=c++14 ");
|
clangOptions.Append("-std=c++14 ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -10905,7 +10897,6 @@ namespace IDE
|
||||||
if (!String.IsNullOrEmpty(options.mCOptions.mOtherCFlags))
|
if (!String.IsNullOrEmpty(options.mCOptions.mOtherCFlags))
|
||||||
clangOptions.Append(options.mCOptions.mOtherCFlags, " ");
|
clangOptions.Append(options.mCOptions.mOtherCFlags, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void QuoteIfNeeded(String str)
|
static void QuoteIfNeeded(String str)
|
||||||
|
@ -11491,7 +11482,7 @@ namespace IDE
|
||||||
|
|
||||||
public void QueueProfiling(int threadId, String desc, int sampleRate)
|
public void QueueProfiling(int threadId, String desc, int sampleRate)
|
||||||
{
|
{
|
||||||
if(mExecutionQueue.IsEmpty)
|
if (mExecutionQueue.IsEmpty)
|
||||||
return;
|
return;
|
||||||
var profileCmd = new ProfileCmd();
|
var profileCmd = new ProfileCmd();
|
||||||
profileCmd.mThreadId = threadId;
|
profileCmd.mThreadId = threadId;
|
||||||
|
@ -11545,7 +11536,6 @@ namespace IDE
|
||||||
});
|
});
|
||||||
dialog.AddButton("No", new (evt) =>
|
dialog.AddButton("No", new (evt) =>
|
||||||
{
|
{
|
||||||
|
|
||||||
});
|
});
|
||||||
dialog.PopupWindow(GetActiveWindow());
|
dialog.PopupWindow(GetActiveWindow());
|
||||||
}
|
}
|
||||||
|
@ -11679,7 +11669,6 @@ namespace IDE
|
||||||
},
|
},
|
||||||
new (dlg) =>
|
new (dlg) =>
|
||||||
{
|
{
|
||||||
|
|
||||||
});
|
});
|
||||||
dlg.PopupWindow(GetActiveWindow());
|
dlg.PopupWindow(GetActiveWindow());
|
||||||
#else
|
#else
|
||||||
|
@ -11866,7 +11855,6 @@ namespace IDE
|
||||||
},
|
},
|
||||||
new (dlg) =>
|
new (dlg) =>
|
||||||
{
|
{
|
||||||
|
|
||||||
});
|
});
|
||||||
((DarkButton)dlg.mButtons[0]).Label = "Open Link";
|
((DarkButton)dlg.mButtons[0]).Label = "Open Link";
|
||||||
dlg.PopupWindow(GetActiveWindow());
|
dlg.PopupWindow(GetActiveWindow());
|
||||||
|
@ -12097,7 +12085,9 @@ namespace IDE
|
||||||
if (mSettings.mDebugConsoleKind == .Embedded)
|
if (mSettings.mDebugConsoleKind == .Embedded)
|
||||||
{
|
{
|
||||||
ShowConsole();
|
ShowConsole();
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
mConsolePanel.Attach();
|
mConsolePanel.Attach();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mSettings.mDebugConsoleKind == .RedirectToImmediate)
|
if (mSettings.mDebugConsoleKind == .RedirectToImmediate)
|
||||||
|
@ -12112,8 +12102,10 @@ namespace IDE
|
||||||
|
|
||||||
if (!mDebugger.OpenFile(launchPath, targetPath, arguments, workingDir, envBlock, wasCompiled, workspaceOptions.mAllowHotSwapping, openFileFlags))
|
if (!mDebugger.OpenFile(launchPath, targetPath, arguments, workingDir, envBlock, wasCompiled, workspaceOptions.mAllowHotSwapping, openFileFlags))
|
||||||
{
|
{
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if (!mSettings.mAlwaysEnableConsole)
|
if (!mSettings.mAlwaysEnableConsole)
|
||||||
mConsolePanel.Detach();
|
mConsolePanel.Detach();
|
||||||
|
#endif
|
||||||
DeleteAndNullify!(mCompileAndRunStopwatch);
|
DeleteAndNullify!(mCompileAndRunStopwatch);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -12469,12 +12461,14 @@ namespace IDE
|
||||||
mClassViewPanel.mAutoDelete = false;
|
mClassViewPanel.mAutoDelete = false;
|
||||||
mOutputPanel = new OutputPanel(true);
|
mOutputPanel = new OutputPanel(true);
|
||||||
mOutputPanel.mAutoDelete = false;
|
mOutputPanel.mAutoDelete = false;
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
mTerminalPanel = new TerminalPanel();
|
mTerminalPanel = new TerminalPanel();
|
||||||
mTerminalPanel .Init();
|
mTerminalPanel .Init();
|
||||||
mTerminalPanel.mAutoDelete = false;
|
mTerminalPanel.mAutoDelete = false;
|
||||||
mConsolePanel = new ConsolePanel();
|
mConsolePanel = new ConsolePanel();
|
||||||
mConsolePanel.Init();
|
mConsolePanel.Init();
|
||||||
mConsolePanel.mAutoDelete = false;
|
mConsolePanel.mAutoDelete = false;
|
||||||
|
#endif
|
||||||
mImmediatePanel = new ImmediatePanel();
|
mImmediatePanel = new ImmediatePanel();
|
||||||
mImmediatePanel.mAutoDelete = false;
|
mImmediatePanel.mAutoDelete = false;
|
||||||
mFindResultsPanel = new FindResultsPanel();
|
mFindResultsPanel = new FindResultsPanel();
|
||||||
|
@ -12564,7 +12558,7 @@ namespace IDE
|
||||||
int32 height = (int32)(workHeight * 0.85f);
|
int32 height = (int32)(workHeight * 0.85f);
|
||||||
int32 width = Math.Min(4 * height / 3, (int32)(workWidth * 0.85f));
|
int32 width = Math.Min(4 * height / 3, (int32)(workWidth * 0.85f));
|
||||||
|
|
||||||
mRequestedWindowRect = .(workX + (workWidth - width)/2, workY + (workHeight - height)/2, width, height);
|
mRequestedWindowRect = .(workX + (workWidth - width) / 2, workY + (workHeight - height) / 2, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!loadedWorkspaceUserData)
|
if (!loadedWorkspaceUserData)
|
||||||
|
@ -12765,7 +12759,7 @@ namespace IDE
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float fontSize = DarkTheme.sScale * mSettings.mEditorSettings.mFontSize;
|
float fontSize = DarkTheme.sScale * mSettings.mEditorSettings.mFontSize;
|
||||||
float tinyFontSize = fontSize * 8.0f/9.0f;
|
float tinyFontSize = fontSize * 8.0f / 9.0f;
|
||||||
|
|
||||||
String err = scope String();
|
String err = scope String();
|
||||||
void FontFail(StringView name)
|
void FontFail(StringView name)
|
||||||
|
@ -13302,7 +13296,7 @@ namespace IDE
|
||||||
mBfResolveCompiler?.CancelBackground();
|
mBfResolveCompiler?.CancelBackground();
|
||||||
|
|
||||||
if ((!mBfBuildCompiler.HasQueuedCommands()) && (!mBfResolveCompiler.HasQueuedCommands())
|
if ((!mBfBuildCompiler.HasQueuedCommands()) && (!mBfResolveCompiler.HasQueuedCommands())
|
||||||
#if IDE_C_SUPPORT
|
#if IDE_C_SUPPORT
|
||||||
&& (!mDepClang.HasQueuedCommands()) && (!mResolveClang.HasQueuedCommands())
|
&& (!mDepClang.HasQueuedCommands()) && (!mResolveClang.HasQueuedCommands())
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
@ -13594,7 +13588,6 @@ namespace IDE
|
||||||
|
|
||||||
if (addWidget != null)
|
if (addWidget != null)
|
||||||
mOutputPanel.AddInlineWidget(addWidget);
|
mOutputPanel.AddInlineWidget(addWidget);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (infoPos != -1)
|
else if (infoPos != -1)
|
||||||
{
|
{
|
||||||
|
@ -13700,7 +13693,7 @@ namespace IDE
|
||||||
if (mScriptManager.mFailed)
|
if (mScriptManager.mFailed)
|
||||||
mScriptManager.Clear();
|
mScriptManager.Clear();
|
||||||
mScriptManager.mSoftFail = true;
|
mScriptManager.mSoftFail = true;
|
||||||
mScriptManager.SetTimeoutMS(20*60*1000); // 20 minute timeout
|
mScriptManager.SetTimeoutMS(20 * 60 * 1000); // 20 minute timeout
|
||||||
mScriptManager.QueueCommandFile(absTestPath);
|
mScriptManager.QueueCommandFile(absTestPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -13729,8 +13722,10 @@ namespace IDE
|
||||||
var disassemblyPanel = TryGetDisassemblyPanel(false);
|
var disassemblyPanel = TryGetDisassemblyPanel(false);
|
||||||
if (disassemblyPanel != null)
|
if (disassemblyPanel != null)
|
||||||
disassemblyPanel.Disable();
|
disassemblyPanel.Disable();
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if (!mSettings.mAlwaysEnableConsole)
|
if (!mSettings.mAlwaysEnableConsole)
|
||||||
mConsolePanel.Detach();
|
mConsolePanel.Detach();
|
||||||
|
#endif
|
||||||
mDebugger.DisposeNativeBreakpoints();
|
mDebugger.DisposeNativeBreakpoints();
|
||||||
mDebugger.Detach();
|
mDebugger.Detach();
|
||||||
mDebugger.mIsRunning = false;
|
mDebugger.mIsRunning = false;
|
||||||
|
@ -13884,10 +13879,12 @@ namespace IDE
|
||||||
{
|
{
|
||||||
if ((--mForegroundTargetCountdown == 0) && (mDebugger.mIsRunning))
|
if ((--mForegroundTargetCountdown == 0) && (mDebugger.mIsRunning))
|
||||||
{
|
{
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if (mConsolePanel.mBeefConAttachState case .Connected(let processId))
|
if (mConsolePanel.mBeefConAttachState case .Connected(let processId))
|
||||||
mDebugger.ForegroundTarget(processId);
|
mDebugger.ForegroundTarget(processId);
|
||||||
else
|
else
|
||||||
mDebugger.ForegroundTarget(0);
|
mDebugger.ForegroundTarget(0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13952,7 +13949,7 @@ namespace IDE
|
||||||
DeleteAndNullify!(mLaunchData);
|
DeleteAndNullify!(mLaunchData);
|
||||||
|
|
||||||
mErrorsPanel?.UpdateAlways();
|
mErrorsPanel?.UpdateAlways();
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if ((mConsolePanel != null) && (mConsolePanel.mBeefConAttachState case .Attached(let consoleProcessId)))
|
if ((mConsolePanel != null) && (mConsolePanel.mBeefConAttachState case .Attached(let consoleProcessId)))
|
||||||
{
|
{
|
||||||
if (!mDebugger.mIsRunning)
|
if (!mDebugger.mIsRunning)
|
||||||
|
@ -13979,6 +13976,7 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowPassOutput(BfPassInstance bfPassInstance)
|
public void ShowPassOutput(BfPassInstance bfPassInstance)
|
||||||
|
@ -14142,7 +14140,7 @@ namespace IDE
|
||||||
String newName = null;
|
String newName = null;
|
||||||
if (newPath != null)
|
if (newPath != null)
|
||||||
{
|
{
|
||||||
newName = scope ::String();
|
newName = scope:: String();
|
||||||
Path.GetFileName(newPath, newName);
|
Path.GetFileName(newPath, newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14265,7 +14263,6 @@ namespace IDE
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
changed = true;
|
changed = true;
|
||||||
|
@ -14277,7 +14274,6 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14321,7 +14317,6 @@ namespace IDE
|
||||||
},
|
},
|
||||||
new (dlg) =>
|
new (dlg) =>
|
||||||
{
|
{
|
||||||
|
|
||||||
});
|
});
|
||||||
dialog.PopupWindow(GetActiveWindow());
|
dialog.PopupWindow(GetActiveWindow());
|
||||||
hadChange = true;
|
hadChange = true;
|
||||||
|
@ -14389,7 +14384,7 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (/*(appHasFocus) && */((mFileChangedDialog == null) || (mFileChangedDialog.mClosed)))
|
while ( /*(appHasFocus) && */((mFileChangedDialog == null) || (mFileChangedDialog.mClosed)))
|
||||||
{
|
{
|
||||||
while (mExternalChangeDeferredOpen.Count > 0)
|
while (mExternalChangeDeferredOpen.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -14431,7 +14426,7 @@ namespace IDE
|
||||||
if (editData.mQueuedContent == null)
|
if (editData.mQueuedContent == null)
|
||||||
editData.mQueuedContent = new String();
|
editData.mQueuedContent = new String();
|
||||||
editData.mQueuedContent.Clear();
|
editData.mQueuedContent.Clear();
|
||||||
if (LoadTextFile(fileName, editData.mQueuedContent, false, scope() =>
|
if (LoadTextFile(fileName, editData.mQueuedContent, false, scope () =>
|
||||||
{
|
{
|
||||||
editData.BuildHash(editData.mQueuedContent);
|
editData.BuildHash(editData.mQueuedContent);
|
||||||
}) case .Err(let err))
|
}) case .Err(let err))
|
||||||
|
@ -14547,7 +14542,7 @@ namespace IDE
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
OutputLine("IPC: Hosting");//
|
OutputLine("IPC: Hosting"); //
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14709,7 +14704,7 @@ namespace IDE
|
||||||
DoOpenFile();
|
DoOpenFile();
|
||||||
case .CrashDump:
|
case .CrashDump:
|
||||||
DoOpenCrashDump();
|
DoOpenCrashDump();
|
||||||
case .Workspace, .NewWorkspace, .NewWorkspaceOrProject:
|
case .Workspace,.NewWorkspace,.NewWorkspaceOrProject:
|
||||||
|
|
||||||
if ((mDeferredOpenFileName == null) && (deferredOpen == .Workspace))
|
if ((mDeferredOpenFileName == null) && (deferredOpen == .Workspace))
|
||||||
{
|
{
|
||||||
|
@ -14756,7 +14751,6 @@ namespace IDE
|
||||||
Runtime.Assert(sourceViewPanel != null, "Source marked as modified with no SourceViewPanel");
|
Runtime.Assert(sourceViewPanel != null, "Source marked as modified with no SourceViewPanel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14787,7 +14781,7 @@ namespace IDE
|
||||||
{
|
{
|
||||||
RefreshRate = 60;
|
RefreshRate = 60;
|
||||||
}
|
}
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if (mTerminalPanel != null)
|
if (mTerminalPanel != null)
|
||||||
{
|
{
|
||||||
// Detach terminal if the panel is closed
|
// Detach terminal if the panel is closed
|
||||||
|
@ -14797,7 +14791,7 @@ namespace IDE
|
||||||
mTerminalPanel.Detach();
|
mTerminalPanel.Detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
bool hasFocus = false;
|
bool hasFocus = false;
|
||||||
for (let window in mWindows)
|
for (let window in mWindows)
|
||||||
{
|
{
|
||||||
|
@ -14840,7 +14834,6 @@ namespace IDE
|
||||||
}
|
}
|
||||||
else if (IsCompiling)
|
else if (IsCompiling)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (mDebugger.mIsRunning)
|
else if (mDebugger.mIsRunning)
|
||||||
{
|
{
|
||||||
|
@ -14881,6 +14874,7 @@ namespace IDE
|
||||||
if (mScriptManager != null)
|
if (mScriptManager != null)
|
||||||
mScriptManager.Update();
|
mScriptManager.Update();
|
||||||
|
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
if (mConsolePanel != null)
|
if (mConsolePanel != null)
|
||||||
{
|
{
|
||||||
if ((mSettings.mAlwaysEnableConsole) ||
|
if ((mSettings.mAlwaysEnableConsole) ||
|
||||||
|
@ -14889,7 +14883,7 @@ namespace IDE
|
||||||
else
|
else
|
||||||
mConsolePanel.Detach();
|
mConsolePanel.Detach();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (mTestManager != null)
|
if (mTestManager != null)
|
||||||
{
|
{
|
||||||
mTestManager.Update();
|
mTestManager.Update();
|
||||||
|
|
|
@ -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
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue