

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Proton での互換性のトラブルシューティング
<a name="troubleshoot-compatibility-wp-proton"></a>

 このステップでは、独自のマシンに Proton をセットアップして、Amazon GameLift Streams アプリケーションと Proton 間の互換性の問題をトラブルシューティングできるようにします。Amazon GameLift Streams サーバーを使用せずにシミュレートされた環境でアプリケーションを実行すると、アプリケーションとランタイム環境に固有の問題を特定するのに役立ちます。

## 前提条件
<a name="troubleshoot-compatibility-wp-proton-prereq"></a>
+  GPU ドライバーがインストールされた Ubuntu 22.04 LTS。手順については、[ローカルマシンをセットアップする](troubleshoot-compatibility-setup-local.md)「」または「」を参照してください[リモートマシンをセットアップする](troubleshoot-compatibility-setup-remote.md)。

## Proton をインストールする
<a name="troubleshoot-compatibility-wp-proton-install"></a>

Ubuntu 22.04 LTS マシンに Proton をインストールするには、次のスクリプトを使用して、Proton [ GitHub リポジトリからテストする Proton ](https://github.com/ValveSoftware/Proton/)のバージョンをクローン、ビルド、設定します。

1. 次のコードをコピーして、Ubuntu 22.04 LTS マシン`proton-setup.sh`の というファイルに貼り付けます。

   ```
   #!/bin/bash
   # This is a script to build Proton. The default build is a tag from the 
   # experimental_9.0 branch of Proton, but can be changed as a parameter to this script.
   #
   # Usage: ./proton-setup.sh [optional proton_branch_name {default: experimental-9.0-20241121b}]
   set -e
   
   sudo apt install -y podman make git
   
   # clone proton from github, recurse submodules
   # if no proton git link is supplied, use a default tag from the experimental_8.0 branch
   PROTON_BRANCH=${1:-"experimental-9.0-20241121b"}
   PROTON_BUILD_DIR=protonBuild
   PROTON_DIR=$(pwd)/proton
   if git clone https://github.com/ValveSoftware/Proton.git --recurse-submodules --branch $PROTON_BRANCH proton;
   then
   	echo "Successfully cloned Proton and its submodules."
   else
   	echo "Warning: a proton directory/repository already exists. It is recommended to delete this folder and re-run this script unless it is a valid repository with initialized submodules."
   fi
   
   if [ -d $PROTON_BUILD_DIR ];
   then
   	echo "Error: protonBuild directory already exists. Delete this folder first to create a fresh build of Proton before re-running this script."
   	exit 1
   fi
   mkdir $PROTON_BUILD_DIR
   cd $PROTON_BUILD_DIR
   $PROTON_DIR/configure.sh --enable-ccache --container-engine=podman
   
   # build proton
   echo "Building Proton"
   make
   echo "Done building Proton!"
   
   # prepare proton for execution
   cd dist
   mkdir compatdata
   if [ -e ./dist ]; then
     PROTON_FILES=dist
   elif [ -e ./files ]; then
     PROTON_FILES=files
   fi
   cp version $PROTON_FILES/
   echo "Finished installing proton. Proton binary location: $(pwd)/proton"
   echo "STEAM_COMPAT_DATA_PATH: $(pwd)/compatdata"
   echo "STEAM_COMPAT_CLIENT_INSTALL_PATH: anything"
   ```

1. このステップでは、 Proton セットアップスクリプトを実行して、Proton と追加の依存関係のクローンを作成してインストールします。スクリプトは、インストールする Proton バージョンのタグまたはブランチ名を引数として受け入れます。Amazon GameLift Streams が提供する Proton のカスタムビルドのいずれかをシミュレートするには、以下のそのバージョンの手順を使用します。
**注記**  
 GitHub からのクローン作成には時間がかかることが予想されます。ダウンロードするサブモジュールが多数あり、合計は数ギガバイトです。

    ターミナルで、`proton-setup.sh`スクリプトを実行し、Proton バージョンブランチを指定します。
   +  **組み込み Proton バージョン** 
     + Proton 10.0-4 (`PROTON-20260204`) の場合は、[proton-10.0-4](https://github.com/ValveSoftware/Proton/tree/proton-10.0-4) を使用します。

       ```
       proton-setup.sh proton-10.0-4
       ```
     + Proton 9.0-2 (`PROTON-20250516`) の場合は、 [experimental-9.0-20241121b](https://github.com/ValveSoftware/Proton/tree/experimental-9.0-20241121b) を使用します。

       ```
       proton-setup.sh experimental-9.0-20241121b
       ```
     + Proton 8.0-5 (`PROTON-20241007`) の場合は、 [experimental-8.0-20240205](https://github.com/ValveSoftware/Proton/tree/experimental-8.0-20240205) を使用します。

       ```
       proton-setup.sh experimental-8.0-20240205
       ```

       通常、追加のソースコードは必要ありません。ただし、Electra Media Player (Unreal Engine プラグイン) で問題が発生した場合は、[https://github.com/ValveSoftware/wine/pull/257](https://github.com/ValveSoftware/wine/pull/257) にある修正を使用することをお勧めします。
**注記**  
 Proton 8.0-2c (`PROTON-20230704`) の場合、Amazon GameLift Streams は独自のビルドを使用しますが、ローカルでボールドすることはできません。
   +  **推奨されるカスタム Proton バージョン** 

      カスタム Proton バージョンの場合は、Proton experimental\_8.0 ブランチを使用することをお勧めします。

     ```
     proton-setup.sh experimental_8.0
     ```
   +  **その他のカスタム Proton バージョン** 

      他の Proton バージョンでは、[Proton リリース](https://github.com/ValveSoftware/Proton/releases)に記載されている正確なブランチ名またはタグ名を使用します。

     ```
     proton-setup.sh {{branch-or-tag-name}}
     ```

    インストールが成功した場合、ターミナルの出力は次のようになります。

   ```
   ...
   Done building Proton!
   Finished preparing proton. Proton binary location: /home/test/protonBuild/dist/proton
   STEAM_COMPAT_DATA_PATH: /home/test/protonBuild/dist/compatdata
   STEAM_COMPAT_CLIENT_INSTALL_PATH: anything
   ```

    次のステップで Proton を実行する必要があるため、出力から次の変数を書き留めます。
   + Proton バイナリの場所
   + `STEAM_COMPAT_DATA_PATH`
   + `STEAM_COMPAT_CLIENT_INSTALL_PATH`

## Proton でアプリケーションを実行する
<a name="troubleshoot-compatibility-wp-proton-run"></a>

 次の手順では、アプリケーション実行可能ファイルが にあることを前提としています`path/myapplication/bin/application.exe`。アプリケーションのパスとファイル名に置き換えます。
+ ターミナルで、アプリケーション実行可能ファイルがあるフォルダに移動します。

  ```
  cd {{path/myapplication/bin/application.exe}}
  ```
+ Proton でアプリケーションを実行します。Proton バイナリの場所と、前のステップで取得した環境変数を使用します。

  ```
  STEAM_COMPAT_DATA_PATH=/home/test/protonBuild/dist/compatdata STEAM_COMPAT_CLIENT_INSTALL_PATH=anything /home/test/protonBuild/dist/proton run application.exe
  ```

 これで、アプリケーションは起動を試みるはずです。アプリケーションがローカルで起動し、Amazon GameLift Streams では起動しない場合、Amazon GameLift Streams APIs を呼び出す際の設定の問題が原因である可能性があります。API コールパラメータが正しいことを確認します。それ以外の場合は、デバッグの次のステップに進みます。

## ログファイルを使用してアプリケーションをデバッグする
<a name="troubleshoot-compatibility-wp-proton-debug-logs"></a>

 ローカル Proton 環境で実行されているアプリケーションに問題がある場合は、出力ログを確認します。ログには、アプリケーションとランタイム環境からの出力が含まれます。アプリケーション側でアプリケーションが問題を検出できないトレース。

 ログ出力を などのテキストファイルにダンプするには`proton.log`、次のコマンドを使用します。

```
STEAM_COMPAT_DATA_PATH=/home/test/protonBuild/dist/compatdata STEAM_COMPAT_CLIENT_INSTALL_PATH=anything /home/test/protonBuild/dist/proton run application.exe &>proton.log
```

 また、Proton は、問題の原因が、" プラグイン、実装されていない関数、dlls の欠落などであるかどうかも示します。詳細については、[「Quine HQ のデバッグ](https://wiki.winehq.org/Wine_Developers_Guide/Debugging_Wine)」を参照してください。アプリケーション側で修正できない Proton または Coffee エラーがログに見つかった場合は、 AWS アカウントマネージャーに問い合わせるか、[AWS re:Post](https://repost.aws/tags/TAOU7EpUOuTQSSWmIHCfb2fQ/amazon-gamelift-streams) に質問を投稿して、さらなるデバッグに役立ててください。