mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
refactor(editor): extract --migrate-* handlers into cli_migrate.cpp
Moves the four schema-migration handlers (--migrate-wom,
--migrate-zone, --migrate-project, --migrate-jsondbc) out of
main.cpp into a new cli_migrate.{hpp,cpp} module. Same
behavior — they're idempotent in-place upgraders for older
WOM revisions and JSON DBC sidecar schemas. main.cpp shrinks
by 282 lines (11,261 → 10,979).
This commit is contained in:
parent
8fd6df6113
commit
f0bbc228ef
4 changed files with 359 additions and 286 deletions
21
tools/editor/cli_migrate.hpp
Normal file
21
tools/editor/cli_migrate.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the schema-migration handlers — these upgrade older
|
||||
// on-disk asset versions in-place so newer tooling stops rejecting
|
||||
// or silently misreading them. All migrators are idempotent:
|
||||
// already-modern files become no-ops.
|
||||
// --migrate-wom single WOM v1/v2 → WOM3 (single-batch)
|
||||
// --migrate-zone every WOM in a zone directory
|
||||
// --migrate-project every zone in a project directory
|
||||
// --migrate-jsondbc JSON DBC sidecar schema fixes
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleMigrate(int& i, int argc, char** argv, int& outRc);
|
||||
|
||||
} // namespace cli
|
||||
} // namespace editor
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue