Stinky hacks to make progress on Linux target

This commit is contained in:
Yoshi Askharoun
2026-07-26 00:51:08 -05:00
parent 054237c01a
commit e65399ed8c
7 changed files with 39 additions and 6 deletions
@@ -30,7 +30,12 @@ namespace Microsoft.Iris.CodeModel.Cpp
public static void Startup()
{
DllLoadResultFactory.Startup();
#if WINDOWS
// TODO: Is this necessary if the render engine is implemented in C#?
DllProxyServices.Startup();
#endif
LoadIntrinsicTypeData();
}
+9
View File
@@ -35,7 +35,14 @@ namespace Microsoft.Iris.Debug
if (s_isInitialized)
return;
s_isInitialized = true;
#if WINDOWS
NativeApi.SpInitializeTracing();
#endif
#if DEBUG
EnableAllCategories(true);
#endif
TraceSettings.Current.Refresh();
TraceSettings.Current.ListenForRegistryUpdates();
}
@@ -45,7 +52,9 @@ namespace Microsoft.Iris.Debug
if (!s_isInitialized)
return;
TraceSettings.Current.StopListeningForRegistryUpdates();
#if WINDOWS
NativeApi.SpUninitializeTracing();
#endif
s_isInitialized = false;
}
@@ -46,7 +46,10 @@ namespace Microsoft.Iris.Debug
public void Refresh()
{
s_debugTraceFile = Environment.GetEnvironmentVariable("SPLASH_TRACE_FILE");
#if WINDOWS
NativeApi.SpUpdateTraceSettings(s_debugTraceFile, string.Empty, true, false, false);
#endif
// TODO: Persist trace settings for non-Windows targets
}
public byte GetCategoryLevel(TraceCategory cat)
+6
View File
@@ -19,14 +19,20 @@ namespace Microsoft.Iris.OS
{
ResourceManager.Instance.RegisterSource("http", s_instance);
ResourceManager.Instance.RegisterSource("https", s_instance);
#if WINDOWS
NativeApi.SpHttpStartup();
#endif
}
public static void Shutdown()
{
if (s_activationChangeHandler != null)
UISession.Default.Form.ActivationChange -= s_activationChangeHandler;
#if WINDOWS
NativeApi.SpHttpShutdown();
#endif
}
private static void OnActivationChanged(object sender, EventArgs args) => NativeApi.SpHttpFlushProxyCache();
+6
View File
@@ -51,10 +51,16 @@ namespace Microsoft.Iris.UI
_preventInterruption = false;
UpdateStyles();
SetWindowOptions(WindowOptions.FreeformResize, true);
#if WINDOWS
// Sets up callbacks for accessibility proxy
_notificationCallback = new NativeApi.NotifyWindowCallback(OnNotifyCallback);
IntPtr handle;
RendererApi.IFC(NativeApi.SpCreateNotifyWindow(out handle, _notificationCallback));
AppNotifyWindow = handle;
#else
// TODO: How to implement accessibility for non-Windows targets?
#endif
}
private void OnInitialize()