Files
BetterDesk/dev_modules/patch_rendezvous.py
T
UNITRONIX b14a8cf162 Add CI, build scripts, docs, and dev utilities
Add a full automated build pipeline, interactive build scripts, documentation and development utilities.

- Add GitHub Actions workflow (.github/workflows/build.yml) to build BetterDesk (hbbs/hbbr) for Linux x64, Linux ARM64 and Windows x64, upload artifacts, optionally create a release and update repository binaries.
- Add interactive build scripts for Windows and Unix (build-betterdesk.ps1, build-betterdesk.sh) supporting download, patch application, cross-build and checksum generation.
- Add build and status docs (docs/BUILD_GUIDE.md, docs/STATUS_TRACKING_v3.md) and update project README/instructions (.github/copilot-instructions.md) with new items and updated timestamp.
- Add development utilities under dev_modules/ (multiple database/patch/test helpers) and move test_generator.py into dev_modules/test_generator.py.
- Update .gitignore to exclude archive/ folder.
- Modify hbbs-patch-v2 sources (database.rs, http_api.rs, main.rs, peer.rs and add rendezvous_server.rs) and remove legacy fixed files; update web UI backend and static files (web/app.py, web/static/*, web/templates/index.html).

These changes set up CI/CD for multi-platform builds, provide local build tooling, expand docs for v3 status tracking and ID-change features, and add developer test/patch utilities.
2026-02-06 23:34:35 +01:00

23 lines
694 B
Python

#!/usr/bin/env python3
"""Patch rendezvous_server.rs to call touch_peer on RegisterPeer"""
import re
with open("rendezvous_server.rs", "r") as f:
content = f.read()
# Add touch_peer call before creating the response message in update_addr
old = '''let mut msg_out = RendezvousMessage::new();
msg_out.set_register_peer_response'''
new = '''// Update database status for this peer
self.pm.touch_peer(&id).await;
let mut msg_out = RendezvousMessage::new();
msg_out.set_register_peer_response'''
content = content.replace(old, new)
with open("rendezvous_server.rs", "w") as f:
f.write(content)
print("Patched rendezvous_server.rs to call touch_peer!")