Skip to content

Commit b2ed503

Browse files
authored
Merge pull request #842 from unoplatform/dev/eb/sab
fix: Set COEP/COOP headers when platform is not AnyCPU
2 parents 216d302 + 2a49fc3 commit b2ed503

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/Uno.Wasm.Bootstrap.Cli/DebuggingProxy/DebugProxyLauncher.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ private static void RemoveUnwantedEnvironmentVariables(IDictionary<string, strin
157157

158158
private static string LocateDebugProxyExecutable(IWebHostEnvironment environment, IConfiguration configuration)
159159
{
160+
var platform = configuration.GetValue<string>("platform") ?? "";
160161
var buildConfiguration = configuration.GetValue<string>("configuration") ?? "";
161162
var targetFramework = configuration.GetValue<string>("targetframework") ?? "";
162163
var intermediatePath = configuration.GetValue<string>("intermediateoutputpath") ?? "";
@@ -166,7 +167,7 @@ private static string LocateDebugProxyExecutable(IWebHostEnvironment environment
166167
// This is defined in when the boostrapper is referenced through nuget
167168
? Path.Combine(contentRoot, intermediatePath, "wasm-debugger")
168169
// Used as a fallback inside the bootstrapper solution
169-
: Path.Combine(contentRoot, "obj", buildConfiguration, targetFramework, "wasm-debugger");
170+
: Path.Combine(contentRoot, "obj", platform, buildConfiguration, targetFramework, "wasm-debugger");
170171

171172
var debuggerInfoFile = Path.Combine(debuggerInfoRoot, ".debuggerinfo");
172173
if (!File.Exists(debuggerInfoFile))

src/Uno.Wasm.Bootstrap.Cli/Server/Startup.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,12 @@ private static bool IsDebugBuild(IConfiguration configuration)
156156

157157
private static bool ShouldUseSecureMode(IWebHostEnvironment environment, IConfiguration configuration)
158158
{
159+
var platform = configuration.GetValue<string>("platform") ?? "";
159160
var buildConfiguration = configuration.GetValue<string>("configuration") ?? "";
160161
var targetFramework = configuration.GetValue<string>("targetframework") ?? "";
161162

162163
var contentRoot = environment.ContentRootPath;
163-
var debuggerInfoRoot = Path.Combine(contentRoot, "obj", buildConfiguration, targetFramework);
164+
var debuggerInfoRoot = Path.Combine(contentRoot, "obj", platform, buildConfiguration, targetFramework);
164165

165166
var featuresInfoFile = Path.Combine(debuggerInfoRoot, ".unoappfeatures");
166167
if (File.Exists(featuresInfoFile))

src/Uno.Wasm.Bootstrap.DevServer/build/Uno.Wasm.Bootstrap.DevServer.targets

+10-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@
2424
<_UnoRunBasePath Condition="!$(_UnoBootstrapIsDevelopment) and '$(OutputPath)'!='' and $([System.IO.Path]::IsPathRooted($(OutputPath)))">$(OutputPath)</_UnoRunBasePath>
2525

2626
<!-- Used inside bootstrapper solution -->
27-
<_UnoRunBasePath Condition="$(_UnoBootstrapIsDevelopment) and '$(OutputPath)'==''">$(MSBuildProjectDirectory)/bin/$(Configuration)/$(TargetFramework)/</_UnoRunBasePath>
28-
<_UnoRunBasePath Condition="$(_UnoBootstrapIsDevelopment) and '$(OutputPath)'!='' and $([System.IO.Path]::IsPathRooted($(OutputPath)))">$(OutputPath)/$(TargetFramework)/</_UnoRunBasePath>
2927

30-
<RunArguments>$(_unoBinArgs) $(_unoRunArgs) --pathbase &quot;$(_UnoRunBasePath)dist&quot; --configuration &quot;$(Configuration)&quot; --targetframework &quot;$(TargetFramework)&quot; --intermediateoutputpath &quot;$(IntermediateOutputPath)/&quot; $(AdditionalRunArguments)</RunArguments>
28+
<_UnoMaybePlatform></_UnoMaybePlatform>
29+
<_UnoMaybePlatform Condition="'$(Platform)' != 'AnyCPU'">$(Platform)</_UnoMaybePlatform>
30+
31+
<_UnoBasePathMaybePlatform></_UnoBasePathMaybePlatform>
32+
<_UnoBasePathMaybePlatform Condition="'$(AppendPlatformToOutputPath)' == 'true' and '$(Platform)' != 'AnyCPU'">$(Platform)/</_UnoBasePathMaybePlatform>
33+
34+
<_UnoRunBasePath Condition="$(_UnoBootstrapIsDevelopment) and '$(OutputPath)'==''">$(MSBuildProjectDirectory)/bin/$(_UnoBasePathMaybePlatform)$(Configuration)/$(TargetFramework)/</_UnoRunBasePath>
35+
<_UnoRunBasePath Condition="$(_UnoBootstrapIsDevelopment) and '$(OutputPath)'!='' and $([System.IO.Path]::IsPathRooted($(OutputPath)))">$(OutputPath)</_UnoRunBasePath>
36+
37+
<RunArguments>$(_unoBinArgs) $(_unoRunArgs) --pathbase &quot;$(_UnoRunBasePath)dist&quot; --platform &quot;$(_UnoMaybePlatform)&quot; --configuration &quot;$(Configuration)&quot; --targetframework &quot;$(TargetFramework)&quot; --intermediateoutputpath &quot;$(IntermediateOutputPath)/&quot; $(AdditionalRunArguments)</RunArguments>
3138
</PropertyGroup>
3239

3340
</Project>

0 commit comments

Comments
 (0)