msvc: skip copying Data dir and precompiled dlls to Binary dir if they are already there (unless the source files are newer).

Also fix a bug which was preventing DolphinWX/AfterBuild target from being completely skipped.
This commit is contained in:
Shawn Hoffman 2014-08-20 16:57:34 -07:00
parent b5337ea1b5
commit 9ac5d7ecd5
1 changed files with 5 additions and 3 deletions

View File

@ -218,11 +218,13 @@
<BinaryFiles Include="$(TargetPath)" />
<AllInputFiles Include="@(DataDirFiles);@(ExternalDlls);@(BinaryFiles)" />
</ItemGroup>
<Target Name="AfterBuild" Inputs="@(AllInputFiles)" Outputs="@(AllInputFiles -> '$(BinaryOutputDir)%(Filename)%(Extension)')">
<Target Name="AfterBuild" Inputs="@(AllInputFiles)" Outputs="@(AllInputFiles -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')">
<Message Text="Copying Data directory..." Importance="High" />
<Copy SourceFiles="@(DataDirFiles)" DestinationFolder="$(BinaryOutputDir)%(RecursiveDir)" />
<Copy SourceFiles="@(DataDirFiles)" DestinationFolder="$(BinaryOutputDir)%(RecursiveDir)"
Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(DataDirFiles.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) &gt; $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(DataDirFiles.Extension)').Ticks)" />
<Message Text="Copying External .dlls" Importance="High" />
<Copy SourceFiles="@(ExternalDlls)" DestinationFolder="$(BinaryOutputDir)" />
<Copy SourceFiles="@(ExternalDlls)" DestinationFolder="$(BinaryOutputDir)"
Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(ExternalDlls.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) &gt; $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(ExternalDlls.Extension)').Ticks)" />
<Message Text="Copy: @(BinaryFiles) -&gt; $(BinaryOutputDir)" Importance="High" />
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(BinaryOutputDir)" />
</Target>