{
  "schema_version": 1,
  "generated_by": "BuildTools/docs_package.py",
  "source_manifest": "BuildTools/PackageInterface.json",
  "source_parser": "BuildTools/package.py",
  "repository": "cvet/fonline",
  "source_ref": "master",
  "scope": {
    "surface": "package-interface",
    "stability": "internal",
    "since": null,
    "support_note": "No versioned package support line is declared; embedding projects must pin an engine revision.",
    "included": [
      "DefinePackage declaration clauses and the per-binary POSTFIX modifier",
      "package.py targets, platforms, architecture keys, pack tokens, and payload effects",
      "implemented, placeholder, and unsupported package boundaries"
    ],
    "excluded": [
      "embedding-project package matrices and release policy",
      "project configuration key schema and secret provisioning",
      "resource-pack content selection and deployment topology",
      "installer signing credentials and external tool operation"
    ]
  },
  "declaration": {
    "command": "DefinePackage",
    "source": "BuildTools/cmake/helpers/Build.cmake",
    "consumer": "BuildTools/cmake/stages/Packages.cmake",
    "description": "Declare a named package target and one or more binary payloads.",
    "clauses": [
      {
        "name": "CONFIG",
        "required": true,
        "repeatable": false,
        "arguments": [
          {
            "name": "config",
            "value_kind": "subconfig",
            "description": "Default project subconfig baked into every binary entry."
          }
        ],
        "description": "Set the package-wide default config.",
        "id": "package.declaration.DefinePackage.clause.CONFIG"
      },
      {
        "name": "BINARY",
        "required": true,
        "repeatable": true,
        "arguments": [
          {
            "name": "target",
            "value_kind": "target",
            "description": "Packager target name."
          },
          {
            "name": "platform",
            "value_kind": "platform",
            "description": "Packager platform name."
          },
          {
            "name": "arch",
            "value_kind": "architecture-list",
            "description": "Architecture key or plus-separated architecture keys."
          },
          {
            "name": "pack",
            "value_kind": "pack-list",
            "description": "Plus-separated pack tokens."
          }
        ],
        "description": "Add one target/platform/architecture payload, optionally followed by POSTFIX and a value that apply together only to this binary entry.",
        "id": "package.declaration.DefinePackage.clause.BINARY"
      }
    ],
    "options": [
      {
        "name": "POSTFIX",
        "value_kind": "string",
        "default_source": "empty",
        "description": "Select the matching postfixed binary input and isolate this entry's target directory, packaged build name, runtime-update payloads, and MSI name without affecting sibling BINARY entries.",
        "id": "package.binary-option.POSTFIX"
      }
    ],
    "id": "package.declaration.DefinePackage"
  },
  "packager": {
    "source": "BuildTools/package.py",
    "entrypoint": "main",
    "description": "Stage one declared binary payload, patch runtime data, and emit selected artifacts."
  },
  "targets": [
    {
      "name": "Server",
      "resource_mode": "server-and-client",
      "required_packs": [],
      "description": "Server binary plus server resources and client update resource packs.",
      "id": "package.target.Server"
    },
    {
      "name": "Client",
      "resource_mode": "client",
      "required_packs": [],
      "description": "Client host/runtime binary and client resources.",
      "id": "package.target.Client"
    },
    {
      "name": "Mapper",
      "resource_mode": "none",
      "required_packs": [
        "NoRes"
      ],
      "description": "Mapper binary without packaged game resources.",
      "id": "package.target.Mapper"
    },
    {
      "name": "Baker",
      "resource_mode": "none",
      "required_packs": [
        "NoRes"
      ],
      "description": "Baker executable or library without packaged game resources.",
      "id": "package.target.Baker"
    },
    {
      "name": "AnimationViewer",
      "resource_mode": "none",
      "required_packs": [
        "NoRes"
      ],
      "description": "Standalone animation preview tool without packaged game resources.",
      "id": "package.target.AnimationViewer"
    },
    {
      "name": "ParticleViewer",
      "resource_mode": "none",
      "required_packs": [
        "NoRes"
      ],
      "description": "Standalone particle preview tool without packaged game resources.",
      "id": "package.target.ParticleViewer"
    }
  ],
  "platforms": [
    {
      "name": "Windows",
      "status": "implemented",
      "architectures": [
        "win32",
        "win64",
        "win32-win7",
        "win64-win7",
        "arm64"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Native PE payloads with optional runtime DLLs, symbols, archives, and MSI. The -win7 keys resolve to canonical win32/win64 binary architectures and require a matching explicit POSTFIX when the build output is postfixed. arm64 is accepted as an existing package input, but the standard BuildTools platform registry does not provide a Windows arm64 build lane.",
      "id": "package.platform.Windows"
    },
    {
      "name": "Linux",
      "status": "implemented",
      "architectures": [
        "x64",
        "arm64",
        "x86",
        "arm"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Native ELF payloads with optional runtime libraries and archives.",
      "id": "package.platform.Linux"
    },
    {
      "name": "Android",
      "status": "implemented",
      "architectures": [
        "arm32",
        "arm64",
        "x86"
      ],
      "targets": [
        "Client"
      ],
      "description": "Gradle client project with native ABI libraries, assets, and optional APK.",
      "id": "package.platform.Android"
    },
    {
      "name": "macOS",
      "status": "unsupported",
      "architectures": [
        "x64",
        "arm64"
      ],
      "targets": [
        "Client"
      ],
      "description": "Accepted by argparse but package_macos currently aborts.",
      "id": "package.platform.macOS"
    },
    {
      "name": "iOS",
      "status": "unsupported",
      "architectures": [
        "arm64",
        "simulator"
      ],
      "targets": [
        "Client"
      ],
      "description": "Accepted by argparse but package_ios currently aborts.",
      "id": "package.platform.iOS"
    },
    {
      "name": "Web",
      "status": "implemented",
      "architectures": [
        "wasm"
      ],
      "targets": [
        "Client"
      ],
      "description": "Browser client JavaScript/Wasm payload with preloaded resources.",
      "id": "package.platform.Web"
    }
  ],
  "packs": [
    {
      "name": "Raw",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Windows",
        "Linux",
        "Android",
        "Web"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Retain the staged target directory after finalization.",
      "output": "<target-output>",
      "id": "package.pack.Raw"
    },
    {
      "name": "Zip",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Windows",
        "Linux",
        "Android",
        "Web"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Create a deterministic ZIP beside the staged target directory.",
      "output": "<target-output>.zip",
      "id": "package.pack.Zip"
    },
    {
      "name": "SingleZip",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Windows",
        "Linux",
        "Android",
        "Web"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Append the staged target directory to one package-wide ZIP; identical same-name members are stored once, while conflicting contents fail packaging.",
      "output": "<output>/<output-name>.zip",
      "id": "package.pack.SingleZip"
    },
    {
      "name": "Tar",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Linux"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Create an uncompressed tar archive.",
      "output": "<target-output>.tar",
      "id": "package.pack.Tar"
    },
    {
      "name": "TarGz",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Linux"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Create a gzip-compressed tar archive.",
      "output": "<target-output>.tar.gz",
      "id": "package.pack.TarGz"
    },
    {
      "name": "Root",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Windows",
        "Linux",
        "Android",
        "Web"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Merge the staged target directory into the package output root.",
      "output": "<output>",
      "id": "package.pack.Root"
    },
    {
      "name": "Wix",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Windows"
      ],
      "targets": [
        "Client"
      ],
      "description": "Build a required MSI from the staged Windows client payload; POSTFIX is appended to the installer base name.",
      "output": "<output>/<nice-name>[_<postfix>].msi",
      "id": "package.pack.Wix"
    },
    {
      "name": "Apk",
      "category": "artifact",
      "status": "implemented",
      "artifact": true,
      "platforms": [
        "Android"
      ],
      "targets": [
        "Client"
      ],
      "description": "Run Gradle and copy the selected signed/debug APK beside the staged project.",
      "output": "<output>/<target-output-name>.apk",
      "id": "package.pack.Apk"
    },
    {
      "name": "Debug",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows",
        "Linux",
        "Android",
        "Web"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Select debug binary inputs; Android uses assembleDebug.",
      "id": "package.pack.Debug"
    },
    {
      "name": "NoRes",
      "category": "resource",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows",
        "Linux"
      ],
      "targets": [
        "Server",
        "Client",
        "Mapper",
        "Baker",
        "AnimationViewer",
        "ParticleViewer"
      ],
      "description": "Skip resource staging and embedded/config/build-name patching.",
      "id": "package.pack.NoRes"
    },
    {
      "name": "Headless",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows",
        "Linux"
      ],
      "targets": [
        "Server",
        "Client"
      ],
      "description": "Include the regular and Headless binary variants.",
      "id": "package.pack.Headless"
    },
    {
      "name": "Service",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows"
      ],
      "targets": [
        "Server"
      ],
      "description": "Include the regular server and Windows Service variants.",
      "id": "package.pack.Service"
    },
    {
      "name": "Daemon",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Linux"
      ],
      "targets": [
        "Server"
      ],
      "description": "Include the regular server and Linux Daemon variants.",
      "id": "package.pack.Daemon"
    },
    {
      "name": "TotalProfiling",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows",
        "Linux"
      ],
      "targets": [
        "Server",
        "Client"
      ],
      "description": "Include the regular and total-profiling binary variants.",
      "id": "package.pack.TotalProfiling"
    },
    {
      "name": "OnDemandProfiling",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows",
        "Linux"
      ],
      "targets": [
        "Server",
        "Client"
      ],
      "description": "Include the regular and on-demand-profiling binary variants.",
      "id": "package.pack.OnDemandProfiling"
    },
    {
      "name": "OGL",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows"
      ],
      "targets": [
        "Client"
      ],
      "description": "Include the regular and OpenGL client variants and patch ForceOpenGL=1.",
      "id": "package.pack.OGL"
    },
    {
      "name": "Lib",
      "category": "binary-selection",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Windows"
      ],
      "targets": [
        "Client",
        "Baker"
      ],
      "description": "Package the shared-library application instead of the executable.",
      "id": "package.pack.Lib"
    },
    {
      "name": "WebServer",
      "category": "payload",
      "status": "implemented",
      "artifact": false,
      "platforms": [
        "Web"
      ],
      "targets": [
        "Client"
      ],
      "description": "Add the local simple-web-server.py helper to the browser payload.",
      "id": "package.pack.WebServer"
    },
    {
      "name": "AppImage",
      "category": "artifact",
      "status": "placeholder",
      "artifact": false,
      "platforms": [
        "Linux"
      ],
      "targets": [
        "Client"
      ],
      "description": "Reserved token; the current Linux packager emits no AppImage artifact.",
      "id": "package.pack.AppImage"
    }
  ],
  "payloads": [
    {
      "name": "Windows",
      "status": "implemented",
      "description": "Patched PE executable or DLL, companion runtime files, PDBs when present, and resource ZIP directories unless NoRes is selected. Managed builds carry target-specific managed assemblies and the prepared runtime inside the selected resource pack. win32-win7 and win64-win7 read the canonical win32/win64 binary entry selected by the same per-binary POSTFIX.",
      "id": "package.payload.Windows"
    },
    {
      "name": "Linux",
      "status": "implemented",
      "description": "Patched executable or shared runtime, companion files, and resource ZIP directories unless NoRes is selected. Managed builds carry target-specific managed assemblies and the prepared runtime inside the selected resource pack.",
      "id": "package.payload.Linux"
    },
    {
      "name": "Android",
      "status": "implemented",
      "description": "Generated Gradle project containing libmain.so per ABI and baked resources under app assets; managed assemblies and the prepared runtime remain in the resource-pack assets. Apk optionally emits a sibling APK.",
      "id": "package.payload.Android"
    },
    {
      "name": "Web",
      "status": "implemented",
      "description": "JavaScript, patched Wasm, HTML shell, Resources.data/Resources.js preload files, target-specific managed assemblies and runtime resources when enabled, and an optional local server helper.",
      "id": "package.payload.Web"
    },
    {
      "name": "macOS",
      "status": "unsupported",
      "description": "No payload is emitted in the current repository state.",
      "id": "package.payload.macOS"
    },
    {
      "name": "iOS",
      "status": "unsupported",
      "description": "No payload is emitted in the current repository state.",
      "id": "package.payload.iOS"
    }
  ],
  "cli": {
    "program": "package.py",
    "description": "FOnline packager",
    "usage": "usage: package.py [-h] -maincfg MAINCFG -buildhash BUILDHASH -devname DEVNAME -nicename NICENAME -target {Server,Client,Mapper,Baker,AnimationViewer,ParticleViewer} -platform {Windows,Linux,Android,macOS,iOS,Web} -arch ARCH\n                  [-expect-client-runtime EXPECT_CLIENT_RUNTIME] -pack PACK -config CONFIG -input INPUT [-binary-output-postfix BINARY_OUTPUT_POSTFIX] -output OUTPUT [-resource-pack-compress-level {0,1,2,3,4,5,6,7,8,9}]\n                  [-resource-pack-jobs RESOURCE_PACK_JOBS] [-resource-pack-hash-library RESOURCE_PACK_HASH_LIBRARY] [-bundle-compress-level {0,1,2,3,4,5,6,7,8,9}]",
    "help_output": "usage: package.py [-h] -maincfg MAINCFG -buildhash BUILDHASH -devname DEVNAME -nicename NICENAME -target {Server,Client,Mapper,Baker,AnimationViewer,ParticleViewer} -platform {Windows,Linux,Android,macOS,iOS,Web} -arch ARCH\n                  [-expect-client-runtime EXPECT_CLIENT_RUNTIME] -pack PACK -config CONFIG -input INPUT [-binary-output-postfix BINARY_OUTPUT_POSTFIX] -output OUTPUT [-resource-pack-compress-level {0,1,2,3,4,5,6,7,8,9}]\n                  [-resource-pack-jobs RESOURCE_PACK_JOBS] [-resource-pack-hash-library RESOURCE_PACK_HASH_LIBRARY] [-bundle-compress-level {0,1,2,3,4,5,6,7,8,9}]\n\nFOnline packager\n\noptions:\n  -h, --help            show this help message and exit\n  -maincfg MAINCFG      Main config path\n  -buildhash BUILDHASH  build hash\n  -devname DEVNAME      Dev game name\n  -nicename NICENAME    Representable game name\n  -target {Server,Client,Mapper,Baker,AnimationViewer,ParticleViewer}\n                        package target type\n  -platform {Windows,Linux,Android,macOS,iOS,Web}\n                        platform type\n  -arch ARCH            architectures to include (divided by +)\n  -expect-client-runtime EXPECT_CLIENT_RUNTIME\n                        Client variant whose runtime payload this server package must distribute, as Platform:arch[:postfix]. Repeatable\n  -pack PACK            package type\n  -config CONFIG        config name\n  -input INPUT          input dir (from FO_OUTPUT_PATH)\n  -binary-output-postfix BINARY_OUTPUT_POSTFIX\n                        suffix appended to binary output dir names\n  -output OUTPUT        output dir\n  -resource-pack-compress-level {0,1,2,3,4,5,6,7,8,9}\n                        override the resource pack compression level (zlib scale: 0 stores, 9 is the strongest)\n  -resource-pack-jobs RESOURCE_PACK_JOBS\n                        maximum concurrent resource archives (default: FO_RESOURCE_PACK_JOBS or 1)\n  -resource-pack-hash-library RESOURCE_PACK_HASH_LIBRARY\n                        explicit host FNV-1a library; otherwise discover it under input Binaries/BuildTools-*\n  -bundle-compress-level {0,1,2,3,4,5,6,7,8,9}\n                        override the bundle compression level (zlib scale: 0 stores, 9 is the strongest)\n",
    "arguments": [
      {
        "id": "package.cli.argument.maincfg",
        "destination": "maincfg",
        "action": "store",
        "option_strings": [
          "-maincfg"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "Main config path"
      },
      {
        "id": "package.cli.argument.buildhash",
        "destination": "buildhash",
        "action": "store",
        "option_strings": [
          "-buildhash"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "build hash"
      },
      {
        "id": "package.cli.argument.devname",
        "destination": "devname",
        "action": "store",
        "option_strings": [
          "-devname"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "Dev game name"
      },
      {
        "id": "package.cli.argument.nicename",
        "destination": "nicename",
        "action": "store",
        "option_strings": [
          "-nicename"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "Representable game name"
      },
      {
        "id": "package.cli.argument.target",
        "destination": "target",
        "action": "store",
        "option_strings": [
          "-target"
        ],
        "required": true,
        "nargs": 1,
        "choices": [
          "Server",
          "Client",
          "Mapper",
          "Baker",
          "AnimationViewer",
          "ParticleViewer"
        ],
        "default": null,
        "type": null,
        "description": "package target type"
      },
      {
        "id": "package.cli.argument.platform",
        "destination": "platform",
        "action": "store",
        "option_strings": [
          "-platform"
        ],
        "required": true,
        "nargs": 1,
        "choices": [
          "Windows",
          "Linux",
          "Android",
          "macOS",
          "iOS",
          "Web"
        ],
        "default": null,
        "type": null,
        "description": "platform type"
      },
      {
        "id": "package.cli.argument.arch",
        "destination": "arch",
        "action": "store",
        "option_strings": [
          "-arch"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "architectures to include (divided by +)"
      },
      {
        "id": "package.cli.argument.expect_client_runtime",
        "destination": "expect_client_runtime",
        "action": "append",
        "option_strings": [
          "-expect-client-runtime"
        ],
        "required": false,
        "nargs": 1,
        "choices": null,
        "default": [],
        "type": null,
        "description": "Client variant whose runtime payload this server package must distribute, as Platform:arch[:postfix]. Repeatable"
      },
      {
        "id": "package.cli.argument.pack",
        "destination": "pack",
        "action": "store",
        "option_strings": [
          "-pack"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "package type"
      },
      {
        "id": "package.cli.argument.config",
        "destination": "config",
        "action": "store",
        "option_strings": [
          "-config"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "config name"
      },
      {
        "id": "package.cli.argument.input",
        "destination": "input",
        "action": "append",
        "option_strings": [
          "-input"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": [],
        "type": null,
        "description": "input dir (from FO_OUTPUT_PATH)"
      },
      {
        "id": "package.cli.argument.binary_output_postfix",
        "destination": "binary_output_postfix",
        "action": "store",
        "option_strings": [
          "-binary-output-postfix"
        ],
        "required": false,
        "nargs": 1,
        "choices": null,
        "default": "",
        "type": null,
        "description": "suffix appended to binary output dir names"
      },
      {
        "id": "package.cli.argument.output",
        "destination": "output",
        "action": "store",
        "option_strings": [
          "-output"
        ],
        "required": true,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "output dir"
      },
      {
        "id": "package.cli.argument.resource_pack_compress_level",
        "destination": "resource_pack_compress_level",
        "action": "store",
        "option_strings": [
          "-resource-pack-compress-level"
        ],
        "required": false,
        "nargs": 1,
        "choices": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9
        ],
        "default": null,
        "type": "int",
        "description": "override the resource pack compression level (zlib scale: 0 stores, 9 is the strongest)"
      },
      {
        "id": "package.cli.argument.resource_pack_jobs",
        "destination": "resource_pack_jobs",
        "action": "store",
        "option_strings": [
          "-resource-pack-jobs"
        ],
        "required": false,
        "nargs": 1,
        "choices": null,
        "default": "1",
        "type": "positive_job_count",
        "description": "maximum concurrent resource archives (default: FO_RESOURCE_PACK_JOBS or 1)"
      },
      {
        "id": "package.cli.argument.resource_pack_hash_library",
        "destination": "resource_pack_hash_library",
        "action": "store",
        "option_strings": [
          "-resource-pack-hash-library"
        ],
        "required": false,
        "nargs": 1,
        "choices": null,
        "default": null,
        "type": null,
        "description": "explicit host FNV-1a library; otherwise discover it under input Binaries/BuildTools-*"
      },
      {
        "id": "package.cli.argument.bundle_compress_level",
        "destination": "bundle_compress_level",
        "action": "store",
        "option_strings": [
          "-bundle-compress-level"
        ],
        "required": false,
        "nargs": 1,
        "choices": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9
        ],
        "default": null,
        "type": "int",
        "description": "override the bundle compression level (zlib scale: 0 stores, 9 is the strongest)"
      }
    ]
  },
  "summary": {
    "clause_count": 2,
    "option_count": 1,
    "target_count": 6,
    "platform_count": 6,
    "implemented_platform_count": 4,
    "pack_count": 19,
    "implemented_pack_count": 18,
    "artifact_pack_count": 8,
    "cli_argument_count": 17
  },
  "contract_digest": "13ad77ab5b1a53bc20e8c3a701043aebcc6c6c27dcc3e03b9d0fa696c6602b2f"
}
