From: Stefan Reinauer Date: Fri, 12 Jun 2026 04:38:36 +0000 (-0700) Subject: cmake: name the Unix binary winuae X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=58412b0fabd6426aee36b1171342005091d3493f;p=francis%2Fwinuae.git cmake: name the Unix binary winuae The installed Linux command, the .desktop entries, and the WinUAE.app bundle all use the name winuae while the build tree produced winuae_unix. Set OUTPUT_NAME on the winuae_unix target so the binary is winuae everywhere, drop the now-redundant install RENAME, and update the smoke script defaults, bundling scripts, and README accordingly. macos-bundle.sh keeps a fallback for build directories from before the rename. The CMake target names are unchanged. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 779a0f01..3ed0420d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1406,6 +1406,10 @@ target_sources(winuae_core PRIVATE ${WINUAE_CORE_SOURCES}) if(WINUAE_UNIX_BUILD_EXECUTABLE) add_executable(winuae_unix $) + # Keep the developer-facing target name stable; the produced binary is + # named winuae to match the installed name, the .desktop files, the + # WinUAE.app bundle, and winuae.exe on Windows. + set_target_properties(winuae_unix PROPERTIES OUTPUT_NAME winuae) if(WINUAE_UNIX_EXTRA_LIBRARY_DIRS) target_link_directories(winuae_unix PRIVATE ${WINUAE_UNIX_EXTRA_LIBRARY_DIRS}) endif() @@ -1699,7 +1703,6 @@ endif() if(TARGET winuae_unix AND NOT APPLE) install(PROGRAMS "$" DESTINATION "${CMAKE_INSTALL_BINDIR}" - RENAME winuae ) install(FILES README_unix.md DESTINATION "${CMAKE_INSTALL_DOCDIR}" diff --git a/README_unix.md b/README_unix.md index dbb3ae32..28680bec 100644 --- a/README_unix.md +++ b/README_unix.md @@ -4,7 +4,7 @@ This is an early macOS/Linux port of the WinUAE source tree. The current Unix bu ## Current Status -- Builds with CMake as `winuae_unix`. +- Builds with CMake as the `winuae_unix` target, producing a `winuae` binary. - Uses `od-unix/` host abstractions. - SDL3 provides the current window, framebuffer presentation, mouse input, keyboard input, audio output, and playback-device selection. - SDL3 gamepads and non-gamepad joysticks are exposed through the WinUAE input-device layer for game-port use; the Qt Game Ports/Input pages have first remap/test dialogs backed by SDL3 device enumeration and WinUAE config keys. @@ -137,7 +137,7 @@ cmake --build /tmp/winuae_cmake_build --target winuae_unix -j The executable will be: ```sh -/tmp/winuae_cmake_build/winuae_unix +/tmp/winuae_cmake_build/winuae ``` On Linux, install the executable, shared resources, documentation, and desktop/MIME metadata into a prefix with: @@ -147,9 +147,10 @@ cmake --install /tmp/winuae_cmake_build --prefix /opt/winuae ``` This installs the desktop entry, `.uae` MIME type, and hicolor icons. The -installed Linux command is `winuae`; the build-tree executable remains -`winuae_unix` to keep the existing developer targets stable. On macOS, use the -`.app` and DMG targets below instead of installing the raw executable. +binary is named `winuae` everywhere — build tree, installed command, and app +bundle; only the CMake target keeps the `winuae_unix` name for developer +stability. On macOS, use the `.app` and DMG targets below instead of +installing the raw executable. On Linux, CPack can create packages from the same install rules: @@ -312,7 +313,7 @@ cmake --build /tmp/winuae_cmake_build --target winuae_unix -j The port accepts normal WinUAE command-line `-s` configuration overrides. A minimal A1200 example: ```sh -/tmp/winuae_cmake_build/winuae_unix \ +/tmp/winuae_cmake_build/winuae \ -s kickstart_rom_file=/path/to/A1200.rom \ -s floppy0=/path/to/disk.adf \ -s nr_floppies=1 \ @@ -326,7 +327,7 @@ The port accepts normal WinUAE command-line `-s` configuration overrides. A mini When the integrated Qt UI is built, `winuae_unix` opens the configuration UI by default. To boot directly from a config or command-line settings, disable the GUI: ```sh -/tmp/winuae_cmake_build/winuae_unix \ +/tmp/winuae_cmake_build/winuae \ -f /path/to/config.uae \ -s use_gui=no ``` @@ -342,7 +343,7 @@ For SANA-II `uaenet.device` startup testing, add `-s sana2=true` or use the smok SDL3 audio uses the WinUAE `sound_output`, `sound_frequency`, `sound_channels`, `sound_volume*`, and floppy drive sound config keys. Unix playback device selection follows the same target-prefixed style as Windows: ```sh -/tmp/winuae_cmake_build/winuae_unix \ +/tmp/winuae_cmake_build/winuae \ -s unix.soundcard=0 \ -s 'unix.soundcardname=SDL:Default Audio Device' ``` @@ -361,12 +362,12 @@ The Unix serial backend follows the same target-prefixed config style as Windows ```sh # Real serial device -/tmp/winuae_cmake_build/winuae_unix \ +/tmp/winuae_cmake_build/winuae \ -s unix.serial_port=/dev/cu.usbserial-0001 \ -s serial_hardware_ctsrts=true # Telnet-style TCP listener on all local interfaces, port 1234 -/tmp/winuae_cmake_build/winuae_unix \ +/tmp/winuae_cmake_build/winuae \ -s unix.serial_port=TCP://0.0.0.0:1234 ``` @@ -440,7 +441,7 @@ FireStorm, Mediator 4000, and G-REX PCI bridges. For manual A4091 autoconfig smoke tests, use an A4000/A4000T-style config, disable 24-bit CPU addressing, and provide a real A4091 ROM: ```sh -/tmp/winuae_cmake_build/winuae_unix \ +/tmp/winuae_cmake_build/winuae \ -s use_gui=no \ -s kickstart_rom_file=/path/to/A4000.rom \ -s a4091_rom_file=/path/to/a4091.rom \ @@ -524,7 +525,7 @@ Optional overrides: ```sh export WINUAE_BUILD_DIR=/tmp/winuae_cmake_build -export WINUAE_EXE=/tmp/winuae_cmake_build/winuae_unix +export WINUAE_EXE=/tmp/winuae_cmake_build/winuae export WINUAE_SMOKE_SECONDS=5 export WINUAE_SMOKE_LOG=/tmp/winuae_unix_smoke.log ``` diff --git a/tools/macos-bundle.sh b/tools/macos-bundle.sh index 83ea48d9..5d62c136 100755 --- a/tools/macos-bundle.sh +++ b/tools/macos-bundle.sh @@ -8,7 +8,7 @@ Usage: $0 [build-dir] [output-dir] Creates a local WinUAE.app bundle from an existing macOS build tree. Arguments: - build-dir CMake build directory containing winuae_unix. + build-dir CMake build directory containing the winuae binary. Defaults to WINUAE_BUILD_DIR or the current directory. output-dir Directory that will receive WinUAE.app. Defaults to /package. @@ -37,7 +37,11 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source_dir="$(cd "${script_dir}/.." && pwd)" build_dir="${1:-${WINUAE_BUILD_DIR:-$(pwd)}}" output_dir="${2:-${build_dir}/package}" -executable="${build_dir}/winuae_unix" +executable="${build_dir}/winuae" +if [[ ! -x "${executable}" && -x "${build_dir}/winuae_unix" ]]; then + # Build directories from before the binary rename. + executable="${build_dir}/winuae_unix" +fi app_dir="${output_dir}/WinUAE.app" contents_dir="${app_dir}/Contents" macos_dir="${contents_dir}/MacOS" @@ -50,7 +54,7 @@ fi if [[ ! -x "${executable}" ]]; then echo "error: executable not found: ${executable}" >&2 - echo "hint: build winuae_unix first, or pass the CMake build directory" >&2 + echo "hint: build the winuae_unix target first, or pass the CMake build directory" >&2 exit 1 fi diff --git a/tools/macos-dmg.sh b/tools/macos-dmg.sh index b811a4a1..d22c41ed 100755 --- a/tools/macos-dmg.sh +++ b/tools/macos-dmg.sh @@ -8,7 +8,7 @@ Usage: $0 [build-dir] [output-dir] Creates a drag-install WinUAE DMG from an existing macOS build tree. Arguments: - build-dir CMake build directory containing winuae_unix. + build-dir CMake build directory containing the winuae binary. Defaults to WINUAE_BUILD_DIR or the current directory. output-dir Directory that will receive WinUAE.app and the final DMG. Defaults to /package. diff --git a/tools/unix-smoke-a1200.sh b/tools/unix-smoke-a1200.sh index 5fb8c547..2f3eba86 100755 --- a/tools/unix-smoke-a1200.sh +++ b/tools/unix-smoke-a1200.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} LOG=${WINUAE_SMOKE_LOG:-/tmp/winuae_unix_smoke.log} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-5} A2065=${WINUAE_SMOKE_A2065:-0} diff --git a/tools/unix-smoke-a4091-hdf.sh b/tools/unix-smoke-a4091-hdf.sh index 944af6fc..a706c012 100755 --- a/tools/unix-smoke-a4091-hdf.sh +++ b/tools/unix-smoke-a4091-hdf.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} LOG=${WINUAE_SMOKE_LOG:-/tmp/winuae_unix_a4091_hdf_smoke.log} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-8} diff --git a/tools/unix-smoke-ide-expansion-hdf.sh b/tools/unix-smoke-ide-expansion-hdf.sh index 5131c7d7..f0b87b6b 100755 --- a/tools/unix-smoke-ide-expansion-hdf.sh +++ b/tools/unix-smoke-ide-expansion-hdf.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-8} BOARD=${WINUAE_IDE_EXPANSION_BOARD:-alfapower} diff --git a/tools/unix-smoke-p96-guest.sh b/tools/unix-smoke-p96-guest.sh index 7d7c3938..2b64ae66 100755 --- a/tools/unix-smoke-p96-guest.sh +++ b/tools/unix-smoke-p96-guest.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} LOG=${WINUAE_SMOKE_LOG:-/tmp/winuae_unix_p96_guest_smoke.log} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-45} Z3=${WINUAE_P96_Z3:-0} diff --git a/tools/unix-smoke-path-config.sh b/tools/unix-smoke-path-config.sh index b1f8b7a4..3df8d07a 100755 --- a/tools/unix-smoke-path-config.sh +++ b/tools/unix-smoke-path-config.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} LOG=${WINUAE_SMOKE_LOG:-/tmp/winuae_unix_path_config_smoke.log} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-5} TMPBASE=${TMPDIR:-/tmp} diff --git a/tools/unix-smoke-serial-tcp.sh b/tools/unix-smoke-serial-tcp.sh index be18889e..9a421fc5 100755 --- a/tools/unix-smoke-serial-tcp.sh +++ b/tools/unix-smoke-serial-tcp.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} LOG=${WINUAE_SMOKE_LOG:-/tmp/winuae_unix_serial_tcp_smoke.log} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-5} CONNECT_TIMEOUT=${WINUAE_SERIAL_TCP_TIMEOUT:-20} diff --git a/tools/unix-smoke-sound-boards.sh b/tools/unix-smoke-sound-boards.sh index 07c9dc33..8c6187d0 100755 --- a/tools/unix-smoke-sound-boards.sh +++ b/tools/unix-smoke-sound-boards.sh @@ -3,7 +3,7 @@ set -eu ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) BUILD_DIR=${WINUAE_BUILD_DIR:-/tmp/winuae_cmake_build} -EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae_unix"} +EXE=${WINUAE_EXE:-"$BUILD_DIR/winuae"} LOG_DIR=${WINUAE_SMOKE_LOG_DIR:-/tmp} RUN_SECONDS=${WINUAE_SMOKE_SECONDS:-5}