Skip to content

Commit

Permalink
init Icu on startup for dev, add an Icu binary project reference
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Jun 11, 2024
1 parent 15d7204 commit 8f19776
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
<PackageReference Include="SIL.LCModel" Version="11.0.0-beta0083"/>
<PackageReference Include="SIL.LCModel.Core" Version="11.0.0-beta0083"/>
<PackageReference Include="SIL.LCModel.Utils" Version="11.0.0-beta0083"/>
Expand Down
4 changes: 3 additions & 1 deletion backend/FwDataMiniLcmBridge/LcmUtils/ProjectLoader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using SIL.LCModel;
using System.Diagnostics;
using SIL.LCModel;
using SIL.WritingSystems;

namespace FwDataMiniLcmBridge.LcmUtils;
Expand All @@ -17,6 +18,7 @@ public static void Init()
}

Icu.Wrapper.Init();
Debug.Assert(Icu.Wrapper.IcuVersion == "72.1.0.3");
Sldr.Initialize();
_init = true;
}
Expand Down
5 changes: 5 additions & 0 deletions backend/LocalWebApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
var builder = WebApplication.CreateBuilder(args);
if (!builder.Environment.IsDevelopment())
builder.WebHost.UseUrls("http://127.0.0.1:0");
if (builder.Environment.IsDevelopment())
{
//do this early so we catch bugs on startup
ProjectLoader.Init();
}
builder.ConfigureDev<AuthConfig>(config => config.DefaultAuthority = new("https://lexbox.dev.languagetechnology.org"));
//for now prod builds will also use lt dev until we deploy oauth to prod
builder.ConfigureProd<AuthConfig>(config => config.DefaultAuthority = new("https://lexbox.dev.languagetechnology.org"));
Expand Down

0 comments on commit 8f19776

Please sign in to comment.