Adjust packager build support for VS 16.5.

This commit is contained in:
Jérôme Laban 2020-01-03 09:03:38 -05:00
Родитель 147c8501ce
Коммит 54d19f2330
8 изменённых файлов: 2040 добавлений и 48 удалений

Двоичные данные
src/Uno.Wasm.Bootstrap/Packager/Mono.Cecil.dll Normal file

Двоичный файл не отображается.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<OutputType>Exe</OutputType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Enable cross targeting, in case net462 is not installed on the current machine -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<Reference Include="Mono.Cecil" />
</ItemGroup>
</Project>

Просмотреть файл

@ -42,7 +42,7 @@
<Pack>true</Pack>
<PackagePath>build</PackagePath>
</Content>
<Content Include="build/packager.cs">
<Content Include="build/packager2.exe">
<Pack>true</Pack>
<PackagePath>build</PackagePath>
</Content>
@ -125,4 +125,19 @@
</ProjectReference>
</ItemGroup>
<Target Name="BuildPackager" BeforeTargets="Build">
<PropertyGroup>
<_packagerIntermediatePath>$(IntermediateOutputPath)packager_build/</_packagerIntermediatePath>
</PropertyGroup>
<ItemGroup>
<_PackagerSource Include="Packager/*.*" />
</ItemGroup>
<Message Text="Building custom packager.exe" />
<MakeDir Directories="$(_packagerIntermediatePath)" />
<Copy SourceFiles="@(_PackagerSource)" DestinationFolder="$(_packagerIntermediatePath)" />
<Move SourceFiles="$(_packagerIntermediatePath)packager.proj" DestinationFiles="$(_packagerIntermediatePath)packager.csproj" />
<MSBuild Projects="$(_packagerIntermediatePath)packager.csproj" Targets="Restore;Build" Properties="Configuration=$(Configuration)" />
<Copy SourceFiles="$(_packagerIntermediatePath)bin/$(Configuration)/packager.exe" DestinationFiles="build/packager2.exe" />
</Target>
</Project>

Просмотреть файл

@ -114,53 +114,12 @@ namespace Uno.Wasm.Bootstrap
Process.Start("chmod", $"-R +x {SdkPath}");
}
}
//
// Disable the packager override as the local updates have been merged into mono master.
//
// Download the corresponding packager
var packagerPath = Path.Combine(SdkPath, "packager_build");
var packagerFilePath = Path.Combine(packagerPath, "packager.cs");
Directory.CreateDirectory(packagerPath);
if (!File.Exists(packagerFilePath))
if (!string.IsNullOrEmpty(PackagerOverrideFile))
{
Log.LogMessage($"Overriding packager for {sdkName} with {PackagerOverrideFile}");
File.Copy(PackagerOverrideFile, packagerFilePath, true);
PackagerBinPath = Path.Combine(SdkPath, "packager2.exe");
File.Copy(PackagerOverrideFile, PackagerBinPath, true);
}
PackagerBinPath = Path.Combine(SdkPath, "packager2.exe");
var projectFile = $@"
<Project Sdk=""Microsoft.NET.Sdk"">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<OutputType>Exe</OutputType>
<OutputPath>..</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Enable cross targeting, in case net462 is not installed on the current machine -->
<PackageReference Include=""Microsoft.NETFramework.ReferenceAssemblies"" Version=""1.0.0"" PrivateAssets=""All"" />
<Reference Include=""Mono.Cecil"">
<HintPath>{SdkPath}/Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include=""Mono.Options"">
<HintPath>{SdkPath}/Mono.Options.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
";
PackagerProjectFile = Path.Combine(packagerPath, "packager2.csproj");
File.WriteAllText(PackagerProjectFile, projectFile);
var thisPath = Path.Combine(Path.GetDirectoryName(new Uri(GetType().Assembly.Location).LocalPath));
File.Copy(Path.Combine(thisPath, "Mono.Cecil.dll"), Path.Combine(SdkPath, "Mono.Cecil.dll"), true);
File.Copy(Path.Combine(thisPath, "Mono.Options.dll"), Path.Combine(SdkPath, "Mono.Options.dll"), true);
}
catch (Exception e)
{

Просмотреть файл

@ -113,15 +113,13 @@
MonoWasmAOTSDKUri="$(MonoWasmAOTSDKUri)"
IsOSUnixLike="$([MSBuild]::IsOsUnixLike())"
MonoRuntimeExecutionMode="$(WasmShellMonoRuntimeExecutionMode)"
PackagerOverrideFile="$(MSBuildThisFileDirectory)/packager.cs"
PackagerOverrideFile="$(MSBuildThisFileDirectory)/packager2.exe"
MonoTempFolder="$(WasmShellMonoTempFolder)">
<Output TaskParameter="SdkPath" PropertyName="_UnoMonoSdkPath" />
<Output TaskParameter="PackagerBinPath" PropertyName="_UnoMonoPackagerBinPath" />
<Output TaskParameter="PackagerProjectFile" PropertyName="_UnoMonoPackagerProjectFile" />
</UnoInstallSDKTask_v0>
<MSBuild Condition="'$(_UnoMonoPackagerProjectFile)'!=''" Projects="$(_UnoMonoPackagerProjectFile)" Targets="Restore;Build" Properties="TargetFramework=net462" />
<ShellTask_v0
CurrentProjectPath="$(MSBuildProjectDirectory)"
Assembly="$(IntermediateOutputPath)$(TargetFileName)"

Двоичные данные
src/Uno.Wasm.Bootstrap/build/packager2.exe Normal file

Двоичный файл не отображается.