mirror of
https://github.com/D-Modem/gui.git
synced 2026-11-28 22:30:49 -08:00
Port the file transfer protocols of the D-Modem app to libdmodemctl: ZMODEM (with automatic receive for sz, rz and kermit -s), YMODEM, XMODEM, XMODEM-1K, Kermit, Intel HEX, Motorola S-records and plain text. Each transfer runs on its thread, with two queues to the app. The Windows app gets a Transfer menu, Send File and Receive File dialogs, a progress dialog, and Send and Receive buttons on the Terminal page. A transfer uses the modem line or the Remote login. Also: - link_pump takes only as much session output as the port can hold. Before, a large output was cut. - The winport shims for serial, pipes, the environment and Beep are guarded, because the latest clang-retro MFC layer has them. - core/test/xfer_test tests each protocol on a clean and a noisy line, and against lrzsz and C-Kermit when they are installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
50 lines
1.2 KiB
CMake
50 lines
1.2 KiB
CMake
# libdmodemctl: what the desktop apps share, in plain C with no
|
|
# dependencies. Static for the Linux app; a DLL for the Windows app's
|
|
# P/Invoke (-DDMODEMCTL_SHARED=ON).
|
|
option(DMODEMCTL_SHARED "Build libdmodemctl as a shared library" OFF)
|
|
|
|
set(DMODEMCTL_SOURCES
|
|
src/session.c
|
|
src/model.c
|
|
src/diag.c
|
|
src/path.c
|
|
src/vt.c
|
|
src/vt_charsets.c
|
|
src/vt_data.c
|
|
src/vt_dec.c
|
|
src/vt_fonts.c
|
|
src/vt_gfx.c
|
|
src/vt_keys.c
|
|
src/vt_machine.c
|
|
src/vt_profiles.c
|
|
src/vt_regis.c
|
|
src/vt_rip.c
|
|
src/vt_vt52.c
|
|
src/daemon.c
|
|
src/voice.c
|
|
src/net.c
|
|
src/util.c
|
|
src/xfer.c
|
|
src/xfer_hex.c
|
|
src/xfer_kermit.c
|
|
src/xfer_xy.c
|
|
src/xfer_z.c)
|
|
|
|
if(DMODEMCTL_SHARED)
|
|
add_library(dmodemctl SHARED ${DMODEMCTL_SOURCES})
|
|
target_compile_definitions(dmodemctl PRIVATE DMC_BUILD_DLL)
|
|
set_target_properties(dmodemctl PROPERTIES C_VISIBILITY_PRESET hidden)
|
|
else()
|
|
add_library(dmodemctl STATIC ${DMODEMCTL_SOURCES})
|
|
endif()
|
|
target_include_directories(dmodemctl PUBLIC include)
|
|
if(MSVC)
|
|
target_compile_options(dmodemctl PRIVATE /W4 /wd4996)
|
|
else()
|
|
target_compile_options(dmodemctl PRIVATE -Wall -Wextra -Wshadow)
|
|
endif()
|
|
if(UNIX)
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(dmodemctl PRIVATE m Threads::Threads)
|
|
endif()
|