mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
### Description <!-- Describe your changes. --> - fix issue with handling string input - set minSdkVersion - otherwise defaults to 19 which we don't support and the build breaks - comment out the debug logging hook - enabling it breaks the Android native logging - can be enabled if you need to debug C# code - update test data tools to allow creating input data for raw file contents (e.g. audio) and from strings (e.g. auth token value) - fix some warnings ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Improve test setup
29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
using Microsoft.Extensions.Logging;
|
|
|
|
namespace MauiModelTester;
|
|
|
|
public static class MauiProgram
|
|
{
|
|
public static MauiApp CreateMauiApp()
|
|
{
|
|
var builder = MauiApp.CreateBuilder();
|
|
builder.UseMauiApp<App>().ConfigureFonts(fonts =>
|
|
{
|
|
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
|
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
|
|
});
|
|
|
|
#if DEBUG
|
|
// NOTE: Enabling this does allow Debug.WriteLine to work for debugging C# code.
|
|
// However it seems to kill native logging on Android using __android_log_print that ORT and
|
|
// onnxruntime-extensions use, at least in the emulator. Due to that, enabled if you want to debug C#
|
|
// code and disable to debug native code.
|
|
//
|
|
// Add the extension debug logger so Debug.WriteLine output shows up in the Output window when running in VS
|
|
// builder.Logging.AddDebug();
|
|
// System.Diagnostics.Debug.WriteLine("Debug output enabled.");
|
|
#endif
|
|
|
|
return builder.Build();
|
|
}
|
|
}
|