2015年8月4日火曜日

PerforceサーバーのTypemapの設定をする

前回、Windows 8.1にPerforceサーバーを立てることに成功しましたが、まだTypeMapの設定をしてなかったので、今回はその設定まわりのメモです。

TypeMapで、バージョン管理するファイルの種別や、排他的編集など属性の設定を行えます。
設定にはp4コマンドラインクライアントを使いますが、その前に、PerforceサーバーがUnicode modeになっている場合、p4コマンドがどの文字コードを使用するか指定しなければなりません。

コントロールパネル > システムとセキュリティ > システム > システムの詳細設定 > 環境変数から「システム環境変数」を設定します。コマンドプロンプトがshiftjisを使用している場合は、変数P4CHARSETに、値shiftjisを設定します。(下図)


sysenv.jpg

次にTypeMapの設定ファイルを開きます。
コマンドプロンプト(管理者)から、以下のコマンドを入力します。
p4 typemap

デフォルト設定だと、メモ帳でTypeMapファイルがオープンされます。
UE4プロジェクトを管理する場合を考慮して、以下のUE4ドキュメントを参考にして設定しました。
# Perforce File Type Mapping Specifications.
#
#  TypeMap:    a list of filetype mappings; one per line.
#        Each line has two elements:
#
#          Filetype: The filetype to use on 'p4 add'.
#
#          Path:     File pattern which will use this filetype.
#
# See 'p4 help typemap' for more information.

TypeMap:
    binary+w //depot/....exe
    binary+w //depot/....dll
    binary+w //depot/....lib
    binary+w //depot/....app
    binary+w //depot/....dylib
    binary+w //depot/....stub
    binary+w //depot/....ipa
    binary //depot/....bmp
    binary //depot/....png
    binary //depot/....jpg
    binary //depot/....tif
    binary //depot/....tiff
    text //depot/....txt
    text //depot/....ini
    text //depot/....config
    text //depot/....cpp
    text //depot/....h
    text //depot/....c
    text //depot/....cs
    text //depot/....m
    text //depot/....mm
    text //depot/....py
    binary+l //depot/....uasset
    binary+l //depot/....umap
    binary+l //depot/....upk
    binary+l //depot/....udk
uassetファイルはbinary+lと設定されているので、バイナリファイルで、排他的(複数同時編集不可)が設定されているのが分かります。+wはいつでも書き込み可という設定です。exeやdllなどは、ビルドによって常に書き換えられるので、このような設定にしておかないといけないようです。

TypeMapの詳しいフォーマットは、以下のコマンドで、
p4 help typemap
ファイルタイプの一覧は、以下のコマンドで見ることができます。
p4 help filetypes

depotが複数ある場合は、同ファイルに書き足していきます。

関連記事

0 件のコメント:

コメントを投稿

Related Posts Plugin for WordPress, Blogger...