このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。
compiler.build.ProductionServerArchiveOptions
構文
説明
は、opts
= compiler.build.ProductionServerArchiveOptions(FunctionFiles
)FunctionFiles
で指定された MATLAB® 関数を使用して ProductionServerArchiveOptions
オブジェクトを作成します。ProductionServerArchiveOptions
オブジェクトを関数 compiler.build.productionServerArchive
(MATLAB Production Server) への入力として使用します。
は、名前と値の引数を 1 つ以上使用してオプションが指定された opts
= compiler.build.ProductionServerArchiveOptions(FunctionFiles
,Name,Value
)ProductionServerArchiveOptions
オブジェクトを作成します。オプションには、アーカイブ名、出力ディレクトリ、含める追加ファイルなどがあります。
例
デプロイ可能アーカイブ オプション オブジェクトの作成
関数ファイルから ProductionServerArchiveOptions
オブジェクトを作成します。
この例では、
にあるファイル matlabroot
\extern\examples\compilermagicsquare.m
を使用します。
appFile = fullfile(matlabroot,'extern','examples','compiler','magicsquare.m'); opts = compiler.build.ProductionServerArchiveOptions(appFile)
opts =
ProductionServerArchiveOptions with properties:
ArchiveName: 'magicsquare'
FunctionFiles: {'C:\Program Files\MATLAB\R2023a\extern\examples\compiler\magicsquare.m'}
FunctionSignatures: ''
AdditionalFiles: {}s+ AutoDetectDataFiles: ons+ ObfuscateArchive: offs+ SupportPackages: {'autodetect'}
OutputDir: '.\magicsquareproductionServerArchive'
Verbose: off
ドット表記を使用して、既存の ProductionServerArchiveOptions
オブジェクトのプロパティ値を変更することができます。たとえば、詳細な出力を有効にします。
opts.Verbose = 'on'
opts =
ProductionServerArchiveOptions with properties:
ArchiveName: 'magicsquare'
FunctionFiles: {'C:\Program Files\MATLAB\R2023a\extern\examples\compiler\magicsquare.m'}
FunctionSignatures: ''
AdditionalFiles: {}s+ AutoDetectDataFiles: ons+ ObfuscateArchive: offs+ SupportPackages: {'autodetect'}
OutputDir: '.\magicsquareproductionServerArchive'
Verbose: on
DotNETAssemblyOptions
オブジェクトを関数 compiler.build.productionServerArchive
への入力として使用して、Production Server アーカイブをビルドします。
compiler.build.productionServerArchive(opts);
デプロイ可能アーカイブ オプション オブジェクトのカスタマイズ
ProductionServerArchiveOptions
オブジェクトを使用して Production Server アーカイブを作成します。
関数ファイル myfunc1.m
と myfunc2.m
を使用して ProductionServerArchiveOptions
オブジェクトを作成します。名前と値の引数を使用して出力ディレクトリを指定し、詳細な出力を有効にし、データ ファイルの自動検出を無効にします。
opts = compiler.build.ProductionServerArchiveOptions(["myfunc1.m","myfunc2.m"],... 'ArchiveName','MyServer',... 'OutputDir','D:\Documents\MATLAB\work\ProductionServer',... 'AutoDetectDataFiles','off')
opts = ProductionServerArchiveOptions with properties: ArchiveName: 'MyServer' FunctionFiles: {2×1 cell} FunctionSignatures: '' AdditionalFiles: {} AutoDetectDataFiles: off SupportPackages: {'autodetect'} OutputDir: 'D:\Documents\MATLAB\work\ProductionServer' Verbose: off
ドット表記を使用して、既存の ProductionServerArchiveOptions
オブジェクトのプロパティ値を変更することができます。たとえば、詳細な出力を有効にします。
opts.Verbose = 'on'
opts = ProductionServerArchiveOptions with properties: ArchiveName: 'MyServer' FunctionFiles: {2×1 cell} FunctionSignatures: '' AdditionalFiles: {} AutoDetectDataFiles: off SupportPackages: {'autodetect'} OutputDir: 'D:\Documents\MATLAB\work\ProductionServer\' Verbose: on
ProductionServerArchiveOptions
オブジェクトを関数への入力として使用して、Production Server アーカイブをビルドします。
buildResults = compiler.build.productionServerArchive(opts);
入力引数
FunctionFiles
— MATLAB 関数を実装するファイル
文字ベクトル | string スカラー | 文字ベクトルの cell 配列 | string 配列
MATLAB 関数を実装するファイル。文字ベクトル、string スカラー、string 配列、または文字ベクトルの cell 配列として指定します。ファイル パスは現在の作業ディレクトリを基準とした相対パス、または絶対パスにできます。ファイルには .m
拡張子が必要です。
例: ["myfunc1.m","myfunc2.m"]
データ型: char
| string
| cell
名前と値の引数
オプションのペアの引数を Name1=Value1,...,NameN=ValueN
として指定します。ここで、Name
は引数名で、Value
は対応する値です。名前と値の引数は他の引数の後に指定する必要がありますが、ペアの順序は考慮されません。
R2021a より前では、コンマを使用してそれぞれの名前と値を区切り、Name
を引用符で囲みます。
例: 'Verbose','on'
ArchiveName
— デプロイ可能なアーカイブの名前
文字ベクトル | string スカラー
デプロイ可能なアーカイブの名前。文字ベクトルまたは string スカラーとして指定します。生成されたアーカイブの既定の名前は、FunctionFiles
引数の最初のエントリです。
例: 'ArchiveName','MyMagic'
データ型: char
| string
AutoDetectDataFiles
— データ ファイルを自動的に含めるためのフラグ
'on'
(既定値) | on/off logical 値
データ ファイルを自動的に含めるためのフラグ。'on'
または 'off'
、もしくは数値または logical の 1
(true
) または 0
(false
) として指定します。'on'
の値は true
と等価であり、'off'
は false
と等価です。したがって、このプロパティの値を logical 値として使用できます。値は matlab.lang.OnOffSwitchState
型の on/off logical 値として格納されます。
このプロパティを
'on'
に設定した場合、特定の関数 (load
やfopen
など) の入力として指定されるデータ ファイルは自動的に Production Server アーカイブに含められます。このプロパティを
'off'
に設定した場合、データ ファイルはAdditionalFiles
プロパティを使用してアーカイブに追加しなければなりません。
例: 'AutoDetectDataFiles','off'
データ型: logical
FunctionSignatures
— JSON ファイルへのパス
文字ベクトル | string スカラー
FunctionFiles
にリストされたすべての関数のシグネチャを詳述した JSON ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。関数シグネチャの指定の詳細については、MATLAB Function Signatures in JSON (MATLAB Production Server)を参照してください。
例: 'FunctionSignatures','D:\Documents\MATLAB\work\magicapp\signatures.json'
データ型: char
| string
ObfuscateArchive
— デプロイ可能なアーカイブを難読化するためのフラグ
'off'
(既定値) | on/off logical 値
デプロイ可能なアーカイブを難読化するためのフラグ。'on'
または 'off'
、もしくは数値または logical の 1
(true
) か 0
(false
) として指定します。'on'
の値は true
と等価であり、'off'
は false
と等価です。したがって、このプロパティの値を logical 値として使用できます。値は matlab.lang.OnOffSwitchState
型の on/off logical 値として格納されます。
このプロパティを
'on'
に設定した場合、デプロイ可能なアーカイブのフォルダー構造およびファイル名はエンド ユーザーに対して難読化され、MATLAB ファイルに含まれているユーザー コードおよびデータはアーカイブ内のユーザー パッケージに配置されます。また、すべての.m
ファイルがパッケージ化の前に P ファイルに変換されます。このオプションは、-j
および-s
を指定してmcc
を使用するのと等価です。このプロパティを
'off'
に設定した場合、デプロイ可能なアーカイブは難読化されません。これは既定の動作です。
例: 'ObfuscateArchive','on'
データ型: logical
OutputDir
— 出力ディレクトリへのパス
文字ベクトル | string スカラー
ビルド ファイルが保存される出力ディレクトリへのパス。文字ベクトルまたは string スカラーとして指定します。このパスは現在の作業ディレクトリを基準とした相対パス、または絶対パスにできます。
ビルド フォルダーの既定の名前は、アーカイブ名に productionServerArchive
を追加したものです。
例: 'OutputDir','D:\Documents\MATLAB\work\MyMagicproductionServerArchive'
SupportPackages
— サポート パッケージ
'autodetect'
(既定値) | 'none'
| string スカラー | 文字ベクトルの cell 配列 | string 配列
含めるサポート パッケージ。次のオプションのいずれかとして指定します。
'autodetect'
(既定) — 依存関係の解析プロセスにより、必要なサポート パッケージが自動的に検出され、含められます。'none'
— サポート パッケージは含められません。このオプションを使用すると、ランタイム エラーの原因となる可能性があります。string スカラー、文字ベクトル、または文字ベクトルの cell 配列 — 指定されたサポート パッケージのみが含められます。インストールされている、または特定のファイルで使用されるサポート パッケージのリストを表示するには、
compiler.codetools.deployableSupportPackages
を参照してください。
例: 'SupportPackages',{'Deep Learning Toolbox Converter for TensorFlow Models','Deep Learning Toolbox Model for Places365-GoogLeNet Network'}
データ型: char
| string
| cell
Verbose
— ビルドの詳細
'off'
(既定値) | on/off logical 値
ビルドの詳細。'on'
または 'off'
、もしくは数値または logical 1
(true
) または 0
(false
) として指定します。'on'
の値は true
と等価であり、'off'
は false
と等価です。したがって、このプロパティの値を logical 値として使用できます。値は matlab.lang.OnOffSwitchState
型の on/off logical 値として格納されます。
このプロパティを
'on'
に設定した場合、MATLAB コマンド ウィンドウには、ビルド プロセス中のコンパイラ出力を示す進行状況情報が表示されます。このプロパティを
'off'
に設定した場合、コマンド ウィンドウには進行状況の情報は表示されません。
例: 'Verbose','off'
データ型: logical
出力引数
opts
— Production Server アーカイブのビルド オプション
ProductionServerArchiveOptions
オブジェクト
Production Server アーカイブのビルド オプション。ProductionServerArchiveOptions
オブジェクトとして返されます。
バージョン履歴
R2020b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)