From 8aa849e9fa599ed440675cdbbeb3f30d9eb1becc Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 18 Oct 2026 13:30:24 +0200 Subject: [PATCH] Add RmlUI night-stadium launcher and shared theme (by Codex) --- CMakeLists.txt | 9 +- README.md | 4 +- THIRD_PARTY_NOTICES.md | 7 +- assets/launcher/launcher.rml | 45 ++ assets/launcher/provenance.json | 8 + assets/launcher/stadium.tga | Bin 0 -> 4719980 bytes assets/launcher/theme.rcss | 74 +++ docs/BUILDING.md | 4 +- docs/architecture.md | 14 +- docs/formats/obw/runtime-0.2.md | 9 +- docs/licenses/FreeType-BDF.txt | 152 ++++++ docs/licenses/FreeType-FTL.txt | 169 +++++++ docs/licenses/FreeType-PCF.txt | 96 ++++ docs/licenses/FreeType-zlib.txt | 29 ++ docs/licenses/FreeType.txt | 46 ++ docs/licenses/README.md | 3 + docs/licenses/RmlUi-Khronos.txt | 22 + docs/licenses/RmlUi-containers.txt | 58 +++ docs/licenses/RmlUi-fonts.txt | 316 ++++++++++++ docs/licenses/RmlUi.txt | 22 + src/import/CMakeLists.txt | 20 +- src/launch/launcher_cocoa.mm | 300 ------------ src/launch/launcher_gtk.cpp | 269 ----------- src/launch/launcher_rmlui.cpp | 557 ++++++++++++++++++++++ src/launch/launcher_win32.cpp | 320 ------------- src/launch/rmlui.cmake | 41 ++ tests/launcher_document_tests.cpp | 88 ++++ tests/package_tests.py | 18 + tools/package/make_package.py | 9 +- tools/package/make_source_package.py | 28 +- tools/public_release/check_public_tree.py | 12 +- tools/public_release/test_public_tree.py | 9 + 32 files changed, 1841 insertions(+), 917 deletions(-) create mode 100644 assets/launcher/launcher.rml create mode 100644 assets/launcher/provenance.json create mode 100644 assets/launcher/stadium.tga create mode 100644 assets/launcher/theme.rcss create mode 100644 docs/licenses/FreeType-BDF.txt create mode 100644 docs/licenses/FreeType-FTL.txt create mode 100644 docs/licenses/FreeType-PCF.txt create mode 100644 docs/licenses/FreeType-zlib.txt create mode 100644 docs/licenses/FreeType.txt create mode 100644 docs/licenses/RmlUi-Khronos.txt create mode 100644 docs/licenses/RmlUi-containers.txt create mode 100644 docs/licenses/RmlUi-fonts.txt create mode 100644 docs/licenses/RmlUi.txt delete mode 100644 src/launch/launcher_cocoa.mm delete mode 100644 src/launch/launcher_gtk.cpp create mode 100644 src/launch/launcher_rmlui.cpp delete mode 100644 src/launch/launcher_win32.cpp create mode 100644 src/launch/rmlui.cmake create mode 100644 tests/launcher_document_tests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index ed8cdbb..e6560e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -453,6 +453,11 @@ target_link_libraries(openbmh_play PRIVATE bmhui bmh_launcher bmhlaunch_dialog o # 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 OUTPUT_NAME OpenBMH) +if(CMAKE_CONFIGURATION_TYPES) + add_custom_command(TARGET openbmh_play POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/assets/launcher" + "$/assets/launcher") +endif() if(MSVC) target_compile_options(openbmh_play PRIVATE /utf-8) # App sources also compile in headless tests/helpers without target /utf-8. @@ -1107,8 +1112,10 @@ bmh_add_data_test(NAME english_fixture_table_data_tests DATA_DIR "${BMH_ENGLISH_ COMMAND fixture_table_tests "${BMH_ENGLISH_DATA}") # Private build paths are inputs to the source-package tool, never shipped in its manifest. +FetchContent_GetProperties(rmlui) +FetchContent_GetProperties(freetype) set(package_dependencies "{}") -foreach(dependency IN ITEMS SDL2 miniz lzma_sdk nfd) +foreach(dependency IN ITEMS SDL2 miniz lzma_sdk nfd rmlui freetype) string(REPLACE "\\" "/" dependency_path "${${dependency}_SOURCE_DIR}") if(dependency STREQUAL "SDL2" AND sdl2_SOURCE_DIR) set(dependency_path "${sdl2_SOURCE_DIR}") diff --git a/README.md b/README.md index 9e0fcb1..1351ae0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Check the [releases page](https://github.com/Weyoune/openbmh/releases) for avail These instructions describe the **0.2 development branch**, not the published 0.1.2 package. 1. Extract OpenBMH into a writable directory. -2. Start `OpenBMH.exe` on Windows, or `OpenBMH` on Linux/macOS. Its native launcher initially has an empty **Name | Art** list. +2. Start `OpenBMH.exe` on Windows, or `OpenBMH` on Linux/macOS. Its RmlUI launcher initially has an empty **Name | Art** list. The night-stadium design uses a small version label in the lower-right corner. 3. Choose **Add**, select your own BMH or Football Limited installation, and enter a unique mod name and starting display year. The default names are `BMH-classic` and `FTDL-classic` (the English format identifier is `FLTD-classic`). 4. Optionally transfer saved games and settings from the installation or another folder. The import reports files it could not migrate. 5. Select the resulting Classic mod and choose **Start**. After import, its original installation is no longer needed for play. @@ -31,7 +31,7 @@ For direct startup or the console: Both frontends use native content and saves. Use **Add** to migrate older files rather than passing an original executable or `.FBM` to the running game. The starting year changes the Classic year display; original weekday and scheduling rules are preserved. Modern worlds are reserved for a later version. -See the [0.2 migration contract](docs/formats/obw/runtime-0.2.md) for compatibility and validation limits. Native Windows and macOS behaviour must be checked on their target platforms before a 0.2 release. +The launcher uses SDL2, RmlUI and OpenGL 3.3 (macOS: OpenGL 4.1); keep its `assets` directory next to the executable. Folder selection uses the operating system's dialog. See the [0.2 migration contract](docs/formats/obw/runtime-0.2.md) for compatibility and validation limits. Interactive Windows and macOS behaviour must be checked on their target platforms before a 0.2 release. ## Features and direction diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 6014a32..2b479bc 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -10,9 +10,14 @@ OpenBMH's own code and documentation use GPL-3.0-only. This does not replace the | [miniz](https://github.com/richgel999/miniz/releases/tag/3.0.2) | 3.0.2 amalgamation | MIT; embedded public-domain notices remain in its source | [miniz.txt](docs/licenses/miniz.txt), [source notices](docs/licenses/miniz-source-notices.txt) | | [LZMA SDK decoder files](https://github.com/ip7z/7zip/tree/24.09/C) | Selected C files from 7-Zip 24.09 | Public domain, as marked in the selected files | [LZMA-SDK.txt](docs/licenses/LZMA-SDK.txt) | | [nativefiledialog-extended](https://github.com/btzy/nativefiledialog-extended/tree/v1.2.1) | 1.2.1 | zlib license | [nativefiledialog-extended.txt](docs/licenses/nativefiledialog-extended.txt) | +| [RmlUi](https://github.com/mikke89/RmlUi/tree/6.3) | 6.3, Core and SDL2/OpenGL backend | MIT | [RmlUi.txt](docs/licenses/RmlUi.txt), [containers](docs/licenses/RmlUi-containers.txt), [Khronos notice](docs/licenses/RmlUi-Khronos.txt) | +| [FreeType](https://github.com/freetype/freetype/tree/VER-2-13-3) | 2.13.3 | FreeType License (FTL) | [license choices](docs/licenses/FreeType.txt), [FTL](docs/licenses/FreeType-FTL.txt), [BDF](docs/licenses/FreeType-BDF.txt), [PCF](docs/licenses/FreeType-PCF.txt), [internal gzip/zlib](docs/licenses/FreeType-zlib.txt) | +| LatoLatin Regular and Bold | Unmodified fonts included with RmlUi 6.3 | SIL Open Font License 1.1 | [font notices](docs/licenses/RmlUi-fonts.txt) | | [Nuked OPL3](https://github.com/nukeykt/Nuked-OPL3/tree/765ec962e473aeb767e4cba74ffdc8f588ffbfe8) | Commit `765ec962e473aeb767e4cba74ffdc8f588ffbfe8` | LGPL-2.1-or-later | [LGPL-2.1.txt](docs/licenses/LGPL-2.1.txt), [copyright and source notice](docs/licenses/Nuked-OPL3-notices.txt) | -The miniz implementation provides a zlib-compatible API; it is not the zlib library. OpenBMH does not directly link a separate zlib dependency. SDL2 and nativefiledialog-extended use the **zlib license**, which is distinct from using zlib code. A system-library build or distributor's package can have additional runtime dependencies; its notices must match the libraries actually included. +The miniz implementation provides a zlib-compatible API; it is not the zlib library. FreeType's internal gzip module includes its bundled zlib code; an external zlib library is not linked by the pinned build. SDL2 and nativefiledialog-extended use the **zlib license**, which is distinct from using zlib code. A system-library build or distributor's package can have additional runtime dependencies; its notices must match the libraries actually included. + +Portions of this software are copyright © the FreeType Project (www.freetype.org). All rights reserved. The pinned build uses the FreeType License option, with the included module notices retained. RmlUi and FreeType are linked statically; their corresponding pinned source is included in the source package. Only the public-domain C decoding subset is taken from the 7-Zip source package. This statement does not describe all of 7-Zip: other parts of that upstream project have different licenses and are not included here. diff --git a/assets/launcher/launcher.rml b/assets/launcher/launcher.rml new file mode 100644 index 0000000..94671dd --- /dev/null +++ b/assets/launcher/launcher.rml @@ -0,0 +1,45 @@ + + + + OpenBMH + + + + +
+
+
+
OpenBMH
+
+
+
+

Deine Spiele

+
Bundesliga Manager Hattrick · Football Limited
+
+
NameArt
+
+
+
0 Mods
+
+
+ + + + + +
+
+
+
+