mirror of https://github.com/SixLabors/ImageSharp
5 changed files with 20 additions and 46 deletions
@ -1,10 +1,21 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<!-- This copies the native binaries to the bin folder. --> |
|||
<Target Name="Init" BeforeTargets="BeforeBuild"> |
|||
<ItemGroup> |
|||
<NativeBinaries Include="$(MSBuildThisFileDirectory)..\..\build\native\lib\**\*" /> |
|||
</ItemGroup> |
|||
<Copy SourceFiles="%(NativeBinaries.FullPath)" DestinationFiles="bin\%(RecursiveDir)%(Filename)%(Extension)" /> |
|||
<ItemGroup> |
|||
<AvailableItemName Include="NativeBinaries" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<NativeBinaries Include="$(MSBuildThisFileDirectory)native\lib\**\*" /> |
|||
</ItemGroup> |
|||
<PropertyGroup> |
|||
<PrepareForRunDependsOn> |
|||
$(PrepareForRunDependsOn); |
|||
CopyNativeBinaries |
|||
</PrepareForRunDependsOn> |
|||
</PropertyGroup> |
|||
<Target Name="CopyNativeBinaries" DependsOnTargets="CopyFilesToOutputDirectory"> |
|||
<Copy SourceFiles="@(NativeBinaries)" |
|||
DestinationFiles="@(NativeBinaries->'$(OutDir)\%(RecursiveDir)\%(Filename).%(Extension)')"> |
|||
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> |
|||
</Copy> |
|||
</Target> |
|||
</Project> |
|||
@ -1,12 +0,0 @@ |
|||
$solutionDir = [System.IO.Path]::GetDirectoryName($dte.Solution.FullName) + "\" |
|||
$path = $installPath.Replace($solutionDir, "`$(SolutionDir)") |
|||
|
|||
$NativeAssembliesDir = Join-Path $path "lib" |
|||
$x86 = $(Join-Path $NativeAssembliesDir "x86\*.*") |
|||
$x64 = $(Join-Path $NativeAssembliesDir "x64\*.*") |
|||
|
|||
$ImageProcessorPostBuildCmd = " |
|||
if not exist `"`$(TargetDir)x86`" md `"`$(TargetDir)x86`" |
|||
xcopy /s /y `"$x86`" `"`$(TargetDir)x86`" |
|||
if not exist `"`$(TargetDir)amd64`" md `"`$(TargetDir)x64`" |
|||
xcopy /s /y `"$x64`" `"`$(TargetDir)x64`"" |
|||
@ -1,11 +0,0 @@ |
|||
param($installPath, $toolsPath, $package, $project) |
|||
|
|||
. (Join-Path $toolsPath "imageprocessor.ps1") |
|||
|
|||
# Get the current Post Build Event cmd |
|||
$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value |
|||
|
|||
# Append our post build command if it's not already there |
|||
if (!$currentPostBuildCmd.Contains($ImageProcessorPostBuildCmd)) { |
|||
$project.Properties.Item("PostBuildEvent").Value += $ImageProcessorPostBuildCmd |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
param($installPath, $toolsPath, $package, $project) |
|||
|
|||
. (Join-Path $toolsPath "imageprocessor.ps1") |
|||
|
|||
# Get the current Post Build Event cmd |
|||
$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value |
|||
|
|||
# Remove our post build command from it (if it's there) |
|||
$project.Properties.Item("PostBuildEvent").Value = $currentPostBuildCmd.Replace($ImageProcessorPostBuildCmd, "") |
|||
Loading…
Reference in new issue