Skip to content

Commit

Permalink
Merge pull request #649 from unoplatform/dev/jela/absolutepath
Browse files Browse the repository at this point in the history
fix: Adjust for IntermediateOutputPath requiring a sub-path of the current project
  • Loading branch information
jeromelaban authored Dec 13, 2022
2 parents 6ba1d3e + 9e0ba03 commit e1d40a3
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/Uno.Wasm.Bootstrap-netcore-only.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"Uno.Wasm.Tests.Electron\\Uno.Wasm.Tests.Electron.csproj",
"Uno.Wasm.Tests.Empty\\Uno.Wasm.Test.Empty.csproj",
"Uno.Wasm.Tests.Shared\\Uno.Wasm.Tests.Shared.shproj",
"Uno.Wasm.Tests.AbsoluteIntermediate\\Uno.Wasm.Tests.AbsoluteIntermediate.csproj",
"Uno.Wasm.Tests.TypeScript\\Uno.Wasm.Tests.TypeScript.csproj",
"Uno.Wasm.Threads.Aot\\Uno.Wasm.Threads.Aot.csproj",
"Uno.Wasm.Threads.Shared\\Uno.Wasm.Threads.Shared.shproj",
Expand Down
15 changes: 11 additions & 4 deletions src/Uno.Wasm.Bootstrap.sln
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Root", "_Root", "{70AAFC96
..\Readme.md = ..\Readme.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Wasm.Tests.AbsoluteIntermediate", "Uno.Wasm.Tests.AbsoluteIntermediate\Uno.Wasm.Tests.AbsoluteIntermediate.csproj", "{6584CC1B-2628-4872-851A-E85C0E572D39}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -309,14 +311,18 @@ Global
{227B4962-4978-4712-8C52-630E2371A869}.Debug|Any CPU.Build.0 = Debug|Any CPU
{227B4962-4978-4712-8C52-630E2371A869}.Release|Any CPU.ActiveCfg = Release|Any CPU
{227B4962-4978-4712-8C52-630E2371A869}.Release|Any CPU.Build.0 = Release|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Release|Any CPU.Build.0 = Release|Any CPU
{0527B6ED-6050-4B55-A602-31DD46CF5999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0527B6ED-6050-4B55-A602-31DD46CF5999}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0527B6ED-6050-4B55-A602-31DD46CF5999}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0527B6ED-6050-4B55-A602-31DD46CF5999}.Release|Any CPU.Build.0 = Release|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF}.Release|Any CPU.Build.0 = Release|Any CPU
{6584CC1B-2628-4872-851A-E85C0E572D39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6584CC1B-2628-4872-851A-E85C0E572D39}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6584CC1B-2628-4872-851A-E85C0E572D39}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6584CC1B-2628-4872-851A-E85C0E572D39}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -365,6 +371,7 @@ Global
{2829B1BF-47C7-4284-9EAF-DEB48C4A0209} = {00F3A4D2-5534-44AF-B655-6209355E32A9}
{227B4962-4978-4712-8C52-630E2371A869} = {5F914B7D-AFA2-4145-9548-B1B3A16D77AE}
{A7F3B4BF-A73D-4769-A78D-5F3CAC362AAF} = {84D19B91-8728-4EBD-A6B2-D51F3B0EAB31}
{6584CC1B-2628-4872-851A-E85C0E572D39} = {35E84E5F-1C9B-4168-8333-216B456C12DF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FA350FE9-9316-4846-8145-356F9A0ACBC7}
Expand Down
9 changes: 7 additions & 2 deletions src/Uno.Wasm.Bootstrap/ShellTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public partial class ShellTask_v0 : Microsoft.Build.Utilities.Task
[Microsoft.Build.Framework.Required]
public string IntermediateOutputPath { get; set; } = "";
[Microsoft.Build.Framework.Required]
public string BaseIntermediateOutputPath { get; set; } = "";
public string ProjectDir { get; set; } = "";

[Microsoft.Build.Framework.Required]
public string MonoWasmSDKPath { get; set; } = "";
Expand Down Expand Up @@ -318,7 +318,12 @@ private void TryEnableLongPathAware()
}

