ページ ツリー

比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

その他の設定は以下の通りです。
  ・ルートディレクトリ:/master
  ・サーバエクステンション用ディレクトリ:/master/narrow_workspace_mappings
  ・自動ログインユーザ:super

.サーバエクステンションのスケルトン作成

  "/master/narrow_workspace_mappings" ディレクトリに移動し、スケルトンを作成します。

...

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行結果

Extension template created in the 'narrow_workspace_mappings' directory.
※"main.lua"、"manifest.json"の2ファイルが作成されます。

2.main.luaの編集
  mainmain.luaファイルを編集してロジックを追加します。

  今回の作業ではファイルの編集ではなく、今回の作業ではファイルの編集ではなく、"narrow_workspace_mappings"の"main.lua"をダウンロードサイトより入手し、"/master/narrow_workspace_mappings"ディレクトリ内のファイルを置き換えます。

情報
iconfalse
titlePerforce Workshop(ダウンロードサイト)

narrow_workspace_mappings

3.".p4-extension"ファイルの作成
  
クライアントで"narrow_workspace_mappings.p4-extension"ファイルを作成します。
  ".p4-extension"ファイルは、サーバエクステンションをサーバにインストールする際に必要です。

...

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行結果

Extension packaged successfully.
※"narrow_workspace_mappings.p4-extension"ファイルが作成されます

4.サーバエクステンションのインストール(確認)
  作成したサーバエクステンションを、Helixサーバに実際にインストールする前に、レポートモードで確認します。作成したサーバエクステンションを、Helixサーバに実際にインストールする前に、レポートモードで確認します。

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行コマンド

  p4 extension --install server-extension-name.p4-extension
例:p4 extension --install narrow_workspace_mappings.p4-extension

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行結果

Would install Extension 'ExampleInc::narrow_workspace_mappings'
   ⋮
Version: '2019.1'
UUID: 22BB3349-4AD5-8617-203B-575747XXXXXX
Developer: Perforce Software Inc.
Description: [Example Extension, sample code] Restrict client views to have a configurable minimum
directory depth. This is to prevent user from
having a wide open workspace leading to getting unecessary files.
E.g. reject a mapping of //depot/... and allow //depot/some/more/narrow/path/...
License: BSD
Homepage URL: https://swarm.workshop.perforce.com/files/guest/perforce_software/extensions/2019-1
Compatible products: p4d
   ⋮
This was report mode. Use -y to perform the operation.

5.サーバエクステンションのインストール(実行)
       実行結果が確認できたら 実行結果が確認できたら"-y"オプションを追加し、インストールを実行します。

...

6.インストールされているサーバエクステンションの確認
  サーバエクステンションがインストールされていることを確認しますサーバエクステンションがインストールされていることを確認します

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行コマンド

p4 extension --list –type=extensions

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行結果

... extension ExampleInc::narrow_workspace_mappings
... rev 1
... developer Perforce Software Inc.
... description-snippet [Example Extension,
... UUID 22BB3349-4AD5-8617-203B-575747XXXXXX
... version 2019.1
... enabled false
... arch-dir server.extensions.dir/22BB3349-4AD5-8617-203B-575747XXXXXX/1-arch
... data-dir server.extensions.dir/22BB3349-4AD5-8617-203B-575747XXXXXX/1-data

7.サーバエクステンション構成のグローバル設定
  インストールしたサーバエクステンションが、自動ログインに使用するユーザをsuperにするため、グローバル設定を変更します。インストールしたサーバエクステンションが、自動ログインに使用するユーザをsuperにするため、グローバル設定を変更します。
  ※コマンドで使用するネームスペース名は※コマンドで使用するネームスペース名は"manifest.json"ファイル内で定義されています。ここでは"ExampleInc"がネームスペース名となっています。

...

情報
title参照ページ(英文)
「Helix Core Extensions Developer Guide (2019.1)」- Server extension configuration (global and instance specs)

8.サーバエクステンション構成のインスタンス設定
  
インストールしたサーバエクステンションのインスタンス設定を変更します。
  本手順では、「ワークスペースのビュー定義でディポパスの階層数を3より少ない」をチェックするサーバエクステションとするため、下記の変更を行います本手順では、「ワークスペースのビュー定義でディポパスの階層数を3より少ない」をチェックするサーバエクステションとするため、下記の変更を行います

パネル
borderColorgray
borderWidth1
borderStylesolid
title実行コマンド

  p4 extension --configure name-space-name::server-extension-name --name extCfg
例:p4 extension --configure ExampleInc::narrow_workspace_mappings --name extCfg

...

9.インストールしたサーバエクステンションの動作確認
  P4Vを起動し、クライアントワークスペースのビューの定義を表示しますP4Vを起動し、クライアントワークスペースのビューの定義を表示します
  ① [ 接続(C) ] → [ 現在のワークスペースを編集(W) ]を選択します。

  

  ② ディポパスの階層を[ 3 ] よりも少ない数で指定します。
      指定後[ OK ]をクリックします。

  

  ③ ディポパスの階層が確認され、下記メッセージが表示されます。

  

  確認は以上です確認は以上です