mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-28 20:04:56 +00:00
42 lines
2.7 KiB
XML
42 lines
2.7 KiB
XML
<Project>
|
|
<ItemGroup>
|
|
<None Include="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cpz" Condition="$(ProjectType) == 'Program'">
|
|
<Pack>true</Pack>
|
|
<PackagePath>build;</PackagePath>
|
|
</None>
|
|
<None Include="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cplz" Condition="$(ProjectType) == 'ProgramLibrary'">
|
|
<Pack>true</Pack>
|
|
<PackagePath>build;</PackagePath>
|
|
</None>
|
|
</ItemGroup>
|
|
<PropertyGroup Condition="$(ProjectType) == 'ProgramLibrary'">
|
|
<FileName>$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cplz</FileName>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="$(ProjectType) == 'Program'">
|
|
<FileName>$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cpz</FileName>
|
|
</PropertyGroup>
|
|
<Target Name="DeleteCPLZ" BeforeTargets="PreBuildEvent" Condition="$(ProjectType) == 'ProgramLibrary' And $(TargetDir) != '' And Exists($(FileName))">
|
|
<Delete Files="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cplz">
|
|
<Output TaskParameter="DeletedFiles" ItemName="DeletedList"/>
|
|
</Delete>
|
|
<Message Text="Deleted files: '@(DeletedList)'" />
|
|
</Target>
|
|
<Target Name="CreateCPLZ" AfterTargets="Build" Condition="$(ProjectType) == 'ProgramLibrary' And $(TargetDir) != ''" DependsOnTargets="DeleteCPLZ">
|
|
<Message Text="Creating CPLZ $(TargetDir)"></Message>
|
|
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))" />
|
|
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cplz" Overwrite="true"/>
|
|
<Copy SourceFiles="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cplz" DestinationFiles="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cplz" />
|
|
</Target>
|
|
<Target Name="DeleteCPZ" BeforeTargets="PreBuildEvent" Condition="$(ProjectType) == 'Program' And $(TargetDir) != '' And Exists($(FileName))">
|
|
<Delete Files="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cpz">
|
|
<Output TaskParameter="DeletedFiles" ItemName="DeletedList"/>
|
|
</Delete>
|
|
<Message Text="Deleted files: '@(DeletedList)'" />
|
|
</Target>
|
|
<Target Name="Copy CPZ" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' != 'net6.0' ) And ( '$(TargetFramework)' != 'net8.0' ))">
|
|
<Message Text="Copying CPZ"></Message>
|
|
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cpz" />
|
|
<Copy SourceFiles="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cpz" DestinationFiles="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
|
</Target>
|
|
</Project>
|