> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 命令行工具概述 (tak.exe)

> Touch Adaptation Kit 命令行工具 (tak.exe)

使用本文通过 Touch Adaptation Kit (TAK) 创建和验证触控控件布局。

## takxconfig.json 和 .takx 文件

tak.exe 命令行工具操作的主要文件类型是未打包的适配包配置文件 (`takxconfig.json`) 或已打包的适配包 (`.takx`) 文件。
根据运行的命令，这些文件类型之一始终可用并代表整个触控适配包。为了向后兼容并使一些内部循环情景更容易，仍支持诸如 `--layout-path` 之类的旧参数，它们将覆盖 `takxconfig.json` 中的内容。

### 属性

`$schema` - *字符串*。触控适配包配置文件的 JSON 架构。根据选择的架构版本，这应类似于 `https://raw.githubusercontent.com/microsoft/xbox-game-streaming-tools/main/touch-adaptation-kit/schemas/takxconfig/v1/takxconfig.json`。

`version` - *字符串*。适配包的四段（例如 1.0.0.0）版本号。

`versionName` - *字符串*，*可选*。适配包版本的描述性名称。

`layouts` - *对象*。定义适配包 layouts 选项的对象。其中的 `path` 属性指定布局所在的相对路径。

`assets` - *对象*，*可选*。定义适配包 assets 选项的对象。其中的 `path` 属性指定资源所在的相对路径。

`context` - *对象*，*可选*。定义适配包 context 选项的对象。其中的 `path` 属性指定上下文文件所在的相对路径。

`languages` - *对象*，*可选*。定义适配包 languages 选项的对象。其中的 `items` 属性是一个数组，指定适配包支持的语言。

### 示例

```json theme={null}
{
  "$schema": "https://raw.githubusercontent.com/microsoft/xbox-game-streaming-tools/main/touch-adaptation-kit/schemas/takxconfig/v1/takxconfig.json",
  "layouts": {
    "path": "./layouts"
  },
  "assets": {
    "path": "./assets"
  },
  "context": {
    "path": "./context.json"
  },
  "languages": [
    "en",
    "en-US"
  ],
  "version": "2.0.0.0"
}
```

请参阅[我们的 GitHub](https://github.com/microsoft/xbox-game-streaming-tools/tree/main/touch-adaptation-kit/samples) 获取使用 `takxconfig.json` 文件的完整示例。

### 要求

文件版本由 .json 文件中的 `$schema` 属性指定。这指定可用的特定属性集，并在某些编辑器中启用 IntelliSense。

前述属性对最新支持的架构版本有效。有关较旧的架构属性，请参阅[我们的 GitHub](https://github.com/microsoft/xbox-game-streaming-tools/tree/main/touch-adaptation-kit/schemas)。

## 命令

使用下表所示的命令，以确保您的游戏在通过 XBOX 游戏串流游玩时触控控件按预期工作。

| 命令 | 说明 |
| - | - |
| [create](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-create-command.md) | 创建触控适配包的源内容或向现有适配包添加布局。 |
| [convert](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-convert-command.md) | 将旧版布局集文件转换为符合我们服务支持的最新格式标准的布局文件。 |
| [license](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-license-command.md) | 显示或接受 Touch Adaptation Kit 命令行工具的最终用户许可协议 (EULA)。 |
| [notice](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-notice-command.md) | 显示合并到本软件中的第三方材料的信息。 |
| [pack](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-pack-command.md) | 从一组源内容构建触控适配包。 |
| [serve](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command.md) | 提供触控适配包，以便客户端应用程序可以下载并使用它。 |
| [settings](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-settings-command.md) | 查看和设置应用程序设置。 |
| [takx-version](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-takx-version-command.md) | 确定触控适配包的版本以及所包含布局的最高架构版本。 |
| [unpack](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-unpack-command.md) | 将现有的触控适配包解包为其组件文件。 |
| [verify](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-verify-command.md) | 验证触控适配包的内容是否有效。 |
| [version](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-version-command.md) | 显示有关 Touch Adaptation Kit 命令行工具的版本信息。 |

## 选项

使用下表中的信息将适当的标志应用于所有命令。

| 选项 | 说明 |
| - | - |
| `-v`, `--verbosity` | 设置命令的输出详细程度。这些标志的有效值为 `Critical`、`Debug`、`Error`、`Information`、`None`、`Trace` 和 `Warning`。默认详细程度为 `Information`。 |
| `--version` | 显示版本信息。 |
| `--accept-license` | 在运行命令之前接受应用程序的许可协议。对自动化很有用。 |
| `--reset-appId` | 重置与您的机器关联的应用程序 ID。 |
| `-?`, `-h`, `--help` | 显示帮助和使用信息。 |

## 另请参阅

[触控入门](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-getting-started-with-touch.md)
[Web 内容测试应用 (CTA)](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-web-content-test-application.md)
[如何获取 TAK CLI](https://aka.ms/get-takcli)


## Related topics

- [Touch Adaptation Kit (TAK) 命令行工具参考](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/index.md)
- [其他独立工具](https://docs.xbox.com/zh-CN/tools/additional-tools.md)
- [Create 命令概述](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-create-command.md)
- [License 命令](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-license-command.md)
- [Notice 命令](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-notice-command.md)
