Prepare game 0.2.0 and standalone editor 0.5.0 releases (by Codex)

This commit is contained in:
Codex committed 2026-10-22 23:32:54 +02:00
1 parent 6636308cad
commit 878e171e15
22 files changed
+185 -38

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y build-essential git cmake ninja-build pkg-config libgtk-3-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxfixes-dev libxss-dev libasound2-dev libpulse-dev libgl1-mesa-dev libudev-dev
- name: Verify source export
run: python3 tools/public_release/check_public_tree.py --root . --history
run: python3 tools/public_release/check_public_tree.py --root . --history --revision HEAD
- name: Set up MSVC x64
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@a102174a2b586eec2ea151a69e6fd14404a8ce7c # v1.13.0
+40 -3
View File
@@ -1,8 +1,9 @@
# SPDX-License-Identifier: GPL-3.0-only
name: OBW Editor POC
name: OBW Editor
on:
push:
branches: [feat/obw-editor-poc]
branches: [main, feat/obw-editor-poc]
tags: ['editor-v*']
workflow_dispatch:
permissions:
contents: read
@@ -50,7 +51,7 @@ jobs:
- name: Build editor and synthetic tests
run: cmake --build build --target openbmh_editor editor_core_tests --parallel 2
- name: Native editor core and MCP tests
run: ctest --test-dir build -C Release -R ^editor_core_tests$ --output-on-failure --output-junit editor-tests.xml
run: ctest --test-dir build -C Release -R "^editor_(core_tests|version)$" --output-on-failure --output-junit editor-tests.xml
- name: Linux native GUI smoke
if: runner.os == 'Linux'
run: |
@@ -74,3 +75,39 @@ jobs:
path: |
build/editor-tests.xml
build/editor.png
release:
if: startsWith(github.ref, 'refs/tags/editor-v')
needs: editor
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
pattern: OpenBMHEditor-*
path: dist
merge-multiple: true
- name: Prepare editor release for review
shell: python
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
import os, pathlib, re, subprocess
tag = os.environ['RELEASE_TAG']
match = re.fullmatch(r'editor-v([0-9]+)\.([0-9]+)\.[0-9]+', tag)
if not match:
raise SystemExit('Invalid editor release tag')
version = tag.removeprefix('editor-v')
notes = pathlib.Path('docs/release') / ('editor-' + match[1] + '.' + match[2]) / 'RELEASE_NOTES.md'
packages = sorted(pathlib.Path('dist').glob('*.zip'))
expected = {'OpenBMHEditor-' + version + '-' + kind + '.zip'
for kind in ('windows-x64', 'linux-x64', 'macos-arm64', 'source')}
if {p.name for p in packages} != expected or not notes.is_file():
raise SystemExit('Missing or mismatched editor release files')
subprocess.run(['gh', 'release', 'create', tag, *map(str, packages), '--draft',
'--verify-tag', '--title', 'OpenBMH Editor ' + version,
'--notes-file', str(notes)], check=True)
+1 -1
View File
@@ -326,7 +326,7 @@ endif()
add_subdirectory(src/ui)
add_subdirectory(src/import)
option(OPENBMH_BUILD_EDITOR "Build the standalone OBW editor proof of concept" OFF)
option(OPENBMH_BUILD_EDITOR "Build the standalone OBW editor" OFF)
if(OPENBMH_BUILD_EDITOR)
add_subdirectory(src/editor)
endif()
+6 -5
View File
@@ -1,8 +1,9 @@
# OpenBMH
The separate experimental [OBW Editor POC](docs/EDITOR.md) uses native RmlUI,
supports German/English, image editing and a local MCP server. Enable it with
`-DOPENBMH_BUILD_EDITOR=ON`; edited worlds are independent of the Classic runtime.
The separate [OpenBMH Editor 0.5.0](docs/EDITOR.md) uses native RmlUI,
supports German/English, three themes, image editing and a local MCP server.
Download its own `editor-v0.5.0` release or build with
`-DOPENBMH_BUILD_EDITOR=ON`. Edited worlds are independent of the Classic runtime.
A modern and faithful open source rebuild of the *Bundesliga Manager Hattrick* engine.
@@ -16,7 +17,7 @@ This is an independent community project, with no affiliation with or endorsemen
Check the [releases page](https://github.com/Weyoune/openbmh/releases) for available packages and their platform notes. A Windows package uses the name `OpenBMH-<version>-windows-x64.zip`. Availability and native validation are stated for each release; source build instructions do not establish platform support on their own.
These instructions describe **0.2**, whose release packages are prepared separately from 0.1.2. See the [0.2 release notes](docs/release/0.2/RELEASE_NOTES.md).
These instructions describe **0.2.0**, released separately from the editor. See the [0.2 release notes](docs/release/0.2/RELEASE_NOTES.md).
1. Extract OpenBMH into a writable directory.
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.
@@ -35,7 +36,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.
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.
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. Platform builds and automated tests are separate from human interactive acceptance on Windows and macOS.
## Features and direction
+6 -6
View File
@@ -1,10 +1,10 @@
# OpenBMH Editor POC
# OpenBMH Editor 0.5.0
Der eigenständige, native Editor verwendet **RmlUI, SDL2 und OpenGL**. Er bearbeitet Startdatenbanken, keine laufenden Spielstände. Das Spiel und seine Classic-Prüfung bleiben unverändert.
Der eigenständige, native Editor verwendet **RmlUI, SDL2 und OpenGL**. Er bearbeitet Startdatenbanken, keine laufenden Spielstände. Das Spiel und seine Classic-Prüfung bleiben unverändert. Editor 0.5.0 hat eine eigene Versionsreihe und den Release-Tag `editor-v0.5.0`; die Spielversion ist 0.2.0.
## Starten und Daten öffnen
Das vollständige Editor-Paket entpacken und `OpenBMHEditor.exe` (Windows) beziehungsweise `OpenBMHEditor` (Linux/macOS) starten. `assets/editor` muss beim Programm bleiben. Auf macOS kann die unsignierte Testanwendung über **Rechtsklick → Öffnen** gestartet werden. Eine Signatur/Notarisierung ist nicht Bestandteil dieses POC.
Das vollständige Paket `OpenBMHEditor-0.5.0-<plattform>.zip` entpacken und `OpenBMHEditor.exe` (Windows) beziehungsweise `OpenBMHEditor` (Linux/macOS) starten. `assets/editor` muss beim Programm bleiben. Auf macOS kann die unsignierte Anwendung über **Rechtsklick → Öffnen** gestartet werden. Eine Signatur/Notarisierung ist nicht Bestandteil dieser Version. `OpenBMHEditor --version` zeigt die Editorversion ohne Grafikstart.
**Öffnen** bietet OBW-Dateien und entpackte Welten an. **BMH / FLTD importieren** liest einen Ordner mit einer unterstützten BMH- oder Football-Limited-Installation durch den bestehenden Konverter. Das Original wird nicht überschrieben. Eine bestehende Classic-OBW wird zunächst überprüft und dann in eine bearbeitbare Editorwelt übernommen.
@@ -50,7 +50,7 @@ Voraussetzungen entsprechen dem Hauptprojekt: C++20-Compiler, Git, CMake ≥ 3.2
```sh
cmake -S . -B build-editor -G Ninja -DCMAKE_BUILD_TYPE=Release -DOPENBMH_BUILD_EDITOR=ON
cmake --build build-editor --target openbmh_editor editor_core_tests --parallel 2
ctest --test-dir build-editor -C Release -R '^editor_core_tests$' --output-on-failure
ctest --test-dir build-editor -C Release -R '^editor_(core_tests|version)$' --output-on-failure
```
macOS ARM zusätzlich bei der Konfiguration: `-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0`. Unter Windows das Argument nach `-R` ohne einfache Shell-Anführungszeichen verwenden. Der Editor wird beim normalen Spiel-Build standardmäßig nicht mitgebaut.
@@ -65,7 +65,7 @@ build-editor/OpenBMHEditor --stdio-mcp --open world.obw
Weitere Argumente: `--settings datei.json`, `--assets verzeichnis`, `--commands script.json`, `--print-mcp-config`. Ein Command-Script ist ein Array aus `{"command":"…","args":{…}}`, mit denselben Kommandos wie die gemeinsame Session (z. B. `get`, `apply`, `save`). `--headless` startet kein Fenster. `--stdio-mcp` bietet dieselben Werkzeuge über newline-delimited JSON-RPC; stdout enthält dabei ausschließlich Protokollnachrichten. Testaufnahmen: `--screenshot bild.png --quit-after-ms 1800 --page clubs` (unter Linux mit Xvfb möglich).
Pakete baut `tools/package/make_editor_package.py --build build-editor --out dist --platform linux-x64` (oder `windows-x64`, `macos-arm64`). `--source-package` ergänzt den zugehörigen Quellcode mit den tatsächlich verwendeten, gepinnten Abhängigkeiten. Die CI **OBW Editor POC** baut und prüft alle drei Plattformen. Die nativen Tests unterscheiden sich von einem späteren menschlichen GUI-Test auf Windows/macOS.
Pakete baut `tools/package/make_editor_package.py --build build-editor --out dist --platform linux-x64` (oder `windows-x64`, `macos-arm64`). `--source-package` ergänzt den zugehörigen Quellcode mit den tatsächlich verwendeten, gepinnten Abhängigkeiten. Die CI **OBW Editor** baut und prüft alle drei Plattformen. Tags `editor-v<version>` erzeugen nach erfolgreicher Prüfung einen Release-Entwurf. Die nativen Tests unterscheiden sich von einem späteren menschlichen GUI-Test auf Windows/macOS.
## English quick start
@@ -75,4 +75,4 @@ The editor retains full squads, original image data, source claims and unknown e
In **Options**, switch the interface to **English**, choose one of the three themes, and enable/disable the integrated local MCP server. **Copy connection** provides the authenticated configuration. The server defaults to loopback port 8765; use port 0 for a free port. GUI and MCP share the same world, validation and undo history. It supports MCP Streamable HTTP 2025-11-25/2025-06-18 and optional stdio mode. Use `expected_revision` for concurrent edits.
Build with the three commands above, including `-DOPENBMH_BUILD_EDITOR=ON`. The native application requires OpenGL 3.3 (macOS 4.1) and the platform development dependencies documented in the main README. The proof of concept is unsigned and does not bundle any real-world dataset or proprietary game assets.
Build with the three commands above, including `-DOPENBMH_BUILD_EDITOR=ON`. The native application requires OpenGL 3.3 (macOS 4.1) and the platform development dependencies documented in the main README. Editor 0.5.0 is unsigned and does not bundle any real-world dataset or proprietary game assets.
+29 -7
View File
@@ -1,10 +1,31 @@
# OBW: OpenBMH world, save and pack format (concept, format version 1.0)
# OBW: OpenBMH world, save and pack format
The standalone editor additionally implements the non-playable
[OBW 1.1 `editor-world-v1` profile](obw/editor-v1.md). This does not relax the
Classic 1.0 content contract or seals. See [the editor guide](../EDITOR.md).
## Implemented profiles
Status: **format concept with a complete Classic installation-content converter** for roadmap 0.2, with preparation for 0.4. `openbmh_import` produces `BMH-classic` and `FLTD-classic` worlds under the guarded [`runtime:classic-v1` contract](obw/classic-v1.md), including all startup inputs and media. The [import guide](obw/import.md) distinguishes this from the explicitly partial `legacy-database-v1` development export. The 0.2 development branch adds a sealed Classic runtime, portable launcher and native career checkpoints; see [the runtime contract](obw/runtime-0.2.md). The released 0.1 engine still reads legacy installations.
| Profile | Format | Reader/writer | Playable |
|---|---|---|---|
| `classic-installation-v1` | OBW 1.0, `runtime:classic-v1` | Complete BMH/FLTD converter; OpenBMH 0.2 launcher, GUI and console | Yes, sealed Classic content |
| `editor-world-v1` | OBW 1.1, `editor:world-v1` | OpenBMH Editor 0.5: OBW/unpacked worlds and legacy import, OBW-only saving | No; editable start database |
| `legacy-database-v1` | OBW 1.0 development export | Converter's explicit `--database-only` option | No; partial legacy export |
`openbmh_import` produces `BMH-classic` and `FLTD-classic` worlds including
startup inputs, media and frozen portrait recipes. The
[import guide](obw/import.md) distinguishes them from the partial development
export. OpenBMH 0.2 reads the sealed content without the original installation
and writes separate native career checkpoints; see the
[runtime contract](obw/runtime-0.2.md).
The [1.1 editor profile](obw/editor-v1.md) adds editable worlds without relaxing
Classic seals. Opening Classic content in the editor preserves its sources;
saving creates an editor world rather than a newly sealed Classic world.
Names such as “Modern” are display names, not proof of runtime compatibility.
A modern-season data package can be structurally valid and fully editable while
its competition/season engine is still pending. See [the editor guide](../EDITOR.md).
The sections below define the general format and distinguish implemented
profiles from future capabilities. Generic calendar/rule authoring, modern
season simulation, network play and generic world-to-career generation are
not implemented merely because their data structures are documented here.
## 1. Goals and non-goals
@@ -20,14 +41,15 @@ Goals:
Non-goals of version 1.0:
- The match engine and its parameters (reserved namespace `x-matchengine`, see §3.3).
- Network play, an editor application and a binary encoding (reserved, see §2.4).
- Network play and a binary encoding (reserved, see §2.4). The separate editor
uses the additive 1.1 profile described above.
- Layout or screen data. Interfaces are themes (§9.6), not part of a world.
## 2. Container and files
### 2.1 Container
Every OBW file is a ZIP archive (deflate or stored) containing UTF-8 JSON documents and referenced binary assets. The versioned Classic extension additionally permits data-only compatibility regions and startup input records; it does not permit executable code or save state in a world. The project already links miniz (`bmh_miniz`) and has a JSON reader/writer (`src/cli/json.cpp`), so the format needs no new dependency. JSON keeps worlds diffable and editable by hand or by script.
Every OBW file is a ZIP archive (deflate or stored) containing UTF-8 JSON documents and referenced binary assets. The 1.1 editor reader also supports ZIP64, with its own documented size limits. The versioned Classic extension additionally permits data-only compatibility regions and startup input records; it does not permit executable code or save state in a world. The readers use miniz for the container; the editor additionally uses its declared JSON/image dependencies. Generic editor JSON remains editable by hand or script; sealed Classic packages must retain their original bytes and seals.
| Extension | `kind` | Contents |
|---|---|---|
+3
View File
@@ -2,6 +2,8 @@
This additive profile is a native editing interchange. It does **not** change
`classic-installation-v1`, its seals, the Classic runtime or save files.
It is implemented by OpenBMH Editor 0.5.0, whose application version is separate
from the OBW format version and the OpenBMH 0.2.0 game version.
## Identification
@@ -22,6 +24,7 @@ This additive profile is a native editing interchange. It does **not** change
The required editor capability is deliberately different from
`runtime:classic-v1`. An edited world must not be resealed as a Classic world.
The display title and a label such as Modern do not grant a runtime capability.
On import the editor keeps the original manifest under
`x-editor.original_manifest`, leaves compatibility/source regions intact, and
requires Save As. An original Classic seal is historical evidence only in this
+2
View File
@@ -22,6 +22,8 @@ surfaces and petrol accents, and Matchday graphite surfaces and coral accents.
All components consume the inherited palette, including dropdown popups,
validation/error text, scrollbars, image stages and crop outlines. The comparison
uses the same German `World::demo()` view in each theme.
The three Clubs captures were refreshed for Editor 0.5.0. The remaining
captures document the preceding theme/image-editing checks with the same layout.
| Theme | Clubs | Options | Image editor |
|---|---|---|---|
Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

+7
View File
@@ -56,6 +56,13 @@ The launcher requires OpenGL 3.3 (macOS: 4.1). Linux requires the platform libra
described in [BUILDING](../../BUILDING.md), including GTK3 for its folder picker.
The macOS executable is unsigned and is not a notarised application bundle.
Platform-specific human confirmation remains open for
[macOS filename entry](https://github.com/Weyoune/openbmh/issues/8),
[Windows path display](https://github.com/Weyoune/openbmh/issues/9) and
[Windows initial national-team selection](https://github.com/Weyoune/openbmh/issues/10).
Their fixes are included and covered by automated/Linux checks; an HQA label
does not claim that the original platform report has been verified on that OS.
No original executables, graphics, sound, databases or saved games are distributed.
Supply a supported CD/later German or Football Limited installation; the original
German floppy edition is unsupported. OpenBMH is GPL-3.0-only; bundled components
+42
View File
@@ -0,0 +1,42 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
# OpenBMH Editor 0.5.0
The first standalone editor release uses SDL2, RmlUI and OpenGL on Windows x64,
Linux x64 and macOS ARM64. Its version is independent of OpenBMH 0.2.0.
## Opening and editing worlds
Open an OBW archive, an unpacked world, or import a supported Bundesliga Manager
Hattrick / Football Limited installation. Edit countries, competitions, clubs,
players, squads, stadiums, referees and indexed artwork. Save exclusively as
**OBW 1.1 `editor-world-v1`**. Legacy installations are not overwritten.
The interface offers German and English, Midnight Glass, Silver Glass and
Matchday themes, shared undo/redo, validation and source-conflict review. Image
import supports cropping, arbitrary rotation and mirroring while retaining the
original. Shared placeholders remain intact when an individual image is edited.
The integrated authenticated MCP server is enabled by default on loopback.
Configure its port and copy the connection in Options. GUI and MCP use the same
transactions and revision checks; credentials remain in the local profile.
## Compatibility and limits
- Existing sealed Classic BMH/FLTD worlds can be opened and saved as editable
worlds. Edited worlds cannot be played by the Classic 0.2 runtime and are
never resealed as unmodified Classic content.
- Complete source rosters, unknown extensions, image originals and source
evidence are preserved. Missing facts remain missing; unresolved source
conflicts remain visible. This release does not supply game data.
- Modern season simulation, complete rule/calendar authoring and saved-career
editing are outside this release. An editor-valid world does not establish
that a season engine can play it.
- The ZIP contains the executable, `assets/editor`, fonts and notices. Retain
them together. Windows includes its app-local runtime. Linux needs the
documented system libraries. macOS is unsigned and not notarised.
The release has matching platform archives and a corresponding source archive
with pinned dependencies. Build/core/MCP checks run on all three platforms;
native mouse/keyboard GUI checks run on Linux. Target-platform human acceptance
remains separate. See the [editor guide](../../EDITOR.md) and
[format contract](../../formats/obw/editor-v1.md).
+5
View File
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-3.0-only
include(FetchContent)
set(OPENBMH_EDITOR_VERSION "0.5.0")
file(WRITE "${CMAKE_BINARY_DIR}/editor-version.json" "{\"version\": \"${OPENBMH_EDITOR_VERSION}\"}\n")
set(JSON_BuildTests OFF CACHE BOOL "" FORCE)
FetchContent_Declare(editor_json GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.12.0 GIT_SHALLOW TRUE)
@@ -43,6 +45,7 @@ endforeach()
file(APPEND "${CMAKE_BINARY_DIR}/editor-dependencies.json" "}\n")
add_library(bmh_editor_core STATIC archive.cpp world.cpp session.cpp images.cpp options.cpp mcp.cpp)
target_compile_definitions(bmh_editor_core PUBLIC OPENBMH_EDITOR_VERSION="${OPENBMH_EDITOR_VERSION}")
target_include_directories(bmh_editor_core PUBLIC .. ${editor_http_SOURCE_DIR})
target_link_libraries(bmh_editor_core PUBLIC nlohmann_json::nlohmann_json bmh_content
PRIVATE bmh_miniz ${BMH_SDL_TARGET} SDL2_image::SDL2_image-static lunasvg::lunasvg pugixml::pugixml)
@@ -82,3 +85,5 @@ if(MSVC)
target_compile_options(editor_core_tests PRIVATE /utf-8)
endif()
add_test(NAME editor_core_tests COMMAND editor_core_tests)
add_test(NAME editor_version COMMAND openbmh_editor --version)
set_tests_properties(editor_version PROPERTIES PASS_REGULAR_EXPRESSION "OpenBMH Editor ${OPENBMH_EDITOR_VERSION}")
+8 -3
View File
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "editor/ui.hpp"
#include "editor/version.hpp"
#include <SDL.h>
#include <atomic>
#include <chrono>
@@ -27,7 +28,10 @@ int main(int argc, char **argv) {
throw Error("invalid_change", {{"argument", arg}});
return argv[i];
};
if (arg == "--headless")
if (arg == "--version") {
std::cout << editor_product() << '\n';
return 0;
} else if (arg == "--headless")
headless = true;
else if (arg == "--serve")
serve = headless = true;
@@ -60,13 +64,14 @@ int main(int argc, char **argv) {
else if (arg == "--quit-after-ms")
ui.quit_after_ms = std::stoi(next());
else if (arg == "--help") {
std::cout << "OpenBMHEditor [--open world.obw|installation] [--demo|--new]\n"
std::cout << editor_product() << '\n'
<< "OpenBMHEditor [--open world.obw|installation] [--demo|--new]\n"
" [--settings file] [--assets directory] [--page "
"clubs|players|...]\n"
" [--headless --validate] [--output world.obw] [--commands "
"script.json]\n"
" [--serve --mcp-port 8765] [--stdio-mcp] "
"[--print-mcp-config]\n";
"[--print-mcp-config] [--version]\n";
return 0;
} else if (!arg.starts_with('-') && input.empty())
input = path(arg);
+2 -1
View File
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "editor/mcp.hpp"
#include "editor/version.hpp"
#include <atomic>
#include <httplib.h>
#include <thread>
@@ -233,7 +234,7 @@ Json McpServer::dispatch(const Json &request) {
version = "2025-11-25";
result = {{"protocolVersion", version},
{"capabilities", {{"tools", {{"listChanged", false}}}}},
{"serverInfo", {{"name", "OpenBMH Editor"}, {"version", "0.1.0-poc"}}},
{"serverInfo", {{"name", "OpenBMH Editor"}, {"version", std::string(kEditorVersion)}}},
{"instructions", "Edits share the native editor's undo history. Read rules for real "
"attribute ranges. Save only OBW editor worlds. These are not Classic "
"0.2 playable packages."}};
+1 -1
View File
@@ -144,7 +144,7 @@ std::string tr(const std::string &language, const std::string &key) {
{"dialog_failed", {"Der Dateidialog konnte nicht geöffnet werden.", "The file dialog could not be opened."}},
{"invalid_attributes", {"Ungültige Spielwerte.", "Invalid player attributes."}},
{"app", {"OpenBMH Editor", "OpenBMH Editor"}},
{"poc", {"Dateneditor · Vorschau", "World editor · Preview"}},
{"editor_tagline", {"OBW-Dateneditor", "OBW world editor"}},
{"overview", {"Übersicht", "Overview"}},
{"nations", {"Länder", "Countries"}},
{"competitions", {"Ligen & Pokale", "Leagues & cups"}},
+4 -1
View File
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "editor/ui.hpp"
#include "editor/images.hpp"
#include "editor/version.hpp"
#include "launch/rml_path.hpp"
#include <RmlUi/Core.h>
#include <RmlUi/Core/Elements/ElementFormControl.h>
@@ -183,6 +184,8 @@ class EditorUi final : public Rml::EventListener {
if (name.is_object() && name.contains(options_.language) && name[options_.language].is_string())
return name[options_.language];
auto result = text(name);
if (result.empty() && row.contains("name"))
return t("unknown");
return result.empty() ? str(row, "key", str(row, "id")) : result;
}
std::string ref(const Json &row, const std::string &key) const {
@@ -383,7 +386,7 @@ class EditorUi final : public Rml::EventListener {
}
void chrome() {
doc_->SetClassNames(options_.theme);
label("tagline", t("poc"));
label("tagline", t("editor_tagline") + " · " + std::string(kEditorVersion));
label("nav-label", t("data_areas"));
label("profile-note", t("not_playable"));
label("world-caption", info_.value("loaded", false) ? str(info_, "title") : "");
+9
View File
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include <string>
#include <string_view>
namespace bmh::editor {
inline constexpr std::string_view kEditorVersion = OPENBMH_EDITOR_VERSION;
inline std::string editor_product() { return "OpenBMH Editor " + std::string(kEditorVersion); }
} // namespace bmh::editor
+3 -2
View File
@@ -2,6 +2,7 @@
#include "editor/world.hpp"
#include "content/digest.hpp"
#include "content/package.hpp"
#include "editor/version.hpp"
#include "import/obw.hpp"
#include "launch/game_data.hpp"
#include <algorithm>
@@ -82,7 +83,7 @@ World World::blank(const std::string &title_value) {
{"min_reader", "1.1"},
{"kind", "world"},
{"title", {{"default", title_value}}},
{"generator", "OpenBMH Editor POC"},
{"generator", editor_product()},
{"provenance", "native"},
{"content_license", "user-supplied"},
{"start_date", "2026-07-01"},
@@ -170,7 +171,7 @@ void World::editor_profile() {
manifest["format_version"] = "1.1";
manifest["min_reader"] = "1.1";
manifest["requires"] = Json::array({"editor:world-v1"});
manifest["generator"] = "OpenBMH Editor POC";
manifest["generator"] = editor_product();
// The historical seal remains original evidence only. The editor profile
// deliberately cannot be passed to the Classic runtime as sealed content.
for (auto &comp : rows("competitions")) {
+13 -7
View File
@@ -8,6 +8,7 @@ import argparse
import hashlib
import json
from pathlib import Path
import re
import shutil
import subprocess
import tempfile
@@ -74,7 +75,10 @@ def main():
source, build = args.source.resolve(), args.build.resolve()
args.out.mkdir(parents=True, exist_ok=True)
commit = git(source, 'rev-parse', 'HEAD').decode().strip()
name = 'OpenBMHEditor-poc-' + args.platform
version = json.loads((build / 'editor-version.json').read_text())['version']
if not re.fullmatch(r'\d+\.\d+\.\d+', version):
raise RuntimeError('Invalid editor version')
name = 'OpenBMHEditor-' + version + '-' + args.platform
with tempfile.TemporaryDirectory(prefix='editor-package-') as td:
stage = Path(td) / name; stage.mkdir()
exe = 'OpenBMHEditor.exe' if args.platform.startswith('windows') else 'OpenBMHEditor'
@@ -84,13 +88,14 @@ def main():
for file in ('LICENSE', 'THIRD_PARTY_NOTICES.md'):
shutil.copy2(source / file, stage / file)
shutil.copy2(source / 'docs/EDITOR.md', stage / 'EDITOR.md')
shutil.copy2(source / 'docs/release/editor-0.5/RELEASE_NOTES.md', stage / 'RELEASE_NOTES.md')
if args.platform.startswith('windows'):
# Uses the same app-local CRT/UCRT installation as the main game.
# A successful runner launch alone does not prove deployability.
for dll in ('vcruntime140.dll', 'msvcp140.dll'):
if not (stage / dll).is_file():
raise RuntimeError('Required Windows runtime missing: ' + dll)
(stage / 'BUILD.json').write_text(json.dumps({'commit': commit, 'platform': args.platform,
(stage / 'BUILD.json').write_text(json.dumps({'commit': commit, 'platform': args.platform, 'version': version,
'editor_profile': 'editor-world-v1', 'game_data_included': False}, indent=2) + '\n')
zip_tree(stage, args.out / (name + '.zip'))
print(args.out / (name + '.zip'))
@@ -99,9 +104,10 @@ def main():
**json.loads((build / 'editor-dependencies.json').read_text())}
components = {**{n: (v[0], v[1]) for n, v in COMPONENTS.items()}, **EXTRA}
with tempfile.TemporaryDirectory(prefix='editor-source-') as td:
stage = Path(td) / 'OpenBMHEditor-poc-source'; stage.mkdir()
source_name = 'OpenBMHEditor-' + version + '-source'
stage = Path(td) / source_name; stage.mkdir()
project = [Path(f.decode()) for f in git(source, 'ls-files', '-z').split(b'\0') if f]
manifest = {'project_commit': commit, 'project_files': copy_files(source, stage / 'project', project, required=True), 'dependencies': {}}
manifest = {'project_commit': commit, 'editor_version': version, 'project_files': copy_files(source, stage / 'project', project, required=True), 'dependencies': {}}
cache = ['set(OPENBMH_BUILD_EDITOR ON CACHE BOOL "" FORCE)']
for name, (ref, url) in components.items():
result = copy_dependency(Path(deps[name]), stage / 'dependencies' / name, name, ref)
@@ -111,10 +117,10 @@ def main():
(stage / 'SOURCE_MANIFEST.json').write_text(json.dumps(manifest, indent=2) + '\n')
(stage / 'BUILD_SOURCE.txt').write_text('cmake -S project -B build -C dependencies.cmake -G Ninja -DCMAKE_BUILD_TYPE=Release\n'
'cmake --build build --target openbmh_editor editor_core_tests\n'
'ctest --test-dir build -R ^editor_core_tests$ --output-on-failure\n'
'ctest --test-dir build -R "^editor_(core_tests|version)$" --output-on-failure\n'
'Native compiler, CMake and OS development libraries: see project/docs/EDITOR.md.\n')
zip_tree(stage, args.out / 'OpenBMHEditor-poc-source.zip')
print(args.out / 'OpenBMHEditor-poc-source.zip')
zip_tree(stage, args.out / (source_name + '.zip'))
print(args.out / (source_name + '.zip'))
if __name__ == '__main__':
@@ -48,6 +48,7 @@ PROJECT_ARTWORK = {
"docs/qa/editor-poc/clubs-midnight-de.png": {
"2921aa67a870633c96f46328a82bc3022e5489b38d551c5314f13c7e59446070",
"aa53e9cdd9ac8f6bf18b514862ac704ff9003bd1b62466cad2ebc329b09703dc",
"ace9a5d491994592d4e87e8e1bce10af648a9c307645ace2f188c11d2b4f2fea",
},
"docs/qa/editor-poc/gui-search.png": {
"48dc00d03c01d5bbec35683ff65672c12af4be6aecc8a84e5fece243c56643f4",
@@ -74,6 +75,7 @@ PROJECT_ARTWORK = {
"fb8e5f1f86afe60de87b70a2f533690d1ef470241fa24ee4384ff000149edaab",
},
"docs/qa/editor-poc/clubs-silver-de.png": {
"3e557f68bf8d0e8186dc237f9e92f6b9c7743d7df79fd29c3a5838ba01c116f2",
"4f5dbe76b86097d306d2c982ce48093cce0fc95e9f35853493779b3116399239",
},
"docs/qa/editor-poc/options-silver-de.png": {
@@ -83,6 +85,7 @@ PROJECT_ARTWORK = {
"8d6ead6fd0e2fddc8e23de0a71abe519fa4f19ede0676823892d2568481bf68c",
},
"docs/qa/editor-poc/clubs-matchday-de.png": {
"ddc5461068bdff4c0e3b468315cf03ef7cd203354941c586c030d3f3e80ae6ef",
"e74d0b9acd07f6a48537616c28d74e53b8f69e20bb15fc3f6fcd0c10484b4f58",
},
"docs/qa/editor-poc/options-matchday-de.png": {