mirror of
https://github.com/D-Modem/gui.git
synced 2026-11-28 14:19:58 -08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20f47c88f4 | ||
|
|
9dc5682e6d |
No files matched your search
@@ -335,3 +335,95 @@ jobs:
|
||||
with:
|
||||
name: dmodem-win32-macosx-legacy
|
||||
path: dmodem-win32-macosx10.4.tar.gz
|
||||
|
||||
# The Windows app (windows/) on the classic Mac OS (Mac OS 9) on
|
||||
# PowerPC, with the modem built in, over the Toolbox backend of
|
||||
# clang-retro MFC (cmake/macos9.cmake). All of it builds on Linux:
|
||||
# clang of clang-retro/llvm (llvm-prebuilt), and the C and C++
|
||||
# libraries of clang-retro/mac-sdk (picolibc, GCC 15.2's libstdc++
|
||||
# and LLVM's libunwind, kept in the cache).
|
||||
winport-macos9:
|
||||
name: Windows app on Mac OS 9 (PowerPC), the modem built in
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GCC_VERSION: 15.2.0
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: clang-retro/mfc
|
||||
path: mfc
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: clang-retro/mac-sdk
|
||||
path: mac-sdk
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: clang-retro/picolibc
|
||||
path: picolibc
|
||||
- name: Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
cmake ninja-build meson make zstd xz-utils
|
||||
- name: clang (clang-retro/llvm, llvm-prebuilt)
|
||||
run: |
|
||||
asset=$(gh api repos/clang-retro/llvm/releases/tags/llvm-prebuilt --jq \
|
||||
'[.assets[] | select(.name | startswith("llvm-linux-"))] | sort_by(.created_at) | last | .name')
|
||||
echo "Using $asset"
|
||||
echo "LLVM_ASSET=$asset" >> "$GITHUB_ENV"
|
||||
gh release download llvm-prebuilt -R clang-retro/llvm -p "$asset" -O llvm.tar.zst
|
||||
mkdir -p "$RUNNER_TEMP/llvm"
|
||||
tar --zstd -xf llvm.tar.zst -C "$RUNNER_TEMP/llvm"
|
||||
rm llvm.tar.zst
|
||||
"$RUNNER_TEMP/llvm/bin/clang" --version | head -1
|
||||
echo "MACOS9_LLVM=$RUNNER_TEMP/llvm" >> "$GITHUB_ENV"
|
||||
echo "MACOS9_SDK=$PWD/mac-sdk" >> "$GITHUB_ENV"
|
||||
echo "SDK_REV=$(git -C mac-sdk rev-parse HEAD)-$(git -C picolibc rev-parse HEAD)" >> "$GITHUB_ENV"
|
||||
- uses: actions/cache@v4
|
||||
id: maclibs
|
||||
with:
|
||||
path: mac-sdk/lib
|
||||
key: mac-sdk-lib-${{ env.SDK_REV }}-${{ env.LLVM_ASSET }}-gcc${{ env.GCC_VERSION }}
|
||||
- name: mac-sdk's libraries (runtime, C library, C++ library)
|
||||
if: steps.maclibs.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
# (LLVM: only compiler-rt's builtins and libunwind)
|
||||
git clone -q --depth 1 --filter=blob:none --sparse \
|
||||
https://github.com/clang-retro/llvm "$RUNNER_TEMP/llvm-src"
|
||||
git -C "$RUNNER_TEMP/llvm-src" sparse-checkout set compiler-rt/lib/builtins libunwind
|
||||
# (GCC: the release, for libstdc++)
|
||||
curl -sSfL "https://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.xz" \
|
||||
| tar -xJ -C "$RUNNER_TEMP"
|
||||
export CLANG="$MACOS9_LLVM/bin/clang" LLVM_SRC="$RUNNER_TEMP/llvm-src"
|
||||
cd mac-sdk
|
||||
sh runtime/build.sh > rt.log 2>&1 || { tail -50 rt.log; exit 1; }
|
||||
PICOLIBC_SRC="$GITHUB_WORKSPACE/picolibc" sh runtime/build-libc.sh > libc.log 2>&1 \
|
||||
|| { tail -50 libc.log; exit 1; }
|
||||
CPUS=ppc GCC_SRC="$RUNNER_TEMP/gcc-$GCC_VERSION" sh runtime/build-libstdcxx.sh > cxx.log 2>&1 \
|
||||
|| { tail -50 cxx.log; exit 1; }
|
||||
ls lib/ppc
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S . -B build/os9 -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$PWD/cmake/macos9.cmake" \
|
||||
-DCLANG_RETRO_MFC="$PWD/mfc" \
|
||||
-DDMODEM_GUI_WINPORT=ON -DDMODEM_GUI_EMBED=ON -DDMODEM_GUI_SSH=OFF
|
||||
cmake --build build/os9 --target dmodem-win32
|
||||
- name: Check the program
|
||||
run: |
|
||||
f=build/os9/winport/dmodem-win32.bin
|
||||
# (MacBinary: the type APPL in the header, and the modem inside)
|
||||
head -c 128 "$f" | grep -q APPL
|
||||
grep -q "User-Agent" "$f"
|
||||
mkdir -p out
|
||||
cp "$f" out/dmodem-win32-macos9.bin
|
||||
ls -l out
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dmodem-win32-macos9
|
||||
path: out/dmodem-win32-macos9.bin
|
||||
@@ -76,6 +76,7 @@ jobs:
|
||||
take dmodem-win32-macos dmodem-win32-macos-arm64.tar.gz
|
||||
take dmodem-win32-macos-x86_64 dmodem-win32-macos-x86_64.tar.gz
|
||||
take dmodem-win32-macosx-legacy dmodem-win32-macosx10.4.tar.gz
|
||||
take dmodem-win32-macos9 dmodem-win32-macos9.bin
|
||||
(cd out && sha256sum * > SHA256SUMS)
|
||||
ls -l out
|
||||
{
|
||||
@@ -91,6 +92,7 @@ jobs:
|
||||
echo "| \`dmodem-win32-macos-arm64.tar.gz\` | The app on macOS with the modem built in, arm64 (Apple silicon) |"
|
||||
echo "| \`dmodem-win32-macos-x86_64.tar.gz\` | The app on macOS with the modem built in, x86_64 (Intel Mac) |"
|
||||
echo "| \`dmodem-win32-macosx10.4.tar.gz\` | The app on Mac OS X 10.4 (Tiger) and later with the modem built in, one program for PowerPC and Intel (i386). Not tested on a Mac yet |"
|
||||
echo "| \`dmodem-win32-macos9.bin\` | The app on Mac OS 9 (PowerPC) with the modem built in, in MacBinary. Not tested on a Mac yet |"
|
||||
echo "| \`SHA256SUMS\` | The SHA-256 of each file |"
|
||||
if [ -f missing ]; then
|
||||
echo
|
||||
|
||||
@@ -26,7 +26,7 @@ thin Win32 shell over one small C library, libdmodemctl.
|
||||
| --- | --- | --- | --- |
|
||||
| Toolkit | Win32, C++ | Win32, over the Cocoa layer of [clang-retro MFC](https://github.com/clang-retro/mfc) | Win32, over the X11 and Wayland layer of clang-retro MFC |
|
||||
| Built with | [clang-retro](https://clang-retro.github.io/), MinGW or MSVC | clang | clang |
|
||||
| Runs on | Windows 95 and later | arm64 (Apple silicon) and x86_64 (Intel Mac). Also Mac OS X 10.4 and later on PowerPC and i386 | x86_64 |
|
||||
| Runs on | Windows 95 and later | arm64 (Apple silicon) and x86_64 (Intel Mac). Also Mac OS X 10.4 and later on PowerPC and i386, and Mac OS 9 on PowerPC | x86_64 |
|
||||
|
||||
The source code of the app is the same on each system. Refer to "The
|
||||
Windows app on Linux and macOS" in [Design](docs/design.md).
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# The platform file of the classic Mac OS (cmake/macos9.cmake): a POSIX
|
||||
# system for CMake, over the C library of clang-retro/mac-sdk. A program
|
||||
# is a MacBinary II file (.bin) that mac-sdk's tools/macapp.py links.
|
||||
set(UNIX 1)
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".bin")
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
@@ -0,0 +1,73 @@
|
||||
# CMake toolchain file for the classic Mac OS on PowerPC (Mac OS 8.6 to
|
||||
# 9.2). It builds the Windows app (winport/) over the Toolbox backend of
|
||||
# clang-retro MFC, on Linux.
|
||||
#
|
||||
# cmake -S . -B build/macos9 -DCMAKE_TOOLCHAIN_FILE=cmake/macos9.cmake \
|
||||
# -DMACOS9_LLVM=/opt/llvm -DMACOS9_SDK=/path/to/mac-sdk \
|
||||
# -DCLANG_RETRO_MFC=/path/to/mfc -DDMODEM_GUI_WINPORT=ON
|
||||
#
|
||||
# You need these:
|
||||
# MACOS9_LLVM clang of clang-retro/llvm (the llvm-prebuilt release)
|
||||
# MACOS9_SDK a clang-retro/mac-sdk checkout, with its runtime, C and
|
||||
# C++ libraries in lib/ (runtime/build.sh,
|
||||
# runtime/build-libc.sh, runtime/build-libstdcxx.sh)
|
||||
# CLANG_RETRO_MFC a clang-retro/mfc checkout (port/compat/macos)
|
||||
# The environment variables of the same names also set them.
|
||||
#
|
||||
# CMake builds the static libraries. tools/macapp.py of mac-sdk links each
|
||||
# program into a PowerPC application (a MacBinary II file, .bin).
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
set(CMAKE_SYSTEM_NAME MacOS9)
|
||||
set(CMAKE_SYSTEM_VERSION 9.2)
|
||||
set(CMAKE_SYSTEM_PROCESSOR powerpc)
|
||||
|
||||
foreach(_v MACOS9_LLVM MACOS9_SDK CLANG_RETRO_MFC)
|
||||
if(NOT ${_v} AND DEFINED ENV{${_v}})
|
||||
set(${_v} "$ENV{${_v}}")
|
||||
endif()
|
||||
if(NOT ${_v})
|
||||
message(FATAL_ERROR "Set ${_v} (cmake/macos9.cmake)")
|
||||
endif()
|
||||
set(${_v} "${${_v}}" CACHE PATH "" FORCE)
|
||||
# (the builds that D-Modem configures with this file see them too)
|
||||
set(ENV{${_v}} "${${_v}}")
|
||||
endforeach()
|
||||
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES MACOS9_LLVM MACOS9_SDK CLANG_RETRO_MFC)
|
||||
|
||||
set(MACOS9_TARGET powerpc-apple-macos9)
|
||||
set(_lib "${MACOS9_SDK}/lib")
|
||||
# The headers: GCC's C++ library of mac-sdk, port/compat/macos of
|
||||
# clang-retro MFC (the POSIX declarations that picolibc does not have),
|
||||
# the C library, then the Toolbox. These are mandatory arguments of the
|
||||
# compilers, with the target: a -DCMAKE_C_FLAGS of a project or an
|
||||
# ExternalProject keeps them.
|
||||
set(_common -isystem ${CLANG_RETRO_MFC}/port/compat/macos -isystem ${_lib}/include
|
||||
-I${MACOS9_SDK}/include -DMAC_LIBC -D_GNU_SOURCE
|
||||
-femulated-tls -ffunction-sections -fdata-sections)
|
||||
set(CMAKE_C_COMPILER "${MACOS9_LLVM}/bin/clang" "--target=${MACOS9_TARGET}" ${_common})
|
||||
set(CMAKE_CXX_COMPILER "${MACOS9_LLVM}/bin/clang++" "--target=${MACOS9_TARGET}"
|
||||
-nostdinc++ -isystem ${_lib}/include/c++/15.2.0/${MACOS9_TARGET}
|
||||
-isystem ${_lib}/include/c++/15.2.0 ${_common} -fexceptions -frtti)
|
||||
set(CMAKE_AR "${MACOS9_LLVM}/bin/llvm-ar")
|
||||
set(CMAKE_RANLIB "${MACOS9_LLVM}/bin/llvm-ranlib")
|
||||
|
||||
# The tests of CMake and of the projects compile and do not link: the
|
||||
# linker is macapp.py, which makes a Mac application
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
# A program: macapp.py links its objects and libraries with the C and
|
||||
# C++ libraries of mac-sdk (MACOS9_APP_SIZE: the partition in KB)
|
||||
set(MACOS9_APP_SIZE 16384 CACHE STRING "The partition of a program, in KB")
|
||||
find_program(MACOS9_PYTHON NAMES python3 python REQUIRED)
|
||||
# (macapp.py adds the C++ library only for C++ sources, not for objects:
|
||||
# a C++ program names libstdc++.a and libunwind.a, which throws the
|
||||
# exceptions, itself)
|
||||
set(_macapp "${CMAKE_COMMAND} -E env CLANG=${MACOS9_LLVM}/bin/clang ${MACOS9_PYTHON} ${MACOS9_SDK}/tools/macapp.py --cpu ppc --size ${MACOS9_APP_SIZE} --name <TARGET_NAME> -o <TARGET> -- <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "${_macapp}")
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${_macapp} ${_lib}/ppc/libstdc++.a ${_lib}/ppc/libunwind.a")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "${_lib}")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
@@ -86,6 +86,44 @@ Then join the two programs into one fat program:
|
||||
(`time.h`, `signal.h` and `net/if.h`). The built-in modem needs D-Modem
|
||||
with the changes for 10.4 to 10.6 (`docs/macos-details.md` in D-Modem).
|
||||
|
||||
## Mac OS 9 (PowerPC)
|
||||
|
||||
The app for the classic Mac OS on PowerPC builds on Linux. It uses the
|
||||
Toolbox backend of clang-retro MFC and the toolchain file
|
||||
`cmake/macos9.cmake`. You need these items:
|
||||
|
||||
- clang of [clang-retro/llvm](https://github.com/clang-retro/llvm) (its
|
||||
`llvm-prebuilt` release).
|
||||
- A [clang-retro/mac-sdk](https://github.com/clang-retro/mac-sdk)
|
||||
checkout with its PowerPC libraries in `lib/`. Build them with
|
||||
`runtime/build.sh`, `runtime/build-libc.sh` (it needs a
|
||||
[clang-retro/picolibc](https://github.com/clang-retro/picolibc)
|
||||
checkout) and `runtime/build-libstdcxx.sh` (it needs the GCC 15.2.0
|
||||
release and the libunwind of clang-retro/llvm). mac-sdk's
|
||||
`docs/cxx.md` tells more.
|
||||
|
||||
Build the app:
|
||||
|
||||
export MACOS9_LLVM=/path/to/llvm MACOS9_SDK=/path/to/mac-sdk
|
||||
cmake -S . -B build/os9 -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PWD/cmake/macos9.cmake \
|
||||
-DCLANG_RETRO_MFC=/path/to/mfc -DDMODEM_GUI_WINPORT=ON \
|
||||
-DDMODEM_GUI_EMBED=ON -DDMODEM_GUI_SSH=OFF
|
||||
cmake --build build/os9 --target dmodem-win32
|
||||
|
||||
The result is `build/os9/winport/dmodem-win32.bin`, an application in
|
||||
MacBinary format. `mac-sdk/tools/macapp.py` links it. The memory
|
||||
partition of the app is 16 MB (`MACOS9_APP_SIZE`, in KB).
|
||||
|
||||
These items are different on Mac OS 9:
|
||||
|
||||
- There is no SSH (`DMODEM_GUI_SSH=OFF`).
|
||||
- There is no debug information. Clang cannot write DWARF into XCOFF
|
||||
objects.
|
||||
- `cmake/Platform/MacOS9.cmake` gives the CMake system `MacOS9`. The
|
||||
built-in modem needs D-Modem with the changes for this system
|
||||
(`docs/macos-details.md` in D-Modem).
|
||||
|
||||
## The library only
|
||||
|
||||
With no `DMODEM_GUI_WINPORT`, a build on Linux or macOS makes only
|
||||
|
||||
+1
-1
@@ -587,7 +587,7 @@ code is the same as on Windows.
|
||||
alphabetical order, with no Bluetooth devices). To use another device,
|
||||
set the environment variable `WINPORT_COMn`. For example, with
|
||||
`WINPORT_COM5=/dev/ttyUSB0`, `COM5` is `/dev/ttyUSB0`.
|
||||
- CI builds the app on Linux, on macOS for arm64 and x86_64, and on Linux for Mac OS X 10.4 (PowerPC and i386, `cmake/macosx-legacy.cmake`). On Linux, `winport/test/smoke.sh`
|
||||
- CI builds the app on Linux, on macOS for arm64 and x86_64, and on Linux for Mac OS X 10.4 (PowerPC and i386, `cmake/macosx-legacy.cmake`) and for Mac OS 9 (PowerPC, `cmake/macos9.cmake`). On Linux, `winport/test/smoke.sh`
|
||||
starts the app in Xvfb three times: with a TCP line, with a dmodemd
|
||||
that the app starts (`winport/test/dmodemd`, a test dmodemd), and with
|
||||
the built-in modem on a SIP line with no account. For the first two,
|
||||
|
||||
@@ -20,6 +20,7 @@ When `main` has no new commits, the release does not change.
|
||||
| macOS, arm64 (Apple silicon) | [`dmodem-win32-macos-arm64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-macos-arm64.tar.gz) | The app on macOS, with the built-in modem. |
|
||||
| macOS, x86_64 (Intel Mac) | [`dmodem-win32-macos-x86_64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-macos-x86_64.tar.gz) | The app on macOS, with the built-in modem. |
|
||||
| Mac OS X 10.4 and later, PowerPC and Intel | [`dmodem-win32-macosx10.4.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-macosx10.4.tar.gz) | The app with the built-in modem. One program for PowerPC (G3, G4, G5) and Intel (i386). It is not tested on a Mac yet. |
|
||||
| Mac OS 9, PowerPC | [`dmodem-win32-macos9.bin`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-macos9.bin) | The app with the built-in modem, in MacBinary format. It is not tested on a Mac yet. |
|
||||
| All | [`SHA256SUMS`](https://github.com/D-Modem/gui/releases/download/nightly/SHA256SUMS) | The SHA-256 of each file. |
|
||||
|
||||
If a file is not in the release, the newest build did not make it. The
|
||||
@@ -59,6 +60,13 @@ The result for the file must be `OK`.
|
||||
`tar -xzf dmodem-win32-macosx10.4.tar.gz`.
|
||||
3. Start the app. Type `./dmodem-win32`.
|
||||
|
||||
## Install on Mac OS 9
|
||||
|
||||
1. Download `dmodem-win32-macos9.bin`. The file is for PowerPC Macs.
|
||||
2. Decode the file with StuffIt Expander. The file is in MacBinary
|
||||
format.
|
||||
3. Double-click the app. The app needs 16 MB of memory.
|
||||
|
||||
## Install on Linux
|
||||
|
||||
1. Install the libraries. On Ubuntu 24.04, type
|
||||
|
||||
@@ -80,6 +80,7 @@ Windows and macOS, the build links libusb (LGPL-2.1) statically, as
|
||||
| Linux | Done. CI builds it, checks that the library is in the app, and starts the built-in modem in Xvfb (`winport/test/smoke.sh`). |
|
||||
| macOS | Done (arm64 and x86_64). CI builds it for each architecture, and checks that the library is in the app. It is not tested on a Mac yet. |
|
||||
| Mac OS X 10.4 and later | Done (PowerPC and i386, one fat program). CI builds it on Linux, and checks that the library is in each part of the program. It is not tested on a Mac yet. |
|
||||
| Mac OS 9 (PowerPC) | Done. CI builds it on Linux with the C and C++ libraries of clang-retro/mac-sdk. There are no ptys: the modem gives its DTE on a socket. It is not tested on a Mac yet. |
|
||||
|
||||
### Windows 95
|
||||
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ same way on each system.
|
||||
| | Windows | macOS | Linux |
|
||||
| --- | --- | --- | --- |
|
||||
| Toolkit | Win32, C++ | Win32, over the Cocoa layer of clang-retro MFC | Win32, over the X11 and Wayland layer of clang-retro MFC |
|
||||
| Runs on | Windows 95 and later | arm64 (Apple silicon) and x86_64 (Intel Mac). Also Mac OS X 10.4 and later on PowerPC and i386 | x86_64 |
|
||||
| Runs on | Windows 95 and later | arm64 (Apple silicon) and x86_64 (Intel Mac). Also Mac OS X 10.4 and later on PowerPC and i386, and Mac OS 9 on PowerPC | x86_64 |
|
||||
| Built-in modem | Yes | Yes | Yes |
|
||||
|
||||
Refer to [Design](design.md).
|
||||
|
||||
Vendored
+1
-1
Submodule external/D-Modem updated: c3ef8833f7...351268cd9c.
@@ -71,6 +71,17 @@ static HANDLE proc;
|
||||
#endif
|
||||
#define ATTR_PSEUDOCONSOLE 0x00020016
|
||||
|
||||
/* (the Win32 layer of clang-retro MFC has no console API and no COORD:
|
||||
the Windows app on another system with no SSH, as on the classic Mac
|
||||
OS. There, the look-up of ConPTY fails and SSH is not available.) */
|
||||
#if defined(DMODEM_WINPORT) && !defined(_COORD_DEFINED)
|
||||
#define _COORD_DEFINED
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD;
|
||||
#endif
|
||||
|
||||
typedef long (WINAPI *CreatePCFn)(COORD, HANDLE, HANDLE, DWORD, void **);
|
||||
typedef long (WINAPI *ResizePCFn)(void *, COORD);
|
||||
typedef void (WINAPI *ClosePCFn)(void *);
|
||||
|
||||
+14
-4
@@ -40,7 +40,10 @@ else()
|
||||
set(_arch_linux x86_64)
|
||||
set(_arch_apple x86_64)
|
||||
endif()
|
||||
if(MACOSX_LEGACY_TARGET)
|
||||
if(MACOS9_TARGET)
|
||||
# The classic Mac OS on PowerPC (cmake/macos9.cmake)
|
||||
set(WINPORT_TARGET "${MACOS9_TARGET}")
|
||||
elseif(MACOSX_LEGACY_TARGET)
|
||||
# Mac OS X 10.4 and later (cmake/macosx-legacy.cmake)
|
||||
set(WINPORT_TARGET "${MACOSX_LEGACY_TARGET}")
|
||||
elseif(APPLE)
|
||||
@@ -59,7 +62,10 @@ ProcessorCount(_ncpu)
|
||||
if(_ncpu EQUAL 0)
|
||||
set(_ncpu 1)
|
||||
endif()
|
||||
if(MACOSX_LEGACY_TARGET)
|
||||
if(MACOS9_TARGET)
|
||||
# (the Makefile sets the flags of mac-sdk's C and C++ libraries itself)
|
||||
set(_winport_make_args BIN=${MACOS9_LLVM}/bin MACSDK=${MACOS9_SDK})
|
||||
elseif(MACOSX_LEGACY_TARGET)
|
||||
# (the Makefile sets the flags of the 10.4 SDK and libc++ itself.
|
||||
# winhelp_file.cpp uses std::abs with no <cstdlib>: the libc++ of the
|
||||
# sysroot does not give it through <algorithm>.)
|
||||
@@ -114,7 +120,11 @@ if(DMODEM_GUI_EMBED AND TARGET dmodem_embed)
|
||||
target_link_libraries(dmodem-win32 PRIVATE dmodem_embed)
|
||||
target_compile_definitions(dmodem-win32 PRIVATE DMODEM_GUI_EMBED)
|
||||
endif()
|
||||
if(MACOSX_LEGACY_TARGET)
|
||||
if(MACOS9_TARGET)
|
||||
# (cmake/macos9.cmake links with macapp.py: the C and C++ libraries of
|
||||
# mac-sdk, and the Toolbox. The cooperative threads are in its C
|
||||
# library.)
|
||||
elseif(MACOSX_LEGACY_TARGET)
|
||||
# (cmake/macosx-legacy.cmake adds port/compat/macosx, the C library
|
||||
# functions that 10.4 does not have)
|
||||
target_link_libraries(dmodem-win32 PRIVATE "-framework Cocoa" "-framework OpenGL" pthread)
|
||||
@@ -127,7 +137,7 @@ endif()
|
||||
# The install on Linux (cmake --install): the app, its desktop entry,
|
||||
# its AppStream data and its icon. Also the firmware of the MultiTech
|
||||
# MT9234MU (the licence is unknown: firmware/README.md).
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT MACOS9_TARGET)
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS dmodem-win32 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(FILES data/io.github.d_modem.DModem.desktop
|
||||
|
||||
Reference in new issue
Block a user