Skip to content

Windows環境をサポートする #89

@bigdra50

Description

@bigdra50

概要

Windows環境での動作をサポートする。現状はmacOS/Linuxのみ対応しており、Windows上では複数箇所で動作しない。

関連: #88 (Relay Serverのadd_signal_handlerがWindowsで未サポート)

対応が必要な箇所

Critical(動作しない)

  • Relay Server のシグナルハンドラ (relay/server.py L696-697)

  • Unity側のプロセス管理 (UnityBridge/Editor/RelayServerLauncher.cs L160, 198)

    • GetProcessIdForPort()/usr/sbin/lsof をハードコード
    • KillProcess()/bin/kill をハードコード
    • Windows では netstat -ano / taskkill /PID 等を使う
  • Unity側のPATH設定 (UnityBridge/Editor/RelayServerLauncher.cs L117-123, 221-227)

    • /opt/homebrew/bin 等 Unix パスのみ追加している
    • Windows では %APPDATA%\Python, %LOCALAPPDATA%\Programs\Python 等を追加する

High(機能欠落)

  • シェル補完 (unity_cli/cli/commands/completion.py L13-32)

    • bash/zsh/fish のみ対応。PowerShell 補完が未対応
  • ログディレクトリ (relay/server.py L707)

    • XDG仕様の ~/.local/state にフォールバック
    • Windows では %LOCALAPPDATA% を使うべき
  • ステータスファイルディレクトリ (relay/status_file.py L60, BridgeStatusFile.cs L28)

    • ~/.unity-bridge をハードコード
    • 動作はするが Windows の慣習に合わない

Medium(テスト・細部)

  • テストのパス (tests/test_relay_logging.py L66, 78)

    • /tmp/test-xdg をハードコード → tempfile.mkdtemp() を使う
  • Hub パス (unity_cli/hub/paths.py L32-49)

    • C:\Program Files ハードコード → %ProgramFiles% 環境変数を使う

対応不要(既にクロスプラットフォーム)

  • Python側のパス操作は pathlib.Path を使用済み
  • C#側のパス結合は Path.Combine() を使用済み
  • TCP通信部分はクロスプラットフォーム
  • Unity Bridge のインスタンスID生成は Path.GetFullPath() を使用済み

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions