> ## 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 CLI を使用したタッチ コントロール レイアウトのデプロイ

> タッチ操作レイアウトのデプロイ

## 概要

[タッチレイアウトを構築](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-building-touch-layout.md)したら、ゲーム内でそれらを操作したいと考えるでしょう。

## 前提条件

レイアウトをデプロイして表示するには、以下が必要です。

* [Touch Adaptation Kit Command Line Tool (tak.exe)](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line.md) がインストールされた Windows PC。
* [Web Content Test Application](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/game-streaming-web-content-test-application.md)、[Android Content Test Application (非推奨)](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/game-streaming-android-content-test-application.md)、または [Windows PC Content Test Application (非推奨)](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/game-streaming-windows-pc-content-test-application.md) がインストールされたデバイス。
* デプロイして表示したいレイアウトのセット。

## レイアウトのデプロイ

### 1. レイアウトの配信

[Touch Adaptation Kit Command Line Tool (tak.exe)](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line.md) がインストールされている Windows PC 上で、[Serve コマンド](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command.md) を使用して、レイアウトを要求するデバイスがアクセスできるようにします。

```pwsh theme={null}
C:\Program Files (x86)\Microsoft GDK\bin>tak serve --layout-path C:\MyGameLayouts
Verifying touch adaptation bundle 'C:\MyGameLayouts '.
Now listening on: http://0.0.0.0:9269
Application started. Press Ctrl+C to shut down.
Hosting environment: Production
Content root path: C:\MyGameLayouts
```

### 2. Content Test Application を読み込むように構成する

Content Test Application の設定で、Touch Adaptation Settings (開発者セクション内) の構成を入力します。

* **Enable sideload** がオンになっていることを確認します。
* レイアウトを配信している PC のアドレス (ポートを含む) を入力します。

> [!NOTE]
>
> [Web Content Test Application](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/game-streaming-web-content-test-application.md) を **Safari** で使用する場合、または `serve` コマンドを実行している **リモート PC** に接続する場合は、サイドロード アドレスが `https` で始まり、`--certificate-file` オプションが使用されていることを確認してください。セキュアな (HTTPS) サイドロード サーバーの起動に関する詳細は、[Serve コマンド](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/tak-command-line-tool/game-streaming-tak-command-line-serve-command.md) を参照してください。

* レイアウトへの変更を接続中のすべてのクライアントで即時に反映させたい場合は自動更新を有効にします (それ以外の場合、更新は新規のストリーミング接続が開始されたときにのみ行われます)。

![Developer Settings](https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-cta-android-developer-settings.png?fit=max\&auto=format\&n=sIrPFR_ir_sNKVEv\&q=85\&s=9256baca111dbef55c2b30943854da88).

### 3. ゲームをストリーミングする

各ストリーミング接続時に、CTA は TAK サーバーに接続し、最新のレイアウトをダウンロードします。

![Layout downloaded](https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-cta-android-layout-download.png?fit=max\&auto=format\&n=sIrPFR_ir_sNKVEv\&q=85\&s=19d0d50c10717892e8456150b0afb598).

レイアウトが要求されると、`serve` コマンドをホストしている PC 上でリクエストとダウンロードが表示されます。

```
C:\Program Files (x86)\Microsoft GDK\bin>tak serve --layout-path C:\MyGame\layouts
Verifying touch adaptation bundle 'C:\MyGame\layouts'.
Now listening on: http://0.0.0.0:9269
Application started. Press Ctrl+C to shut down.
Hosting environment: Production
Content root path: C:\MyGame\layouts
Request starting HTTP/1.1 POST http://192.168.1.1:9269/connection/negotiate?negotiateVersion=1  0
Request finished in 1.6283ms 200 application/json
Request starting HTTP/1.1 GET http://192.168.1.1:9269/connection?id=3u0Xs_Dlwn-J1mREHTcG5w
Request starting HTTP/1.1 GET http://192.168.1.1:9269/v1/tabs/active/download
Request finished in 3.9865ms 200 application/octet-stream
```

### 4. レイアウトの選択

ストリーミング セッションが開始された後、左上隅の `...` ボタンを選択してストリーム内オーバーレイから Developer、次に TAK を選択することで、利用するタッチ レイアウトを選択できます。

![Select layout.](https://mintcdn.com/microsoft-4404708b/sIrPFR_ir_sNKVEv/images/gdk/features/common/game-streaming-cta-android-select-layout.gif?s=17361970f8265532f37be519fab3ad4e)


## Related topics

- [タッチ コントロール レイアウトの構築](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-building-touch-layout.md)
- [ゲーム状態に基づくタッチ コントロール レイアウトの変更](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-changing-layouts-game-state.md)
- [タッチ コントロール構築のデザイナーズ ガイド](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-designers-guide.md)
- [XBOX ゲーム ストリーミング向けのタッチ操作レイアウトを作成する](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/building-touch-layouts/index.md)
- [タッチ入門](https://docs.xbox.com/ja-jp/build/core-features/common/game-streaming/game-streaming-getting-started-with-touch.md)
