[WIP] Patchset for Telegram Desktop, heavily inspired by inugram
- C++ 78.1%
- TypeScript 15.7%
- Batchfile 2.8%
- CMake 2.4%
- Objective-C++ 0.9%
- Other 0.1%
|
Some checks failed
mirror to github / mirror (push) Failing after 5s
Reviewed-on: #4 |
||
|---|---|---|
| .claude/skills | ||
| .forgejo/workflows | ||
| docs | ||
| patches | ||
| res | ||
| scripts | ||
| src/cpp/arcanegram | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| build-telegram.bat | ||
| BUILD.md | ||
| eslint.config.js | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| prepare-deps.bat | ||
| README.md | ||
| series | ||
| setup-vcvars.bat | ||
| tsconfig.json | ||
| upstream-commit | ||
Arcanegram
Personal patchset for Telegram Desktop.
No support, no warranty, no promises. Issues, questions, and feature requests will not be answered. Use at your own risk. See LICENSE.
Inspired by inugram (Telegram Android patchset).
Layout
patches/— exported.patchfiles, applied in order fromseries.series— patch order; export target, do not hand-edit.upstream-commit— pinned tdesktop SHA.src/cpp/arcanegram/— fork C++ code, junctioned into the worktree at setup.res/— fork-owned resources (lang strings, icons).worktree/— gitignored local tdesktop checkout managed by stgit.
Patch groups: bugfix | feature | debloat | hooks | misc.
Setup
Requirements:
- Node 20+, pnpm
- git, stgit (
stg --version) - tdesktop build toolchain — see tdesktop build docs
pnpm install
pnpm run setup
Clones tdesktop into worktree/ (with submodules — first run is ~15 min, ~5 GB), applies patches, junctions fork code in. Open worktree/ in your IDE and build the Telegram target.
Adding / modifying patches
cd worktree
stg new feature__my-thing -m 'short description'
# ...edit worktree...
stg refresh
cd ..
pnpm run export
git add patches/ series
git commit -m "feat(patches): short description"
To edit an existing patch, push it to the top first:
cd worktree && stg float feature__my-thing
# ...edit...
stg refresh
cd .. && pnpm run export
Rebasing onto newer upstream
pnpm run rebase latest
# ...resolve any conflicts in worktree, then:
pnpm run export
Windows specifics
- Directory junctions are used instead of symlinks for the fork-source dir, so no admin / dev mode required.
- File-level "symlinks" fall back to copy +
git update-index --skip-worktreeon platforms that refusefs.symlinkfor files.
Known issues
- libyuv duplicate symbols (
LNK2005) on Windows Debug. libavif and tg_owt both statically bundlelibyuv, causingLNK2005for ~50 symbols (ScalePlane,CopyPlane, etc.) when linking with PDB (/Zi). Worked around by passing-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=(empty) inbuild-telegram.bat, which disables debug info and avoids the conflict. The binary builds and runs correctly. If you re-enable/Zi, expect duplicate-symbol link errors.
License
Unlicense (public domain) with an explicit no-support clause. Do whatever you want with the code; expect nothing in return.