Files
mcde/programs/dtchat/Makefile.am
T
lotherk 2f3511ebf2 dtchat: run the configured accounts as adapters in the UI
accounts_run.c loads accounts.json (id, protocol, label, adapter, settings, enabled) and secrets.json (per account id) and starts one DcAdapter per enabled account, pumping the DcLoop from an Xt timeout. Its events go into the model and the panel: state into the status line, conversation (direct/channel/group) and roster entries into the model (roster sets presence), messages into the transcript via dtchat_ui_message_added, presence/typing/errors into the status/dialog, request events into the existing request dialog with the answer routed to that adapter. The UI send hook resolves the selected account (dtchat_ui_current_account) or the account that owns the conversation and calls dc_adapter_send_text; dtchat_accounts_join/_typing expose join and XEP-0085 for menus and tests. Normal GUI runs (not --demo/--local/--perf/--smoke) start with an empty model and the configured accounts; the demo peers are gone in that mode. dtchat-irc is installed next to dtchat and listed in the PLIST; dtchat-xmpp and the demo adapter remain build artifacts. Verified with the fake adapter under Xvfb (accounts fake: starting/online/sent alice/message alice), including the real UI send path (DTCHAT_TEST_UI_SEND), screenshot build/mcde-shots/dtchat-accounts.png; --smoke-test still passes.
2026-11-17 10:22:27 +00:00

57 lines
2.0 KiB
Makefile

MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = dtchat dtchat-headless dtchat-irc
noinst_PROGRAMS = dtchat-demo
man_MANS = dtchat.1
dtchat_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
# The model and the JSON schema helpers live in libDtChat/libDtChatIpc;
# DtInitialize/DTCLIENTLIBS come with T2.7.
dtchat_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la \
$(top_builddir)/lib/McdeSys/libMcdeSys.la $(XTOOLLIB)
dtchat_SOURCES = main.c ui_main.c ui_accounts.c ui_request.c ui_peer.c \
ui_file.c localui.c ui_call.c demo.c accounts_run.c ui_main.h \
ui_accounts.h ui_request.h ui_peer.h ui_file.h localui.h ui_call.h \
demo.h accounts_run.h
dtchat_demo_SOURCES = demo_adapter.c
dtchat_demo_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
dtchat_demo_LDADD = $(top_builddir)/lib/libDtChat/libDtChatIpc.la
dtchat_irc_SOURCES = irc_adapter.c
dtchat_irc_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
$(TLS_CPPFLAGS)
dtchat_irc_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(LIBTLS)
dtchat_headless_SOURCES = headless.c
dtchat_headless_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
dtchat_headless_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(LIBTLS) $(CRYPTOLIB)
if MCDE_STROPHE
noinst_PROGRAMS += dtchat-xmpp
dtchat_xmpp_SOURCES = xmpp_adapter.c
dtchat_xmpp_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
dtchat_xmpp_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(STROPHELIB)
endif
appdefaultsdir = $(CDE_INSTALLATION_TOP)/app-defaults/C
dist_appdefaults_DATA = Dtchat
if SOLARIS
dtchat_LDADD += -lintl
endif