UnigramDev/Unigram/develop • 50ca959 • 32 files, +2975/-60
Pin vcpkg with a manifest instead of a hand-prepared checkout
Setting up the unmanaged dependencies meant cloning vcpkg at a 2024 commit,
editing the ffmpeg portfile by hand to insert an 85-flag `--enable-*` string,
applying Libraries/vcpkg.patch to vcpkg's own MSBuild targets, running
`vcpkg integrate install`, and installing fourteen packages per triplet from
the command line. None of it was verifiable, and that baseline can no longer
build from scratch: the msys2 runtime package it pins has fallen off every
mirror, so vcpkg_fixup_pkgconfig fails with a 404.
vcpkg.json pins 2026.03.18 and declares what is actually used. That is nine
ports, not the fourteen that were installed: cppwinrt comes from the NuGet
package and flatbuffers from the submodule, while dav1d, libvpx and
libjpeg-turbo resolve transitively. The commit matches the one TDLib
documents, so openssl and zlib cannot drift between the tdjson.dll we ship
and the copies the app links -- they reach the flat package root under the
same names from both.
ffmpeg needs a modified portfile for its decoder list, so it is vendored as
an overlay port, taken from the registry at 7.1.2 with the flag line applied.
It wins over the baseline's 8.0.1, which keeps the sonames at avcodec-61 and
avoids ffmpeg 8 removing avcodec_close out from under tgcalls. Moving to 8 is
now a self-contained change.
Directory.Build.props finds vcpkg without any environment variable -- a
checkout beside the repository, or the copy that ships with Visual Studio --
and turns off the machine-wide integration so the pin cannot be bypassed. A
guard reports a checkout older than the pin, which otherwise fails as "no
version database entry", since vcpkg reads the version database from the
working tree rather than from the pinned commit.
The runtime DLLs are copied through ReferenceCopyLocalPaths rather than
vcpkg's applocal step, which made Libraries/vcpkg.patch necessary in the first
place. applocal does not run when the linker is skipped or when a project is
only queried for its packaging outputs, and the DLLs then go missing with no
error; the patch covered one of those cases and never the other. Declaring
them also puts them in the app's own output folder, which applocal never did.
openssl and zlib are excluded there because Libraries/tdjson ships the copies
tdjson.dll was linked against, under the same file names.
Libraries/tdjson/build.ps1 builds TDLib from the same manifest and the same
installed tree, so there is one openssl and one zlib in the build.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#unigram
UnigramDev/Unigram/develop • 50ca959 • 32 files, +2975/-60 Pin vcpkg with a manifest instead of a ha
Telegram github commits and releases
@tgappsupdatesBroadcast from the most important Telegram clients' repositories
4,538 מנויים
פתח בטלגרם