Commit Graph
399 Commits
Author SHA1 Message Date
lotherk fed6f4c294 dtwm: the panel says which pointer it wants
The busy cursor was created and thrown away (_DtGetHourGlassCursor's return
value went nowhere), so BUSY_START defined cursor None on the panel and the
pointer fell back to whatever the shell had inherited.  On the MacBook that
was a black 16x16 square (measured with XFixes: 16x16, hotspot 8,8, every
pixel black, serial 16) over the whole front panel, while the root and the
xterm showed the arrow and the I-beam.

The return value is kept now, and the panel defines the standard arrow on
itself when it is mapped instead of inheriting one from its frame.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-cursor.log).
2026-11-22 09:53:16 +01:00
lotherk 7589f2ea15 dtwm: the panel finds a program's icon under either spelling
CDE names its icons with a capital (Dtterm.m.pm, Dtcalc.m.pm); a client's
WM_CLASS instance name is usually lower case and a kept program is written
with whatever the command names.  The panel tried the name as stored and in
lower case only, so a lower-case class with a capitalised icon file fell back
to Dtactn.  ClassIcon() tries the name as given, lower case and with a
capital, in that order, for the dock and for the drawers.

Measured: make -C programs/dtwm rc=0 on this tree (0 errors,
build/logs/dtwm-iconfix2.log).
2026-11-22 09:50:29 +01:00
lotherk bc84289d25 mcde: the review's loose ends
- dtsystemsettings/panes.c: the icon of every pane is unique again (Backup
  showed the same DtSystem.m.pm as System Information, Default Programs the
  same Dtmail.t.pm as Internet Accounts) and the dock entry is indented like
  its neighbours.
- startupdisk.c is no longer built: the pane was removed, the file stayed in
  the SUBDIRS list.
- dttoolbox.msg: message 2 says "No dttoolchest menu", like message 1 says
  "dttoolchest".
- dock.c stores the program's class as the command names it (lower case, as
  WM_CLASS's instance name is), not with an invented capital.  dtwm compares
  classes with strcasecmp (WmMcdePanel.c:144, 233), so matching works either
  way; the icon lookup by file name is what a made-up case could spoil.
2026-11-22 09:40:15 +01:00
lotherk 88b63a51b5 configure: a plain build installs into /usr/mdt
CDE's upstream default is /usr/dt.  On this development machine the desktop
lives in /usr/mdt (the running install is there since 2026-11-16), so a plain
./configure && make install went to /usr/local instead, next to the one that
is running.  The pkgsrc recipe still passes its own --prefix (/usr/pkg/dt).
2026-11-22 09:30:30 +01:00
lotherk 727965b212 mcde: the archive with the Dock pane 2026-11-22 08:09:02 +01:00
lotherk bd2afc27f2 dtsystemsettings: a Dock pane that works
The Dock entry is back, and it is a pane of its own: it lists the programs
kept in the front panel (the CLASS and COMMAND lines of ~/.dt/panel-apps),
removes the chosen one, adds one from a command, writes the file at once and
restarts the window manager (_DtWmRestartNoConfirm) so the panel is built
again.  The icon is Dtapps.m.pm -- the entry was PANE_LATER with
DtPanel.m.pm, which does not exist, so it was greyed out and had no picture.
2026-11-22 08:08:45 +01:00
lotherk 4aa00e0649 mcde: the archive of 94ab6eb75e 2026-11-22 06:46:42 +01:00
lotherk d574ce9587 dtsystemsettings: include Xm/ScrolledW.h for the pane scrolled window
The pane scrolls since 8f03d0d74e; the widget class was not declared
(measured 2026-11-22 on the MacBook: xmScrolledWindowWidgetClass
undeclared).
2026-11-22 06:46:01 +01:00
lotherk 38c7bd1901 mcde: the archive of 8f03d0d74e
The recipe had the archive of the commit before the System Settings change.
2026-11-21 21:46:03 +01:00
lotherk 68d4953b99 mcde: one window size for System Settings, tabs that are one of many, icons that exist
- dtsystemsettings: the shell is 1022x550 and stays so (min/max equal); every
  pane lives in it instead of growing the window (thirteen per-pane
  XtVaSetValues(shell, width, height) calls are gone), and a taller pane
  scrolls (the pages sit in an XmScrolledWindow with XmAUTOMATIC).
