compiler.package.InstallerOptions
MATLAB Compiler パッケージ インストーラーの作成オプション
構文
説明
は、関数 opts
= compiler.package.InstallerOptions(results
)compiler.build
から生成された compiler.build.Results
オブジェクト results
を使用して、既定の InstallerOptions
オブジェクト opts
を作成します。InstallerOptions
オブジェクトは、関数 compiler.package.installer
に入力として渡されます。
は、opts
= compiler.package.InstallerOptions(results
,Name,Value
)compiler.build.Results
オブジェクト results
と、名前と値の引数を 1 つ以上使用して指定した追加オプションを使って、InstallerOptions
オブジェクト opts
を作成します。InstallerOptions
オブジェクトは、関数 compiler.package.installer
に入力として渡されます。
は、opts
= compiler.package.InstallerOptions('ApplicationName',appName
,Name,Value
)appName
で指定されたアプリケーション名と、名前と値の引数で指定された追加のカスタマイズを使って、InstallerOptions
オブジェクト opts
を作成します。InstallerOptions
オブジェクトは、関数 compiler.package.installer
に入力として渡されます。
例
結果を使用したインストーラー オプション オブジェクトの作成
関数 compiler.build.standaloneApplication
からの結果と、名前と値の引数として指定された追加オプションを使用して、InstallerOptions
オブジェクトを作成します。
この例では、
にあるファイル matlabroot
\extern\examples\compilermagicsquare.m
を使用してスタンドアロン アプリケーションをビルドします。
appFile = fullfile(matlabroot,'extern','examples','compiler','magicsquare.m'); results = compiler.build.standaloneApplication(appFile)
results = Results with properties: BuildType: 'standaloneApplication' Files: {2×1 cell} Options: [1×1 compiler.build.StandaloneApplicationOptions]
opts = compiler.package.InstallerOptions(results,'AuthorName','Frog')
opts = InstallerOptions with properties: RuntimeDelivery: 'web' InstallerSplash: 'C:\Program Files\MATLAB\R2022a\toolbox\toolbox\compiler\packagingResources\default_splash.png' InstallerIcon: 'C:\Program Files\MATLAB\R2022a\toolbox\compiler\packagingResources\default_icon_48.png' InstallerLogo: 'C:\Program Files\MATLAB\R2022a\toolbox\compiler\packagingResources\default_logo.png' AuthorName: 'Frog' AuthorEmail: '' AuthorCompany: '' Summary: '' Description: '' InstallationNotes: '' Shortcut: '' Version: '' InstallerName: 'MyAppInstaller' ApplicationName: 'magicsquare' OutputDir: '.\magicsquare' DefaultInstallationDir: 'C:\Program Files\magicsquare'
ドット表記を使用して、既存の InstallerOptions
オブジェクトのプロパティ値を変更することができます。たとえば、インストーラー名を MyMagicInstaller
に設定します。
opts.InstallerName = 'MyMagicInstaller'
スタンドアロン アプリケーションのインストーラーを作成するには、Results
オブジェクトと InstallerOptions
オブジェクトを関数 compiler.package.installer
への入力として使用します。
compiler.package.installer(results,'Options',opts);
magicsquareinstaller
というフォルダー内に MyMagicInstaller.exe
というインストーラーを生成します。アプリケーション名を使用したインストーラー オプション オブジェクトの作成
アプリケーション名と、名前と値の引数として指定された追加オプションを使って InstallerOptions
オブジェクトを作成します。
opts = compiler.package.InstallerOptions('ApplicationName','MagicSquare_Generator',... 'AuthorCompany','Boston Common',... 'AuthorName','Frog',... 'InstallerName','MagicSquare_Installer',... 'Summary','Generates a magic square.')
opts = InstallerOptions with properties: RuntimeDelivery: 'web' InstallerSplash: 'C:\Program Files\MATLAB\R2022a\toolbox\toolbox\compiler\packagingResources\default_splash.png' InstallerIcon: 'C:\Program Files\MATLAB\R2022a\toolbox\compiler\packagingResources\default_icon_48.png' InstallerLogo: 'C:\Program Files\MATLAB\R2022a\toolbox\compiler\packagingResources\default_logo.png' AuthorName: 'Frog' AuthorEmail: '' AuthorCompany: 'Boston Common' Summary: 'Generates a magic square.' Description: '' InstallationNotes: '' Shortcut: '' Version: '1.0' InstallerName: 'MagicSquare_Installer' ApplicationName: 'MagicSquare_Generator' OutputDir: '.\MagicSquare_Generator' DefaultInstallationDir: 'C:\Program Files\MagicSquare_Generator'
ドット表記を使用して、既存の InstallerOptions
オブジェクトのプロパティ値を変更することができます。たとえば、インストール メモを Windows installer
に設定します。
opts.InstallationNotes = 'Windows installer'
入力引数
results
— ビルド結果オブジェクト
Results
オブジェクト
ビルド結果。compiler.build.Results
オブジェクトとして指定します。関数 compiler.build
からの出力を保存することで、Results
オブジェクトを作成します。
appName
— インストールされるアプリケーションの名前
文字ベクトル | string スカラー
インストールされるアプリケーションの名前。文字ベクトルまたは string スカラーとして指定します。
例: 'MagicSquare_Generator'
データ型: char
| string
名前と値の引数
オプションのペアの引数を Name1=Value1,...,NameN=ValueN
として指定します。ここで、Name
は引数名で、Value
は対応する値です。名前と値の引数は他の引数の後に指定する必要がありますが、ペアの順序は考慮されません。
R2021a より前では、コンマを使用してそれぞれの名前と値を区切り、Name
を引用符で囲みます。
例: 'Version','9.5'
は、インストールされているアプリケーションのバージョンを指定します。
ApplicationName
— アプリケーション名
''
(既定値) | 文字ベクトル | string スカラー
インストールされるアプリケーションの名前。文字ベクトルまたは string スカラーとして指定します。
例: 'MagicSquare_Generator'
データ型: char
| string
AuthorCompany
— 会社名
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションを作成した会社名。文字ベクトルまたは string スカラーとして指定します。
例: 'Boston Common'
データ型: char
| string
AuthorEmail
— 電子メール アドレス
''
(既定値) | 文字ベクトル | string スカラー
アプリケーション作成者の電子メール アドレス。文字ベクトルまたは string スカラーとして指定します。
例: 'frog@bostoncommon.com'
データ型: char
| string
AuthorName
— 名前
''
(既定値) | 文字ベクトル | string スカラー
アプリケーション作成者の名前。文字ベクトルまたは string スカラーとして指定します。
例: 'Frog'
データ型: char
| string
DefaultInstallationDir
— 既定のインストール パス
文字ベクトル | string スカラー
インストーラーがアプリケーションをインストールする既定のディレクトリ。文字ベクトルまたは string スカラーとして指定します。
パスを指定しない場合、各オペレーティング システムの既定のパスは次のとおりです。
オペレーティング システム | 既定のインストール ディレクトリ |
---|---|
Windows® | C:\Program Files\ |
Linux® | /usr/ |
macOS | /Applications/ |
例: Windows の場合: C:\Program Files\MagicSquare_Generator
データ型: char
| string
Description
— アプリケーションの詳細な説明
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションの詳細な説明。文字ベクトルまたは string スカラーとして指定します。
例: 'The MagicSquare_Generator application generates an n-by-n matrix constructed from the integers 1 through n2 with equal row and column sums.'
データ型: char
| string
InstallationNotes
— メモ
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションの使用に関する追加要件についてのメモ。文字ベクトルまたは string スカラーとして指定します。
例: 'This is a Linux installer.'
データ型: char
| string
InstallerIcon
— アイコン イメージへのパス
文字ベクトル | string スカラー
インストールされるアプリケーションのアイコンとして使用するイメージ ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。
既定のパスは次のとおりです。
'matlabroot
\toolbox\compiler\packagingResources\default_icon_48.png'
例: 'D:\Documents\MATLAB\work\images\myIcon.png'
InstallerLogo
— インストーラー イメージへのパス
文字ベクトル | string スカラー
インストーラーのロゴとして使用するイメージ ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。ロゴのサイズは 150 x 340 ピクセルに変更されます。
既定のパスは次のとおりです。
'matlabroot
\toolbox\compiler\packagingResources\default_logo.png'
例: 'D:\Documents\MATLAB\work\images\myLogo.png'
InstallerName
— インストーラー ファイルの名前
MyAppInstaller
(既定値) | 文字ベクトル | string スカラー
インストーラー ファイルの名前。文字ベクトルまたは string スカラーとして指定します。拡張子は、関数が実行されるオペレーティング システムによって決まります。
例: 'MagicSquare_Installer'
InstallerSplash
— スプラッシュ スクリーン イメージへのパス
文字ベクトル | string スカラー
インストーラーのスプラッシュ スクリーンとして使用するイメージ ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。スプラッシュ スクリーンのアイコンのサイズは 400 x 400 ピクセルに変更されます。
既定のパスは次のとおりです。
'matlabroot
\toolbox\toolbox\compiler\packagingResources\default_splash.png'
例: 'D:\Documents\MATLAB\work\images\mySplash.png'
OutputDir
— インストーラーの保存先フォルダーへのパス
文字ベクトル | string スカラー
インストーラーの保存先フォルダーへのパス。文字ベクトルまたは string スカラーとして指定します。
パスを指定しない場合、各オペレーティング システムの既定のパスは次のとおりです。
オペレーティング システム | 既定のインストール ディレクトリ |
---|---|
Windows | .\ |
Linux | ./ |
macOS | ./ |
上記のディレクトリ内の .
は、現在の作業ディレクトリを表します。
例: 'D:\Documents\MATLAB\work\MagicSquare'
RuntimeDelivery
— MATLAB® Runtime の引き渡しオプション
'web'
(既定値) | 'installer'
インストールされるアプリケーションで MATLAB Runtime を使用可能にする方法の選択肢。
'web'
— アプリケーションのインストール時にインストーラーが MathWorks® の Web サイトから MATLAB Runtime をダウンロードするオプション。これは既定のオプションです。'installer'
— アプリケーションのインストール時に MathWorks Web サイトに接続せずにインストールできるように、インストーラー内に MATLAB Runtime を含めるオプション。エンド ユーザーがインターネットにアクセスできない可能性があると考えられる場合は、このオプションを使用します。
例: 'installer'
データ型: char
| string
Shortcut
— ショートカットへのパス
''
(既定値) | 文字ベクトル | string スカラー
インストール時にインストーラーがショートカットを作成するファイルまたはフォルダーへのパス。文字ベクトルまたは string スカラーとして指定します。
例: '.\mymagic.exe'
データ型: char
| string
Summary
— アプリケーションの概要説明
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションの概要説明。文字ベクトルまたは string スカラーとして指定します。
例: 'Generates a magic square.'
データ型: char
| string
Version
— インストールされるアプリケーションのバージョン
'1.0'
(既定値) | 文字ベクトル | string スカラー
インストールされるアプリケーションのバージョン番号。文字ベクトルまたは string スカラーとして指定します。
例: '2.0'
データ型: char
| string
出力引数
opts
— InstallerOptions オブジェクト
InstallerOptions
オブジェクト
インストーラー オプション。InstallerOptions
オブジェクトとして返されます。
バージョン履歴
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)