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

# Pack 命令

> Pack 命令

`pack` 命令用來將配置封裝成觸控調整組合 (takx)。

此組合可透過 [serve](/zh-TW/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command) 命令進行本機測試，或由您的 Microsoft 帳戶代表提交，透過 XBOX Game Streaming 提供給使用者。

下表顯示可搭配 `pack` 命令使用的各種選項。

| 選項 | 描述 |
| - | - |
| `--layout-path <layout-path>` | 要包含在組合中的根配置目錄路徑。此參數為必要。 |
| `--out`<br />`--output-path <output-path>` | 指定封裝後觸控調整組合的輸出檔案。通常是 .takx 檔案。此參數為必要。 |
| `--asset-path <asset-path>` | 要包含在組合中的根資產目錄路徑。如果組合沒有資產，則不需要此參數。 |
| `--context file <context-file>` | 要包含在組合中的內容檔案路徑。如果組合沒有內容，則不需要此參數。 |
| `--default-layout <default-layout>` | 預設配置的名稱。這應該與配置路徑中其中一個檔案的名稱相符。 |
| `--version <version>` | 觸控調整組合的內容版本，例如 1.0.0.0。針對某個遊戲提交給 Microsoft 的每個觸控調整組合，其版本號碼在語意上都必須大於先前提交過的任何觸控調整組合。可以使用 [takx-version](/zh-TW/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-takx-version-command) 命令來檢查現有組合的版本。串流遊戲時所使用之觸控調整組合的版本號碼，可以透過呼叫 [XGameStreamingGetTouchBundleVersion](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminggettouchbundleversion) 取得 |
| `--version-name <version-name>` | 觸控調整組合內容版本的名稱，例如 "DLC 1"。與版本號碼不同，版本名稱是選用的，而且對其格式沒有任何要求。可以使用 [takx-version](/zh-TW/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-takx-version-command) 命令來檢查現有組合的版本。串流遊戲時所使用之觸控調整組合的版本名稱，可以透過呼叫 [XGameStreamingGetTouchBundleVersion](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminggettouchbundleversion) 取得 |
| `--no-asset-optimization` | 確保不會為了有效率的儲存和通訊而最佳化資產。如果設定此選項，資產不會遭到修改。 |
| `--no-verify` | 確保不會驗證所產生的觸控調整組合是否有效。 |
| `--language <language>` | 要包含在所產生組合中之語言的 IETF 語言標記。如果多次指定此參數，則會包含所有提供的語言。如果未指定此參數，則會將來源目錄中找到的所有配置和資產包含在組合中。 |

### 範例

使用下列程式碼範例，將配置封裝成觸控調整組合。

***

將 layout-path 中的所有配置封裝成版本為 1.0.0.0 的單一觸控調整組合

```
C:\>tak pack --layout-path C:\tmp\layouts --out C:\tmp\MyGameLayouts.takx --version 1.0.0.0
Building touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'
Verifying touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'.
Verification complete. 0 error(s) and 0 warning(s) found.
```

***

將 layout-path 中的所有配置封裝成單一觸控調整組合。將配置 `introLayout` 設定為在遊戲提出特定配置要求之前向使用者顯示的配置

```
C:\>tak pack --layout-path C:\tmp\layouts --out C:\tmp\MyGameLayouts.takx --default-layout introLayout
Building touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'
Verifying touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'.
Verification complete. 0 error(s) and 0 warning(s) found.
```

***

僅將 layout-path 中的 en-us 配置封裝成單一觸控調整組合，且不進行任何資產最佳化

```
C:\>tak pack --layout-path C:\tmp\layouts --out C:\tmp\MyGameLayouts.takx --language en-us --no-asset-optimization
Building touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'
Verifying touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'.
Verification complete. 0 error(s) and 0 warning(s) found.
```

***

僅將 layout-path 中的 en-us 和 es-us 配置封裝成單一觸控調整組合。

```
C:\>tak pack --layout-path C:\tmp\layouts --out C:\tmp\MyGameLayouts.takx --language en-us --language es-us
Building touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'
Verifying touch adaptation bundle 'C:\tmp\MyGameLayouts.takx'.
Verification complete. 0 error(s) and 0 warning(s) found.
```

***

## 另請參閱

[觸控調整套件命令列工具 (tak.exe)](/zh-TW/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line)


## Related topics

- [Pack 命令](/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-pack-command.md)
- [Touch Adaptation Kit (TAK) 命令行工具参考](/zh-CN/build/core-features/common/game-streaming/tak-command-line-tool/index.md)
- [游戏打包、更新与流式安装测试](/zh-CN/build/core-features/common/packaging/title-packaging-streaming-install-testing.md)
- [Submission Validator (SubmissionValidator.dll)](/zh-CN/build/core-features/common/packaging/subval/submissionvalidator.md)
- [包（经典体验）](/zh-CN/publishing/game-publishing/concepts/packages-overview.md)
