mirror of
https://github.com/Ryujinx/Ryujinx.CustomTasks.git
synced 2024-12-22 18:35:35 +00:00
Fix first time compilation issues
Fix including obj directories
This commit is contained in:
parent
2fc980ef9e
commit
8ccbeb3a5a
|
@ -180,7 +180,7 @@ namespace Ryujinx.CustomTasks
|
|||
{
|
||||
string fullPath = item.GetMetadata("FullPath");
|
||||
|
||||
if (fullPath.EndsWith(".g.cs") || fullPath.Contains("obj\\Debug\\") || fullPath.Contains("obj\\Release\\"))
|
||||
if (fullPath.EndsWith(".g.cs") || fullPath.Contains(Path.Combine("obj","Debug")) || fullPath.Contains(Path.Combine("obj", "Release")))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -10,20 +10,16 @@
|
|||
|
||||
<!--A target that generates code, which is executed before the compilation-->
|
||||
<!-- TODO: Make "Outputs" more generic -->
|
||||
<Target Name="BeforeCompile" Inputs="@(ArrayInputFiles)" Outputs="$(ArrayOutputPath)\Arrays.g.cs">
|
||||
<Target Name="BeforeCompile" Inputs="@(ArrayInputFiles)" Outputs="$(ArrayOutputPath)\Arrays.g.cs;$(ArrayOutputPath)\IArray.g.cs">
|
||||
<!--Calling our custom task -->
|
||||
<GenerateArrays ArrayNamespace="$(ArrayNamespace)" InputFiles="@(ArrayInputFiles)" OutputPath="$(ArrayOutputPath)">
|
||||
<Output TaskParameter="OutputFiles" PropertyName="ArrayOutputFiles" />
|
||||
</GenerateArrays>
|
||||
<!--Our generated files are included to be compiled-->
|
||||
<ItemGroup>
|
||||
<Compile Remove="@(ArrayOutputFiles)" />
|
||||
<Compile Include="@(ArrayOutputFiles)" />
|
||||
</ItemGroup>
|
||||
<Output TaskParameter="OutputFiles" ItemName="Compile" />
|
||||
</GenerateArrays>
|
||||
</Target>
|
||||
|
||||
<!--The generated files are deleted after a general clean. It will force the regeneration on rebuild -->
|
||||
<Target Name="AfterClean">
|
||||
<Delete Files="$(ArrayOutputPath)\*.g.cs" />
|
||||
<Delete Files="$(ArrayOutputPath)\Arrays.g.cs;$(ArrayOutputPath)\IArray.g.cs" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
Loading…
Reference in a new issue