Prepare game 0.2.0 and standalone editor 0.5.0 releases (by Codex)
OBW Editor / editor (linux-x64, ubuntu-24.04) (push) Canceled after 0s
OBW Editor / editor (macos-arm64, macos-14) (push) Canceled after 0s
OBW Editor / editor (windows-x64, windows-2022) (push) Canceled after 0s
OBW Editor / release (push) Canceled after 0s
Build without game data / build (windows-x64, windows-2022) (push) Canceled after 0s
Build without game data / build (macos-arm64, macos-14) (push) Canceled after 0s
Build without game data / build (linux-x64, ubuntu-24.04) (push) Canceled after 0s
Prepare release packages / build (push) Canceled after 0s
Prepare release packages / draft (push) Canceled after 0s

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

No files matched your search

+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")) {