Build 0.2 native launcher and portable Classic runtime (by Codex)

This commit is contained in:
Codex committed 2026-10-18 11:28:51 +02:00
1 parent 3a021fc160
commit 2552528176
84 files changed
+5004 -197

No files matched your search

+12 -7
View File
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-only
cmake_minimum_required(VERSION 3.24)
project(OpenBMH VERSION 0.1.2 LANGUAGES CXX C)
project(OpenBMH VERSION 0.2.0 LANGUAGES CXX C)
# the one place of the version: --version of both programs and the window title (src/version.hpp)
add_compile_definitions(OPENBMH_VERSION="${PROJECT_VERSION}")
@@ -196,6 +196,10 @@ bmh_add_data_test(NAME highscore_tests REQUIRED_OPTIONS BMH_TEST_HIGHSCORE_TESTS
# Engine core: file formats and game logic, no platform dependencies
add_library(bmhcore STATIC
src/formats/binary.cpp
src/formats/content.cpp
src/formats/native_state.cpp
src/formats/native_file.cpp
src/cli/json.cpp
src/formats/palette.cpp
src/formats/vga.cpp
src/formats/font.cpp
@@ -264,10 +268,10 @@ else()
target_compile_options(bmhcore PRIVATE -Wall -Wextra)
endif()
add_executable(openbmh src/main.cpp)
target_link_libraries(openbmh PRIVATE bmhcore ${BMH_SDL_TARGET})
add_executable(openbmh_inspect src/main.cpp)
target_link_libraries(openbmh_inspect PRIVATE bmhcore ${BMH_SDL_TARGET})
if(MSVC)
target_compile_options(openbmh PRIVATE /utf-8)
target_compile_options(openbmh_inspect PRIVATE /utf-8)
endif()
# --- Game data launcher (src/launch): find, unpack and check the original game data ---------
@@ -317,6 +321,7 @@ endif()
add_subdirectory(src/ui)
add_subdirectory(src/import)
target_link_libraries(bmhui PUBLIC bmh_content)
add_executable(driver_barrier_tests tests/driver_barrier_tests.cpp)
target_link_libraries(driver_barrier_tests PRIVATE bmhcore)
add_test(NAME driver_barrier_tests COMMAND driver_barrier_tests)
@@ -439,10 +444,10 @@ add_executable(openbmh_play
src/app/main.cpp
${BMH_APP_CONTROLLER_SOURCE}
${BMH_APP_SESSION_SDL_SOURCE})
target_link_libraries(openbmh_play PRIVATE bmhui bmhlaunch_dialog openbmh_audio ${BMH_SDL_TARGET})
target_link_libraries(openbmh_play PRIVATE bmhui bmh_launcher bmhlaunch_dialog openbmh_audio ${BMH_SDL_TARGET})
# a game without a console window on double-click (SDL2main provides WinMain); started from a
# console it attaches to that one for --version, --help and start errors (src/app/main.cpp)
set_target_properties(openbmh_play PROPERTIES WIN32_EXECUTABLE TRUE)
set_target_properties(openbmh_play PROPERTIES WIN32_EXECUTABLE TRUE OUTPUT_NAME OpenBMH)
if(MSVC)
target_compile_options(openbmh_play PRIVATE /utf-8)
# App sources also compile in headless tests/helpers without target /utf-8.
@@ -622,7 +627,7 @@ add_executable(openbmh_cli
src/cli/seat_hub.cpp
src/cli/json.cpp
${BMH_APP_SESSION_SOURCE})
target_link_libraries(openbmh_cli PRIVATE bmhui bmhlaunch)
target_link_libraries(openbmh_cli PRIVATE bmh_launcher bmhui bmhlaunch)
if(WIN32)
target_link_libraries(openbmh_cli PRIVATE ws2_32) # --listen (Winsock)
endif()