- panes.c: CDs & DVDs had no icon (Dtmedia.m.pm does not exist) - it shows
  IrixCD.m.pm; Energy Saver shows SDtpowermgr.m.pm; Accounts had the same icon
  as Startup (DtStart.pm) and shows McdeUser.t.pm.  The "Startup Disk" entry
  and the disabled "Dock" entry (no icon, PANE_LATER) are removed.
- McdePrefs: the tab strip is one of many (XmNradioBehavior,
  XmNradioAlwaysOne).  Without it every visited tab stayed pressed
  (measured 2026-11-21: Keyboard, Mouse and Shortcuts all down at once).
- dttoolbox: the window title is "dttoolchest" (msg 1 of the catalog).
- McdeSys: mcde_sys_keyboard_is_mac asks the machine (hw.model "Mac...")
  before usbdevs.  At session start the internal keyboard may not be
  enumerated yet, so dtkeys took a MacBook for a PC keyboard and exchanged
  Alt and Command (_MCDE_KEYS said "pc", measured 2026-11-21).
2026-11-21 21:44:16 +01:00
lotherk fd55404245 mcde recipes and the cross configuration: the X of the build host, named once
These are the changes the cross (Linux) path needed before the chroot path
made them unnecessary on Makronix; they are kept because that path still
builds for the same sysroot on a host that is not Makronix.

