Skip to content

Commit

Permalink
Changed way Resources/Icons are copied and zip
Browse files Browse the repository at this point in the history
So we don't have an error if a file is removed. Requiring to reload VS.
  • Loading branch information
maforget committed Jul 5, 2024
1 parent 9836be8 commit 62d4ccc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ComicRack/ComicRack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,6 @@
<Content Include="Languages\zh.zip">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Resources\Icons\**\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="Resources\pdfium_x86.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -883,8 +880,7 @@
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>powershell -NoProfile -ExecutionPolicy Bypass -File "$(SolutionDir)CompressIconFolders.ps1" -BaseDirectory "$(TargetDir)"

<PostBuildEvent>
if $(ConfigurationName) == Debug Goto :Exit
del /Q *.pdb

Expand All @@ -894,4 +890,13 @@ del /Q *.pdb
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Target Name="AfterBuild">
<ItemGroup>
<ResourcesIcons Include="Resources\Icons\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(ResourcesIcons)" DestinationFolder="$(TargetDir)\Resources\Icons\%(RecursiveDir)" ContinueOnError="true" SkipUnchangedFiles="true" />
</Target>
<Target Name="PostBuild" AfterTargets="AfterBuild">
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File &quot;$(SolutionDir)CompressIconFolders.ps1&quot; -BaseDirectory &quot;$(TargetDir)&quot;" />
</Target>
</Project>

0 comments on commit 62d4ccc

Please sign in to comment.