161 lines
8.8 KiB
XML
161 lines
8.8 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>net48</TargetFramework>
|
|
<PlatformTarget>x64</PlatformTarget>
|
|
<LangVersion>latest</LangVersion>
|
|
<Nullable>enable</Nullable>
|
|
<!-- PolySharp 1.16.0 generates Microsoft.CodeAnalysis.EmbeddedAttribute by default; the
|
|
compiler reserves that name (CS8336). Opt back out to keep net48 building. -->
|
|
<PolySharpUseEmbeddedAttributeForGeneratedTypes>false</PolySharpUseEmbeddedAttributeForGeneratedTypes>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<UseWPF>true</UseWPF>
|
|
<ApplicationIcon>Resources\kp-icon.ico</ApplicationIcon>
|
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
<Version>1.7.5</Version>
|
|
<AssemblyVersion>1.7.5.0</AssemblyVersion>
|
|
<FileVersion>1.7.5.0</FileVersion>
|
|
<!-- Shown in the About card beside the version so a user can tell how old their build
|
|
is. Must match the date on this version's CHANGELOG section - release.ps1 preflight
|
|
fails the release if it does not. Bump it with the version. -->
|
|
<ReleaseDate>2026-08-22</ReleaseDate>
|
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
|
</PropertyGroup>
|
|
|
|
<!-- The release pipeline builds the installed/inner app as ordinary loose files. Keep this
|
|
opt-in so normal IDE builds remain convenient single-exe development builds while releases
|
|
use the faster installed payload. A separate intermediate directory prevents Fody's copy-local cache from the
|
|
woven build from hiding the payload dependencies when weaving is disabled. -->
|
|
<PropertyGroup Condition="'$(KillerPayloadBuild)' == 'true'">
|
|
<AssemblyName>KillerPDF.App</AssemblyName>
|
|
<DisableFody>true</DisableFody>
|
|
</PropertyGroup>
|
|
|
|
<!-- Fody's copy-local update targets still execute when weaving is disabled. Remove caches from a
|
|
preceding woven build so those targets cannot reuse a list that deliberately removed every
|
|
dependency from the output. -->
|
|
<Target Name="ClearWovenCopyLocalCacheForPayload" BeforeTargets="ResolveReferences"
|
|
Condition="'$(KillerPayloadBuild)' == 'true'">
|
|
<Delete Files="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache;$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.RuntimeCopyLocal.cache" />
|
|
</Target>
|
|
|
|
<!-- Bake ReleaseDate into the assembly so About can show it. A file timestamp would not
|
|
survive being copied, and the PE linker stamp is a build date, not a release date. -->
|
|
<ItemGroup>
|
|
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
|
|
<_Parameter1>ReleaseDate</_Parameter1>
|
|
<_Parameter2>$(ReleaseDate)</_Parameter2>
|
|
</AssemblyAttribute>
|
|
</ItemGroup>
|
|
|
|
<!-- The vendored PdfSharpCore builds as its own ProjectReference; keep the app's implicit
|
|
source globs OUT of third_party or every vendored file compiles twice. -->
|
|
<ItemGroup>
|
|
<Compile Remove="third_party\**" />
|
|
<Compile Remove="Packaging\**" />
|
|
<EmbeddedResource Remove="third_party\**" />
|
|
<EmbeddedResource Remove="Packaging\**" />
|
|
<None Remove="third_party\**" />
|
|
<None Remove="Packaging\**" />
|
|
<Content Remove="third_party\**" />
|
|
<Content Remove="Packaging\**" />
|
|
<Page Remove="third_party\**" />
|
|
<Page Remove="Packaging\**" />
|
|
<Resource Remove="third_party\**" />
|
|
<Resource Remove="Packaging\**" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Costura.Fody" Version="6.2.0">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Fody" Version="6.9.3">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<!-- PdfSharpCore is vendored (third_party/PdfSharpCore, MIT) so PDF/A conformance bugs can be patched at the source - see VENDORED.txt -->
|
|
<ProjectReference Include="third_party\PdfSharpCore\PdfSharpCore.csproj" />
|
|
<!-- Digital signatures only (Services/Signing). Separate namespace (PdfSharp.*) so it does not
|
|
clash with PdfSharpCore, which still drives the rest of the app. -->
|
|
<PackageReference Include="PDFsharp" Version="6.2.4" />
|
|
<PackageReference Include="PdfPig" Version="0.1.15" />
|
|
<PackageReference Include="Docnet.Core" Version="2.6.0" />
|
|
<!-- We embed the x64 natives as resources and self-extract them at runtime (OcrNativeBootstrap), so the
|
|
package's loose x86/x64 native copies in the output are dead weight. ExcludeAssets stops that copy
|
|
while keeping the managed assembly (compile/runtime) and the GeneratePathProperty path for the embed. -->
|
|
<PackageReference Include="Tesseract" Version="5.2.0" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native;contentFiles" />
|
|
<PackageReference Include="System.Text.Json" Version="10.0.11" />
|
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
|
<!-- Transitive pins only (family standard, same as Killendar/KillerNotes): Costura's graph
|
|
otherwise resolves 4.3.0 of both, which carry advisories (GHSA-7jgj-8wvc-jh57,
|
|
GHSA-cmhx-cq75-c4mj). ExcludeAssets="all" means nothing ships - the pin just forces the
|
|
resolver past the vulnerable versions. net48 runs the framework's own copies anyway. -->
|
|
<PackageReference Include="System.Net.Http" Version="4.3.4" ExcludeAssets="all" />
|
|
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" ExcludeAssets="all" />
|
|
<PackageReference Include="PolySharp" Version="1.16.0">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Reference Include="Microsoft.CSharp" />
|
|
<Reference Include="System.Printing" />
|
|
<Reference Include="ReachFramework" />
|
|
<Reference Include="System.Net.Http" />
|
|
<Reference Include="System.IO.Compression" />
|
|
<Reference Include="System.IO.Compression.FileSystem" />
|
|
</ItemGroup>
|
|
|
|
<!-- KillerPDF.Tests is its own project. Keep its entire tree out of this project's SDK default
|
|
globs, or its bin\ DLLs become items here (MSB3277 System.ValueTuple conflict) and the folder
|
|
shows inside this project in Solution Explorer. -->
|
|
<ItemGroup>
|
|
<Compile Remove="KillerPDF.Tests\**" />
|
|
<None Remove="KillerPDF.Tests\**" />
|
|
<Content Remove="KillerPDF.Tests\**" />
|
|
<Resource Remove="KillerPDF.Tests\**" />
|
|
<Page Remove="KillerPDF.Tests\**" />
|
|
</ItemGroup>
|
|
|
|
<!-- /brand holds heavy source art only (stored locally, see .gitignore). Keep it out of the SDK default
|
|
globs so it is not part of the project. This targets KillerPDF\brand only, not pdf-landing\brand. -->
|
|
<ItemGroup>
|
|
<None Remove="brand\**" />
|
|
<Content Remove="brand\**" />
|
|
<Resource Remove="brand\**" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Resource Include="Resources\kp-icon.ico" />
|
|
<Resource Include="Resources\kp-icon.png" />
|
|
<Resource Include="Fonts\Typewriter-A602.ttf" />
|
|
<EmbeddedResource Include="Resources\pdf-file.ico" />
|
|
</ItemGroup>
|
|
|
|
<!-- OCR: embed only the native Tesseract libs (x64) so the app still ships as a single exe. Language data
|
|
is NOT bundled - it is downloaded on demand on first OCR (see EnsureOcrModelsReadyAsync), which keeps
|
|
the exe small. OcrNativeBootstrap extracts the natives to a per-version cache under %LOCALAPPDATA% on
|
|
first use, the same self-extract pattern Costura uses for the managed assemblies. PkgTesseract comes
|
|
from GeneratePathProperty. -->
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="$(PkgTesseract)\x64\tesseract50.dll" Condition="'$(PkgTesseract)' != ''">
|
|
<LogicalName>KillerPDF.OcrNative.tesseract50.dll</LogicalName>
|
|
</EmbeddedResource>
|
|
<EmbeddedResource Include="$(PkgTesseract)\x64\leptonica-1.82.0.dll" Condition="'$(PkgTesseract)' != ''">
|
|
<LogicalName>KillerPDF.OcrNative.leptonica-1.82.0.dll</LogicalName>
|
|
</EmbeddedResource>
|
|
</ItemGroup>
|
|
|
|
<!-- GPL3 source bundle: produces <AppName>-<Version>-src.zip in the publish folder every time you Publish. -->
|
|
<Target Name="BundleSource" AfterTargets="Publish" Condition="'$(KillerPayloadBuild)' != 'true'">
|
|
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(ProjectDir)build\bundle-source.ps1" -ProjectDir "$(ProjectDir.TrimEnd('\'))" -Version "$(Version)" -AppName "$(AssemblyName)" -PublishDir "$(PublishDir.TrimEnd('\'))"" IgnoreExitCode="true" />
|
|
</Target>
|
|
|
|
</Project>
|