tools/pkgsrc-cross.mk.conf names the host side in one place instead of in the
recipes: HOST_TOOLS_BIN on PREPEND_PATH (autoreconf stopped with "Can't exec
libtoolize"), HOST_X11BASE (the include path of the host's X), HOST_X11_LIBS
and HOST_FL_A (the archives the host tools link) and HOST_BUILD_CFLAGS
(-std=gnu17 -fPIE: the 1990s C of the forks, and NetBSD links PIE by default
so tradcpp failed with "relocation R_X86_64_32 ... can not be used when
making a PIE object").  /usr/pkg/lib comes before the base X when linking: a
library pkgsrc builds because the base copy is too old must be the one a
package links (the base freetype is 2.10.4, pkgsrc's 2.15.0 was ignored and
libfontconfig.so needed .19).  x11-links keeps the sysroot override only on a
host without X of its own (on Makronix it doubled the path, 7 instead of 111
pkg-config links, x11/libXft then "Package 'x11' not found").

ext/src/mcde/pkgsrc-motif and ext/src/mcde/pkgsrc use those variables; the
build tools (makestrs, wml, wmldbcreate) are built and run by the host, so
their CFLAGS come from HOST_BUILD_CFLAGS and their include path from
HOST_X11BASE.

Measured on makronix-build before the chroot path: mcde-motif rc=0 in 529 s,
wm/mcde rc=0 in 1506 s.
2026-11-21 01:49:20 +01:00
lotherk 16826ffd01 motif recipe: the build tools link the host archives where the host has X
The cross branch named ${MAKRONIX_TOP}/build/pkg/lib/libXt.a and friends.  That
is a Linux host, where userland builds them as host tools; on Makronix the
builtin libXt is used, the bootstrap has no libXt.a, and makestrs stopped at
the link ("cannot find /usr/src/build/pkg/lib/libX11.a", measured 2026-11-20).
Where /usr/X11R7/lib/libXt.a and /usr/lib/libfl.a exist, they are named
instead; the bootstrap path stays for the Linux host.
2026-11-20 16:12:57 +01:00
lotherk 3a9f769c51 mcde recipes: the build tools take the X of the build host
makestrs, wml and wmldbcreate are built and RUN by the build host, and in a
cross build prefix is the target ( /usr/pkg ): there /usr/pkg/include has no
X11, and makestrs stopped with "X11/Xos.h: No such file or directory" on
Makronix (measured 2026-11-20) while the Linux host had the buildlink stub in
that directory.  Where the host has its own X (/usr/X11R7), the tools use it;
else the old -I${PREFIX}/include stays.
2026-11-20 15:40:03 +01:00
lotherk ba6190a157 userland: the set is built for the sysroot on every host; dist scripts hash without digest(1)
tools/userland.sh decided by uname: on NetBSD it took a "native" branch that
built the forks for the bootstrap's prefix (build/pkg), never installed
anything into build/obj/destdir/usr/pkg and never ran tools/makronix-set.sh.
Measured 2026-11-20 on makronix-build: userland exit=0, then build.sh release
stopped at checkflist with "9422 missing files", all under ./usr/pkg.  The
cross branch builds what the set needs -- the sysroot, PREFIX /usr/pkg, this
tree's own toolchain from build.sh (tooldir.NetBSD-11.99.9-amd64 on Makronix)
-- and that is the same build on Linux and on Makronix (AGENTS.md: cross and
native are one build).  It is the default now; USERLAND_MODE=native keeps the
old branch for packages of the running host.  mk-host.conf takes the archives
from distfiles/ of the tree.

tools/ext-dist.sh and tools/mcde-dist.sh: digest_of() (digest when it exists,
else SHA512 from cksum) and no hash line without a value.  This was meant for
0c91b0cddf and stayed staged when that commit stopped at the ignored recipe
paths.  ext/src/mcde/pkgsrc-motif/distinfo names the archive in distfiles/.
2026-11-20 10:31:44 +01:00
lotherk e8d19bc74f ext: the recipes of the forks are tracked again, with their distinfo
The root .gitignore said "pkgsrc/", which git applies at every level, so
ext/src/*/pkgsrc -- the recipes of MCDE, afpfs-ng and splinter -- were ignored
and never in the repository; a fresh clone had no recipe for any fork and the
source set could not carry one.  The rule is "/pkgsrc/" now: the checkout at
the top stays out, the recipes belong in.

The three distinfo files name the hashes of the archives this run packed, and
the archives themselves are the ones in distfiles/ (regenerated with digest, or
with cksum when digest does not exist yet).
2026-11-20 05:59:49 +01:00
lotherk 9b8e5b12ff mcde: distinfo of the archive with dtlogin's LANG order
test-desktop-login on the installed VM with this dtlogin: 12 of 12 PASS,
the session runs with LANG=en_US.UTF-8 (build/logs/desktop-login-2026-11-18f.log).
2026-11-18 12:38:05 +00:00
lotherk f2a9e14426 dtlogin: LANG before PATH in the session environment (ksh93 dropped it)
The session ran with LANG=C although dtlogin passed LANG=en_US.UTF-8 to
Xsession (dtlogin -debug 3: 'LANG=en_US.UTF-8'; ps -e on Xsession showed it).
Xsession is a ksh93 script, and ksh93 93u+m 1.0.10 on NetBSD rejects LANG as
'en_US.UTF-8: unknown locale' and leaves it empty when PATH comes earlier in
the environment (put_lang -> libast setlocale); Xsession then set LANG=C.
Measured in the installed system: env -i PATH=/bin:/usr/bin LANG=en_US.UTF-8
ksh93 -> empty, LANG before PATH -> kept, no PATH -> kept.  verify.c now
creates LANG right after LOGNAME; setLang() replaces the value in place.

Tests: test-desktop-login's LOGIN and CORES checks matched padded ps and wc
output ('CORES= 0'); install-simple's .local lookup is bounded to 5 s per
round (the loop outlasted ENDCHK's 300 s without a network).
2026-11-18 12:28:02 +00:00
lotherk b6cbd0eb87 mcde: distinfo of the archive with the session fixes (libSM ID, locale, fonts, catalogues, ICE) 2026-11-18 06:49:26 +00:00
lotherk 2b141773ce dtlogin: /tmp/.ICE-unix for the session manager
libICE creates it only as root and NetBSD creates it nowhere; the session
log said '_IceTransmkdir: ERROR: euid != 0, directory /tmp/.ICE-unix will not
be created' and dtsession had no local ICE socket, its clients going over
TCP to the host name (2026-11-18).  dtlogin (root) makes it 1777 next to
/var/dt, as libICE itself would.
2026-11-18 06:38:50 +00:00
lotherk 6f27882115 mcde: message catalogues in NetBSD's format (nbgencat from the tooldir)
configure took the build host's gencat; on Linux it wrote glibc catalogues
(magic 0x960408de, dtfile.cat in the makronix set) which NetBSD's catopen(3)
rejects (src/lib/libc/nls/catopen.c:183, _NLS_MAGIC 0xff88ff89): catgets()
always returned the built-in English, translations never showed.  The
tooldir's nbgencat writes the NetBSD format; a native NetBSD host keeps its
own gencat.
2026-11-18 06:38:20 +00:00
lotherk ecaba781e0 dtsession: *Font and *FontSet name their charset (menus were Chinese)
sys.resources/sys.font gave *Font and *FontSet as
'-dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*'.  The first match the
server lists for that alias is ...-gb2312.1980-0, a two-byte font: Motif drew
ASCII two bytes per glyph and every menu bar, label and the dtbar status read
as Chinese ('Fi' = 0xC6E9 = GB2312 '崎').  With iso8859-1 named, dtfile's labels
read 'Back', 'Forward', 'DEVICES' (xrdb -merge in the installed VM,
2026-11-18).
2026-11-18 06:37:48 +00:00
lotherk 30c7ae32f1 mcde: en_US.UTF-8 by default, paths in the actions, the cursor path
- dtlogin Xconfig: Dtlogin*language en_US.UTF-8 on NetBSD.  dtlogin has
  no DEF_LANG there and rc.d passes no LANG: every session ran with LANG=C
  (Konrad, 2026-11-18: 'default soll en_US.UTF-8 sein').
- types/Makefile.am: tradcpp does not expand macros inside '...', and the
  actions quote their commands; 'CDE_INSTALLATION_TOP/bin/dthelpgen' reached
  dthelp.dt, dt.dt, dtfile.dt, uxstd.dt, develop.dt, xclients.dt unexpanded
  ('sh: CDE_INSTALLATION_TOP/bin/dthelpgen: not found' in ~/.dt/errorlog).
  The paths are filled in by sed after cpp.
- 0079.dtcursor: $CDE_INSTALLATION_TOP is no session variable (the path
  was /share/icons); derived from DT_BINPATH.
2026-11-18 06:28:45 +00:00
lotherk 24e1c5a51f libSM: client IDs from uuid_create(3); dtsession refuses a NULL ID
The login went back to the greeter: dtsession dumped core
(~/dtsession.core, SIGSEGV in strlen <- strdup <- SmsRegisterClientReply
<- SmXSMP.c:562, return address 0x1fb5c in the PIE).  NetBSD builds libSM
without UUID support, so SmsGenerateClientID derives the ID from the host
name's address and returns NULL when the name does not resolve (sm_genid.c,
getaddrinfo) -- an offline machine whose name is not in /etc/hosts, the
installed test VM, the workstation without network.

- src/external/mit/xorg/lib/libSM/Makefile: -DHAVE_UUID_CREATE, libc's DCE
  uuid_create/uuid_to_string (the branch sm_genid.c has for FreeBSD).
- dtsession SmXSMP.c: a NULL ID refuses that client instead of killing the
  session manager.
2026-11-18 06:18:50 +00:00
lotherk 9a950d0046 dtlogin: the NetBSD server keeps the pseudo-user (as CDE has it)
Running it as root made it enforce access control, and the display manager's
own connection then failed before the greeter ('Authorization required, but
no authorization protocol specified').  As nobody it cannot read the -auth
file and serves without access control, which is how this display has always
worked; the session now uses the user's ~/.Xauthority (previous commit).
2026-11-18 05:43:16 +00:00
lotherk 7eb890e507 dtlogin: the parent presents the cookie to its own server
With the server running as root it enforces access control (it can read
-auth now), and WaitForServer's XOpenDisplay in the parent had no
authorization: 'Authorization required, but no authorization protocol
specified' and 'Server for display :0 can't be started' (2026-11-18).
SetAuthorization(d) is called before the wait, as the server child already
did.
2026-11-18 05:29:32 +00:00
lotherk 21de6b6edd dtlogin: the session keeps the user's Xauthority
SetUserAuthorization() writes ~/.Xauthority for the user (and sets
XAUTHORITY itself when it has to use the fallback file), but the session
environment then named the server's auth file -- 0600 root, unreadable for
the user.  dtsession could not open the display and dtlogin went back to the
greeter (measured 2026-11-18; dtsession runs fine when XAUTHORITY names
~/.Xauthority).
2026-11-18 05:04:33 +00:00
lotherk 1f2b96e8c2 dtlogin: the server as root, and /var/dt writable for the session
Two causes of 'the login goes back to the greeter', both measured in the
installed VM 2026-11-18:

- Xservers.src ran the server as the pseudo-user nobody on NetBSD; it could
  not read its own -auth file (0600 root) and the session could not open the
  display.  NetBSD's xdm runs the server as root; NetBSD gets
  local_uid@console root now, as Solaris and OpenBSD already had.
- dm.c's dtMakeDefaultDir made /var/dt/appconfig and appmanager 0755 root;
  dtsession creates its directory there as the user and died with
  'MakeDirectory: /var/dt/appconfig/appmanager/<user>-<host>: Permission
  denied'.  appconfig and appmanager are 0777, tmp is 1777.
2026-11-18 04:32:38 +00:00
lotherk 03ce0155cc mcde: distinfo of the archive with the sessreg and userPath fix 2026-11-18 02:16:08 +00:00
lotherk 4119ece49a mcde: sessreg's path -- the session setup failed and dtlogin went back to the greeter
Xstartup's last line is 'exec sessreg -a ...' and Xreset's 'sessreg -d ...'.
configure (AC_CHECK_PROGS(SESSREG, sessreg)) recorded the bare name from the
build host, and Dtlogin*userPath had no /usr/X11R7/bin -- where NetBSD's
sessreg is.  The session setup died with 'Xstartup[57]: exec: sessreg: not
found', dtlogin restarted the greeter: the password was accepted and the
login bounced (measured in the installed VM 2026-11-18, Xerrors).

- pkgsrc/Makefile: ac_cv_prog_SESSREG=/bin/sessreg
- dtlogin/config/Xconfig.src: NetBSD's userPath carries /usr/X11R7/bin
  (xrdb, xset, xmodmap too)
- tools/install-simple.sh: answer the museum question (it hung there)
- tools/test-desktop-login.sh: the greeter test rebuilt: root shell first,
  wait for X and dtgreet before typing (keys sent too early were lost), -g
  restarts dtlogin with -debug.
2026-11-18 02:02:19 +00:00
lotherk f8f0194533 ext: distinfo of the archives of HEAD (make userland, build/logs/userland-2026-11-17j.log exit=0) 2026-11-17 17:12:52 +00:00
lotherk 6b69dc7f1e mcde recipe: the path replacements touch text only, once
pre-configure ran sed over every file under WRKSRC holding /usr/dt or
/etc/dt.  From an extracted archive that is text; in a built tree,
configured again by ext-resync/fork_reconfigure, it garbled 35 objects and
libraries (ld: 'file format not recognized', userland-2026-11-17g.log:33,
h.log:148), and since ${PKG_SYSCONFDIR}/dt holds /etc/dt again, the second
pass wrote /usr/pkg/usr/pkg/etc/dt into 276 files of the work directory.
Now grep -I (text only), the package's path set aside before the
replacement (idempotent), and a file the replacement does not change is not
rewritten (no new time stamp, nothing recompiled).  Tested in a scratch
tree: two passes, a binary with /etc/dt untouched, the time stamp kept.
2026-11-17 17:05:27 +00:00
lotherk 8169c04b38 mcde: a cross build makes no test programs; check-buildtools stopped on 28
build/logs/userland-2026-11-17f.log:22437: the 25 test programs of
libDtChat, dtchat-demo and McdeSys's test_audio/test_netwatch were
noinst_PROGRAMS, so the package build compiled them for NetBSD and
tools/check-buildtools.sh took them for build tools.  configure.ac has
MCDE_CROSS now; in a cross build they are check_PROGRAMS (dtchat-demo
EXTRA_PROGRAMS), in a native one noinst as before, so tools/mcde-tests.sh
still finds them in build/mcde-host.  autoreconf -fi of the tree: exit 0,
the Makefile.in lines are @MCDE_CROSS_TRUE@check_PROGRAMS /
@MCDE_CROSS_FALSE@noinst_PROGRAMS.
2026-11-17 16:55:45 +00:00
lotherk 9005246c8d dtchat: dtchat.1 is documentation, installed with --enable-docs only
Every manual page of MCDE is ${PLIST.docs} in the PLIST; dtchat's man_MANS
installed it in a --disable-docs build too, and pkgsrc's check stopped
wm/mcde (build/logs/userland-2026-11-17e.log:22217).
2026-11-17 16:41:17 +00:00
lotherk fc0c936693 mcde: PAM files for Linux again, MAIL where the mail indicator looks, 0079.dtcursor installed
dtlogin.src/dtsession.src: NetBSD keeps `include display_manager'; every
other system gets the stack of the CDE import (7a787b72c5) again -- Linux
has no display_manager file, so a native build had a PAM file that denied
every login.

Xsession.src: MAIL is $HOME/.mail/INBOX, the file dtwm's mail indicator
watches (Dtwm.defs.src:184, 6266bc5031); the folder and the file are made
at login.

Makefile.am: 0079.dtcursor (t0301) was in the tree and in the PLIST but
not in dist_xsess_SCRIPTS, so it was never installed.
2026-11-17 16:37:51 +00:00
lotherk ec23c381ca mcde: build wm/mcde without Go; the WhatsApp adapter is its own package
configure found the build host's go, and programs/dtchat built
dtchat-whatsapp with it: a host binary, from modules pkgsrc's build phase
may not download (http_proxy=downloads-forbidden-except-during-fetch,
build/logs/userland-2026-11-17c.log:19467).  PLIST.whatsapp is never set,
so the package never wanted the file.  The two commits that let go
download (38d293c454, 6f23f4e232) are reverted.
2026-11-17 16:29:55 +00:00
lotherk dbc1954c1d Revert "mcde: allow Go module downloads for dtchat-whatsapp (remove GOPROXY=off)"
This reverts commit 38d293c4549c40975fd91b54938904aeb8b2892c.
2026-11-17 16:28:23 +00:00
lotherk 26a4f82170 Revert "mcde: try GOPROXY=direct for dtchat-whatsapp when proxy is blocked"
This reverts commit 6f23f4e232fa908efc5f758da28db5decd1c90df.
2026-11-17 16:28:22 +00:00
lotherk 1939c30a6a mcde: try GOPROXY=direct for dtchat-whatsapp when proxy is blocked 2026-11-17 16:05:10 +00:00
lotherk f590a4472b mcde: allow Go module downloads for dtchat-whatsapp (remove GOPROXY=off) 2026-11-17 15:09:49 +00:00
lotherk 284fe5d634 mcde: add missing Irix-themed icon files referenced in Makefile.am (T2.7) 2026-11-17 14:34:20 +00:00
lotherk 4774c2c7d8 dtchat: verify adapter files whose hash arrives at the end (T4.5)
Telegram and WhatsApp learn a document's SHA-256 only when the transfer is
finished, so their file-offer carries none and the digest comes with
file-end.  The UI used to verify only the offer hash, which meant those two
paths wrote the bytes unchecked.  accounts_run now takes the offer's hash
when there is one and the file-end's otherwise, hashes the .part file after
the last chunk and renames only on a match; a mismatch still removes the
part file and reports it in the status line and the transcript.

The fake adapter gained the matching modes: latehash offers without a hash
and sends the right one in file-end, badendhash sends a wrong one there.
tests/file_ui.sh drives all four shapes through the real UI under its own
Xvfb with DTCHAT_TEST_FILE_ACCEPT: files and latehash write the verified
hello world, badhash and badendhash are rejected and leave neither the file
nor a .part.  Measured with the built binaries: four ok, exit 0.

Harness entry DtChat/file_ui added; the full run is 53 ok/0 bad
(make mcde-host exit=0, build/logs/mcde-host-2026-11-17-endhash.log).
2026-11-17 13:08:55 +00:00
lotherk 63fedd905a dtchat: test the packaged adapter layout (T10.8)
tests/packaged_layout.sh starts dtchat under a private Xvfb with one account
whose "adapter" field is empty.  The runtime has to resolve
<dir of dtchat>/dtchat-telegram and start it; DTCHAT_TELEGRAM_FAKE=1 makes
the adapter speak without an account, and DTCHAT_ACCOUNTS_DEBUG logs the
resolved path.  The test accepts both layouts: the libtool build (the
wrapper in programs/dtchat starts the real binary from .libs, where the
adapter sits) and the installed prefix (build/mcde-root/dt/bin), and it
matches the path the runtime actually logged instead of assuming one.

Measured: the libtool layout started
build/mcde-host/programs/dtchat/.libs/dtchat-telegram, the installed prefix
started build/mcde-root/dt/bin/dtchat-telegram, both from an empty adapter
field, and the adapter answered with its connecting state; all ok.  The
test uses its own display number so it can run beside other Xvfb sessions.
Harness entry DtChat/packaged_layout added (52 entries).
2026-11-17 13:04:08 +00:00
lotherk a1403f5177 dtchat: do not disconnect a NULL XMPP connection (T4.6)
The adapter's exit path called xmpp_disconnect(conn) unconditionally; when the process ended before connecting (hello only, stdin closed), libstrophe crashed on the NULL connection. The call is now inside the existing conn != NULL branch, so the installed dtchat-xmpp answers hello and exits cleanly.
2026-11-17 12:48:01 +00:00
lotherk 5a07cc7938 mcde: install the protocol adapters next to dtchat
dtchat-telegram joins bin_PROGRAMS (always built: TDLib when available, otherwise a stub that reports the missing library); dtchat-xmpp is installed when MCDE_STROPHE built it; the Go-built dtchat-whatsapp is installed by install-exec-hook when MCDE_GO is set. The PLIST lists dtchat-telegram unconditionally and the other two behind PLIST_VARS xmpp/whatsapp (left unset in the recipe, so a target without libstrophe/Go omits them while the host build installs all three). The accounts editor's default adapter path becomes <bindir>/dtchat-<protocol> in the packaged layout. Host build and mcde-linux install/plist follow.
2026-11-17 12:36:46 +00:00
lotherk 056bd30a8f dtchat: exercise WhatsApp incoming files with a real fake file (T9.1)
DTCHAT_WHATSAPP_FAKE_FILE makes the fake adapter offer that file (name, size, SHA-256), and on file-accept read it in 4 KiB blocks, emit file-data and a file-end carrying the hash; the real accept path (DownloadAny) now also sends the SHA-256 in file-end, and the static fake keeps its hello-world hash. tests/whatsapp_fake.py uses a 9000-byte deterministic file, checks the offer name/size/hash, reassembles every chunk byte-for-byte and verifies the file-end hash (31 checks, green stand-alone). Harness entry already exists; in-tree build and harness follow.
2026-11-17 12:29:27 +00:00
lotherk f0144bc092 dtchat: make the account editor persistent (T2.4)
The dialog now edits real accounts instead of in-memory demo entries: the schema is Label, Protocol (irc/xmpp/telegram/whatsapp/demo), Adapter path, Settings (JSON) and Secrets (JSON). It loads accounts.json/secrets.json through the runtime (label, protocol, adapter, settings, masked secrets), and Save builds the complete accounts/secrets documents for every account, extracts label/protocol/adapter and parses the two JSON fields, then calls the runtime's writer. The runtime saves via dc_store_save_accounts/_secrets (files 0600), swaps its stored JSON, removes deleted accounts from the model, and restarts all adapters from the new set; the UI data pointers are refreshed. Add/Delete/Save semantics are now file-backed. Verified through the real UI under Xvfb: Add filled (Label 'Fake via UI', adapter /tmp/opencode/fake_adapter, settings {"mode":"echo"}), Save wrote both files (0600) and started the fake adapter online; restarting dtchat shows the account and all fields again (screenshots dtchat-accounts-editor.png, dtchat-accounts-loaded.png). In-tree build and harness follow.
2026-11-17 12:23:15 +00:00
lotherk 790669d989 dtchat: download accepted Telegram documents (T8.1)
An incoming messageDocument is remembered with its TDLib file id; file-accept sends downloadFile (priority 1, whole file) and updateFile is followed until local.is_downloading_completed, then the local file is read in 4 KiB blocks and sent as file-data with a file-end carrying the SHA-256 computed with dc_file_sha256. Unknown offers answer file-error. The fake mode can offer a real local file through DTCHAT_TELEGRAM_FAKE_FILE and exercises the same read/hash/chunk/event path; tests/telegram_fake.py now uses a 9000-byte file, checks the offer size and SHA-256, reassembles the chunks byte-for-byte and verifies the file-end hash (25 checks, green stand-alone). The adapter links CRYPTOLIB for EVP/dc_file_sha256. The TDLib downloadFile/updateFile branch is compiled but not exercised without an account. Full build and harness follow.
2026-11-17 12:12:44 +00:00
lotherk 9e8c7cd00c dtchat: add the Join Channel dialog and the IRC join/part commands (T3.3/T4.4)
Conversation > Join Channel opens a Motif prompt (channel on IRC or room on XMPP); the OK callback calls the new join hook with the current account. accounts_run sets the hook, sends dc_adapter_join, adds the conversation (channel for IRC, group otherwise) and shows it; the adapter's conversation event updates it later. The IRC adapter now handles the join and part commands (JOIN <conv>, PART <conv> :reason) instead of ignoring them; XMPP already implemented join. Tests: tests/irc_join.py checks JOIN #new on the wire, the self-JOIN conversation event, PART #new and a clean bye (10 checks, standalone built adapter green); the UI path was verified with the fake adapter under Xvfb (DTCHAT_TEST_JOIN=#new -> 'accounts fake: join #new' and conversation #new) and the dialog screenshot build/mcde-shots/dtchat-join-dialog.png. Harness entry added (51). In-tree build follows.
2026-11-17 12:06:04 +00:00
lotherk 4057ace288 dtchat: typing, contacts and files in the Telegram/WhatsApp adapters
Telegram: updateUser becomes roster events (name and online from userStatus), the typing command sends sendChatAction (typing/cancel), file-send sends a document via inputFileLocal, an incoming messageDocument becomes a file-offer, and the fake mode emits two contacts, an offer, data/end on accept and file-sent. WhatsApp: Connected emits the address-book contacts as roster, the typing command uses SendChatPresence and incoming ChatPresence becomes typing events, file-send uploads and sends a DocumentMessage, an incoming DocumentMessage becomes a file-offer (download on accept), and the fake mode emits contacts, an offer with SHA-256, data/end on accept, a typing echo and file-sent. tests/telegram_fake.py (24 checks) and tests/whatsapp_fake.py (28 checks) cover all of it and pass with the stand-alone binaries. In-tree build and harness follow; real incoming downloads and accounts remain.
2026-11-17 11:58:27 +00:00
lotherk 3107ff3490 dtchat: draw WhatsApp pairing QRs as a bitmap (T9.1)
The Go adapter encodes every whatsmeow QR code with github.com/skip2/go-qrcode and sends both the text (qrText) and the module bitmap the UI's request dialog already understands: qr {width,height,data}, one byte per module, 1 = dark, quiet zone included, base64. The fake pairing goes through the same request function, so tests/whatsapp_fake.py now checks a square bitmap, one byte per module, both module values and the empty quiet-zone corner; all 17 checks pass with the stand-alone binary. go.mod/go.sum carry the new module. In-tree build and harness follow.
2026-11-17 11:50:28 +00:00