Files
gui/windows/CMakeLists.txt
T
Claude e5842d2223 Add file transfers to the Windows app
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
2026-11-20 22:01:10 +00:00

26 lines
1.1 KiB
CMake

# The Windows app with MinGW, MSVC or clang-retro (the Windows 95 build:
# cmake/clang-retro.cmake). ANSI, for the same code to build with all.
enable_language(CXX)
enable_language(RC)
include(sources.cmake)
add_executable(dmodem WIN32 ${DMODEM_WIN_SOURCES} res/app.rc)
target_include_directories(dmodem PRIVATE src)
target_link_libraries(dmodem PRIVATE dmodemctl comctl32 wsock32 comdlg32 gdi32 winmm msacm32 shell32)
# the Remote page's SSH: libdmodemssh (libssh, built in)
if(TARGET dmodemssh)
target_link_libraries(dmodem PRIVATE dmodemssh)
target_compile_definitions(dmodem PRIVATE DMODEM_HAVE_SSH)
endif()
if(MSVC)
target_compile_definitions(dmodem PRIVATE _CRT_SECURE_NO_WARNINGS)
# (a manifest of our own in app.rc)
target_link_options(dmodem PRIVATE /MANIFEST:NO)
else()
target_compile_options(dmodem PRIVATE -Wall -Wextra -Wno-unused-parameter)
target_link_options(dmodem PRIVATE -static)
endif()
# (picolibc starts main, unless the entry point is WinMain's)
if(CLANG_RETRO_CONFIG MATCHES "picolibc")
target_link_options(dmodem PRIVATE -Wl,-e,WinMainCRTStartup)
endif()