macOS: build the modem into the app

- CMake builds libdmodem_embed on macOS too. cmake/MacosEmbed.cmake links
  a small program with it and keeps the link command (a linker launcher).
  From it, CMake writes build/macos-embed.xcconfig: the header path, all
  the static libraries and the Swift condition DMODEM_GUI_EMBED.
- macos/project.yml includes that file.
- Modem.swift starts the built-in modem for the SIP and USB lines, in a
  thread of the app. Its DTE socket goes to the same session code as
  the pty. LineSettingsView has a Built-in modem switch (on by default).
- CI: the macOS job checks out the submodule, and checks that the app
  has the library.
- Docs: macOS in docs/embedded-modem.md, building.md, design.md and the
  README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTRNP9YEnRxydbrw9G
This commit is contained in:
Claude committed 2026-11-23 15:34:46 +00:00
1 parent 3371175fec
commit 8dd715bd2b
15 files changed
+375 -40

No files matched your search

+9
View File
@@ -218,11 +218,15 @@ jobs:
name: dmodem-win32-macos
path: dmodem-win32-macos-arm64.tar.gz
# The built-in modem (external/D-Modem) is built by CMake, which
# writes build/macos-embed.xcconfig for the Xcode project
macos:
name: macOS (SwiftUI)
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Library tests
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -239,6 +243,11 @@ jobs:
xcodebuild -project DModem.xcodeproj -scheme DModem \
-configuration Release -derivedDataPath ../build/xcode \
CODE_SIGN_IDENTITY=- build
- name: The built-in modem is in the app
run: |
app=build/xcode/Build/Products/Release/D-Modem.app/Contents/MacOS/D-Modem
lipo -archs "$app"
nm "$app" | grep -q dmodem_embed_start
# (ditto keeps the bundle's symbolic links and executable bits)
- name: Package
run: ditto -c -k --keepParent build/xcode/Build/Products/Release/D-Modem.app D-Modem-macos.zip