roll back a few changes for linux

- <PackageReference> is not fully supported
 - GenAPI fails when run in a .targets
This commit is contained in:
Matthew Leibowitz 2017-06-24 01:32:40 +04:00
Родитель ccde9e6a24
Коммит 8136e15245
7 изменённых файлов: 28 добавлений и 6 удалений

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

@ -19,9 +19,6 @@
<DefineConstants>TRACE;RELEASE;HARFBUZZ;NET_STANDARD</DefineConstants>
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.BuildTools.GenAPI" Version="1.0.0-beta-00081" />
</ItemGroup>
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" />
</Project>

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

@ -24,7 +24,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.0.1" />
<PackageReference Include="Microsoft.DotNet.BuildTools.GenAPI" Version="1.0.0-beta-00081" />
</ItemGroup>
<Import Project="..\Binding\Binding.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />

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

@ -19,6 +19,7 @@ var NugetToolPath = GetToolPath ("nuget.exe");
var XamarinComponentToolPath = GetToolPath ("XamarinComponent/tools/xamarin-component.exe");
var CakeToolPath = GetToolPath ("Cake/Cake.exe");
var NUnitConsoleToolPath = GetToolPath ("NUnit.ConsoleRunner/tools/nunit3-console.exe");
var GenApiToolPath = GetToolPath ("Microsoft.DotNet.BuildTools.GenAPI/tools/GenAPI.exe");
var MDocPath = MakeAbsolute ((FilePath)"externals/api-doc-tools/bin/Release/mdoc.exe");
var SNToolPath = GetSNToolPath (EnvironmentVariable ("SN_EXE"));
var MSBuildToolPath = GetMSBuildToolPath (EnvironmentVariable ("MSBUILD_EXE"));
@ -116,6 +117,10 @@ Task ("libs")
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.NetStandard/bin/Release/SkiaSharp.Views.Forms.dll", "./output/netstandard/");
}
// Generate the portable code - we can't do it automatically as there are issues on linux
RunGenApi ("./binding/SkiaSharp.NetStandard/bin/Release/SkiaSharp.dll");
RunGenApi ("./binding/HarfBuzzSharp.NetStandard/bin/Release/HarfBuzzSharp.dll");
// .NET Framework / Xamarin
if (IsRunningOnWindows ()) {
RunNuGetRestore ("./source/SkiaSharpSource.Windows.sln");
@ -685,6 +690,7 @@ Information ("Cake.exe ToolPath: {0}", CakeToolPath);
Information ("NUnitConsole ToolPath: {0}", NUnitConsoleToolPath);
Information ("NuGet.exe ToolPath: {0}", NugetToolPath);
Information ("Xamarin-Component.exe ToolPath: {0}", XamarinComponentToolPath);
Information ("genapi.exe ToolPath: {0}", GenApiToolPath);
Information ("sn.exe ToolPath: {0}", SNToolPath);
Information ("msbuild.exe ToolPath: {0}", MSBuildToolPath);

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

@ -3,6 +3,7 @@
<package id="Cake" version="0.20.0" />
<package id="NUnit.ConsoleRunner" version="3.6.1" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.5.0" />
<package id="Microsoft.DotNet.BuildTools.GenAPI" version="1.0.0-beta-00081" />
<package id="SharpCompress" version="0.15.2" />
<package id="XamarinComponent" version="1.1.0.60" />
</packages>

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

@ -136,6 +136,16 @@ var RunSNTool = new Action<FilePath> ((assembly) =>
});
});
var RunGenApi = new Action<FilePath> ((input) =>
{
var output = input.GetFilenameWithoutExtension () + ".cs";
RunProcess (GenApiToolPath, new ProcessSettings {
Arguments = string.Format ("\"{0}\" -out \"{1}\"", input.GetFilename (), output),
WorkingDirectory = input.GetDirectory ().FullPath,
});
ReplaceTextInFiles (input.GetDirectory ().CombineWithFilePath (output).FullPath, "[System.ComponentModel.EditorBrowsableAttribute(1)]", "[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)1)]");
});
var ClearSkiaSharpNuGetCache = new Action (() => {
// first we need to add our new nuget to the cache so we can restore
// we first need to delete the old stuff

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

@ -31,14 +31,19 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Workbooks.Integration" Version="1.0.0-rc2" />
<Reference Include="Xamarin.Interactive">
<HintPath>..\packages\Xamarin.Workbooks.Integration.1.0.0-rc2\lib\portable-net45+win8+wpa81\Xamarin.Interactive.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Binding\SkiaSharp.Portable\SkiaSharp.Portable.csproj">
<ProjectReference Include="/home/matthew/Projects/SkiaSharp/binding/SkiaSharp.Portable/SkiaSharp.Portable.csproj">
<Project>{7aa90628-2fdd-4585-af2f-cc51cfa8b52a}</Project>
<Name>SkiaSharp.Portable</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="SkiaWorkbooksIntegration.cs" />
<Compile Include="SkiaSharpRepresentationProvider.cs" />

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

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packages>
<package id="Xamarin.Workbooks.Integration" version="1.0.0-rc2" />
</packages>