IntermediateOutputPath = TryConvertLongPath(IntermediateOutputPath);
BaseIntermediateOutputPath = TryConvertLongPath(Path.GetFullPath(BaseIntermediateOutputPath));

if (!Path.IsPathRooted(IntermediateOutputPath))
{
IntermediateOutputPath = TryConvertLongPath(Path.Combine(ProjectDir, IntermediateOutputPath));
}

DistPath = TryConvertLongPath(DistPath);
CurrentProjectPath = TryConvertLongPath(CurrentProjectPath);
CustomDebuggerPath = TryConvertLongPath(CustomDebuggerPath!);
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@
AOTProfileExcludedMethods="$(WasmShellAOTProfileExcludedMethods)"
Assembly="$(IntermediateOutputPath)$(TargetFileName)"
Assets="@(Content)"
BaseIntermediateOutputPath="$(BaseIntermediateOutputPath)"
BrotliCompressionQuality="$(WasmShellBrotliCompressionQuality)"
BuildTaskBasePath="$(MSBuildThisFileDirectory)"
CompressedExtensions="@(WasmShellCompressedExtension)"
Expand Down Expand Up @@ -241,7 +240,7 @@
GenerateCompressedFiles="$(WasmShellGenerateCompressedFiles)"
GeneratePrefetchHeaders="$(WashShellGeneratePrefetchHeaders)"
IndexHtmlPath="$(WasmShellIndexHtmlPath)"
IntermediateOutputPath="$(ProjectDir)$(IntermediateOutputPath)"
IntermediateOutputPath="$(IntermediateOutputPath)"
LogProfilerOptions="$(WasmShellLogProfilerOptions)"
MixedModeExcludedAssembly="@(MonoRuntimeMixedModeExcludedAssembly)"
MonoEnvironment="@(WasmShellMonoEnvironment)"
Expand All @@ -253,6 +252,7 @@
ObfuscateAssemblies="$(WasmShellObfuscateAssemblies)"
AssembliesFileExtension="$(WasmShellAssembliesExtension)"
PackagerBinPath="$(_UnoMonoPackagerBinPath)"
ProjectDir="$(ProjectDir)"
PThreadsPoolSize="$(WasmShellPThreadsPoolSize)"
PWAManifestFile="$(WasmPWAManifestFile)"
ReferencePath="@(_UnoWasmBootstrapAssembliesForReferenceCopyLocalPaths)"
Expand Down
12 changes: 12 additions & 0 deletions src/Uno.Wasm.Tests.AbsoluteIntermediate/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
<PropertyGroup>
<!-- Defines the bin and obj folder paths -->
<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))\</RepoRoot>
<BaseOutputPath>$(RepoRoot)\artifacts\bin\$(Configuration)\$(Platform)\</BaseOutputPath>
<OutputPath>$(BaseOutputPath)$(MSBuildProjectName)\</OutputPath>
<BaseIntermediateOutputPath>$(RepoRoot)\artifacts\obj\$(Platform)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)</IntermediateOutputPath>
<GeneratedFilesDir>$(BaseIntermediateOutputPath)Generated Files\</GeneratedFilesDir>
<PackagesConfigRestorePath>$(RepoRoot)packages\</PackagesConfigRestorePath>
</PropertyGroup>
</Project>
14 changes: 14 additions & 0 deletions src/Uno.Wasm.Tests.AbsoluteIntermediate/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Uno.Wasm.Test.Empty
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Main");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>

<WasmShellMonoRuntimeExecutionMode>InterpreterAndAOT</WasmShellMonoRuntimeExecutionMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="1.4.0" />
</ItemGroup>

<Import Project="..\Uno.Wasm.Bootstrap\build\Uno.Wasm.Bootstrap.targets" />
<Import Project="..\Uno.Wasm.Bootstrap.DevServer\build\Uno.Wasm.Bootstrap.DevServer.targets" />

<ItemGroup>
<ProjectReference Include="..\Uno.Wasm.Bootstrap.Cli\Uno.Wasm.Bootstrap.Cli.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<UndefineProperties>TargetFramework</UndefineProperties>
</ProjectReference>
</ItemGroup>
</Project>

0 comments on commit e1d40a3

Please sign in to comment.