Skip to content

Commit

Permalink
Add FDC3 IIFE Bundle Directly from dist
Browse files Browse the repository at this point in the history
  • Loading branch information
kruplm committed Jul 3, 2023
1 parent e28fade commit b50b8c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/shell/dotnet/Shell/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void InjectFdc3()
public string ReadPreloadResource(string name)
{
var assembly = Assembly.GetExecutingAssembly();
string resourcePath = $$"""Shell.Preload.{{name}}""";
string resourcePath = $$"""Shell.{{name}}""";

using (var stream = assembly.GetManifestResourceStream(resourcePath))
using (var reader = new StreamReader(stream))
Expand Down
14 changes: 5 additions & 9 deletions src/shell/dotnet/Shell/Shell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<None Remove="MainWindow.xaml" />
<None Remove="WebWindow.xaml" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Preload\fdc3-iife-bundle.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\..\js\composeui-fdc3\dist\fdc3-iife-bundle.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

This comment has been minimized.

Copy link
@BalassaMarton

BalassaMarton Jul 3, 2023

Contributor

Embedded resources should not be copied to the output directory, as they are not read from there.

</EmbeddedResource>
</ItemGroup>

<ItemGroup>
Expand All @@ -44,7 +44,7 @@
</ItemGroup>

<ItemGroup>
<Folder Include="Preload\" />
<Folder Include="..\..\js\composeui-fdc3\dist\"/>
<Folder Include="Utilities\" />
</ItemGroup>

Expand All @@ -53,8 +53,4 @@
<ProjectReference Include="..\..\..\messaging\dotnet\src\Host\MorganStanley.ComposeUI.Messaging.Host.csproj" />
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="PowerShell cd ..\..\..\..\ ; .\src\shell\dotnet\copy-fdc3-iife-bundle.ps1" />
</Target>

</Project>
10 changes: 0 additions & 10 deletions src/shell/dotnet/copy-fdc3-iife-bundle.ps1

This file was deleted.

0 comments on commit b50b8c4

Please sign in to comment.