compiler.package.InstallerOptions
構文
説明
は、関数 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);
InstallerOptions
オブジェクトを作成します。名前と値の引数を使用して、アプリケーション名、作成会社、作成者名、インストーラー名、および概要を指定します。
opts = compiler.package.InstallerOptions(results,... '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\R2023a\toolbox\compiler\packagingResources\default_splash.png' InstallerIcon: 'C:\Program Files\MATLAB\R2023a\toolbox\compiler\packagingResources\default_icon_48.png' InstallerLogo: 'C:\Program Files\MATLAB\R2023a\toolbox\compiler\packagingResources\default_logo.png' AdditionalFiles: {} AddRemoveProgramsIcon: 'C:\Program Files\MATLAB\R2023a\toolbox\compiler\packagingResources\default_icon_48.png' AuthorName: 'Frog' AuthorEmail: '' AuthorCompany: 'Boston Common' Summary: 'Generates a magic square.' Description: '' InstallationNotes: '' Shortcut: 'D:\Work\magicsquarestandaloneApplication\magicsquare.exe' Version: '1.0' InstallerName: 'MagicSquare_Installer' ApplicationName: 'MagicSquare_Generator' OutputDir: '.\MagicSquare_Generatorinstaller' DefaultInstallationDir: 'C:\Program Files\MagicSquare_Generator'
ドット表記を使用して、既存の InstallerOptions
オブジェクトのプロパティ値を変更することができます。たとえば、インストーラー名を MyMagicInstaller
に設定します。
opts.InstallerName = 'MyMagicInstaller'
スタンドアロン アプリケーションのインストーラーを作成するには、Results
オブジェクトと InstallerOptions
オブジェクトを関数 compiler.package.installer
への入力として使用します。
compiler.package.installer(results,'Options',opts);
MagicSquare_Generatorinstaller
という名前のフォルダー内に MagicSquare_Installer
という名前のインストーラーを生成します。ドット表記を使用して、既存の InstallerOptions
オブジェクトのプロパティ値を変更することができます。たとえば、インストール メモを指定します。
opts.InstallationNotes = 'Windows installer for MagicSquare'
アプリケーション名を使用したインストーラー オプション オブジェクトの作成
アプリケーション名と、名前と値の引数として指定された追加オプションを使って 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\R2023a\toolbox\compiler\packagingResources\default_splash.png' InstallerIcon: 'C:\Program Files\MATLAB\R2023a\toolbox\compiler\packagingResources\default_icon_48.png' InstallerLogo: 'C:\Program Files\MATLAB\R2023a\toolbox\compiler\packagingResources\default_logo.png' AdditionalFiles: {} AddRemoveProgramsIcon: '' 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'
入力引数
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'
は、インストールされているアプリケーションのバージョンを指定します。
AdditionalFiles
— 追加ファイル
文字ベクトル | string スカラー | 文字ベクトルの cell 配列 | string 配列
アプリケーションとともにインストールする追加のファイルとフォルダー。文字ベクトル、string スカラー、string 配列、または文字ベクトルの cell 配列として指定します。パスは現在の作業ディレクトリを基準とした相対パス、または絶対パスにできます。
例: 'AdditionalFiles',["myimage.png","data.mat"]
データ型: char
| string
| cell
AddRemoveProgramsIcon
— [プログラムの追加と削除] アイコン
文字ベクトル | string スカラー | string 配列
[プログラムの追加と削除] アイコン。文字ベクトルまたは string スカラーとして指定します。イメージは、設定内の Windows® アプリケーションのリストでアイコンとして使用されます。パスは現在の作業ディレクトリを基準とした相対パス、または絶対パスにできます。
既定のパスは次のとおりです。
'matlabroot
\toolbox\compiler\packagingResources\default_icon_48.png'
例: 'AddRemoveProgramsIcon',"win_icon.png"
データ型: char
| string
ApplicationName
— アプリケーション名
''
(既定値) | 文字ベクトル | string スカラー
インストールされるアプリケーションの名前。文字ベクトルまたは string スカラーとして指定します。
例: 'ApplicationName','MagicSquare_Generator'
データ型: char
| string
AuthorCompany
— 会社名
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションを作成した会社名。文字ベクトルまたは string スカラーとして指定します。
例: 'AuthorCompany','Boston Common'
データ型: char
| string
AuthorEmail
— 電子メール アドレス
''
(既定値) | 文字ベクトル | string スカラー
アプリケーション作成者の電子メール アドレス。文字ベクトルまたは string スカラーとして指定します。
例: 'AuthorEmail','frog@example.com'
データ型: char
| string
AuthorName
— 名前
''
(既定値) | 文字ベクトル | string スカラー
アプリケーション作成者の名前。文字ベクトルまたは string スカラーとして指定します。
例: 'AuthorName','Frog'
データ型: char
| string
DefaultInstallationDir
— 既定のインストール パス
文字ベクトル | string スカラー
インストーラーがアプリケーションをインストールする既定のディレクトリ。文字ベクトルまたは string スカラーとして指定します。
パスを指定しない場合、各オペレーティング システムの既定のパスは次のとおりです。
オペレーティング システム | 既定のインストール ディレクトリ |
---|---|
Windows | C:\Program Files\ |
Linux® | /usr/ |
macOS | /Applications/ |
例: 'DefaultInstallationDir','C:\Users\MW_Programs\MagicSquare_Generator'
データ型: char
| string
Description
— アプリケーションの詳細な説明
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションの詳細な説明。文字ベクトルまたは string スカラーとして指定します。
例: 'Description','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 スカラーとして指定します。
例: 'InstallationNotes','This is a Linux installer.'
データ型: char
| string
InstallerIcon
— アイコン イメージへのパス
文字ベクトル | string スカラー
インストールされるアプリケーションのアイコンとして使用するイメージ ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。
既定のパスは次のとおりです。
'matlabroot
\toolbox\compiler\packagingResources\default_icon_48.png'
例: 'InstallerIcon','D:\Documents\MATLAB\work\images\myIcon.png'
InstallerLogo
— インストーラー イメージへのパス
文字ベクトル | string スカラー
インストーラーのロゴとして使用するイメージ ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。ロゴのサイズは 112 x 290 ピクセルに変更されます。
既定のパスは次のとおりです。
'matlabroot
\toolbox\compiler\packagingResources\default_logo.png'
例: 'InstallerLogo','D:\Documents\MATLAB\work\images\myLogo.png'
InstallerName
— インストーラー ファイルの名前
MyAppInstaller
(既定値) | 文字ベクトル | string スカラー
インストーラー ファイルの名前。文字ベクトルまたは string スカラーとして指定します。拡張子は、関数が実行されるオペレーティング システムによって決まります。
例: 'InstallerName','MagicSquare_Installer'
InstallerSplash
— スプラッシュ スクリーン イメージへのパス
文字ベクトル | string スカラー
インストーラーのスプラッシュ スクリーンとして使用するイメージ ファイルへのパス。文字ベクトルまたは string スカラーとして指定します。スプラッシュ スクリーンのアイコンのサイズは 400 x 400 ピクセルに変更されます。
既定のパスは次のとおりです。
'matlabroot
\toolbox\compiler\packagingResources\default_splash.png'
例: 'InstallerSplash','D:\Documents\MATLAB\work\images\mySplash.png'
OutputDir
— インストーラーの保存先フォルダーへのパス
文字ベクトル | string スカラー
インストーラーの保存先フォルダーへのパス。文字ベクトルまたは string スカラーとして指定します。
パスを指定しない場合、各オペレーティング システムの既定のパスは次のとおりです。
オペレーティング システム | 既定のインストール ディレクトリ |
---|---|
Windows | .\ |
Linux | ./ |
macOS | ./ |
上記のディレクトリ内の .
は、現在の作業ディレクトリを表します。
例: 'OutputDir','D:\Documents\MATLAB\work\MagicSquare'
RuntimeDelivery
— MATLAB® Runtime の引き渡しオプション
'web'
(既定値) | 'installer'
インストールされるアプリケーションで MATLAB Runtime を使用可能にする方法の選択肢。
'web'
— アプリケーションのインストール時にインストーラーが MathWorks® の Web サイトから MATLAB Runtime をダウンロードするオプション。これは既定のオプションです。'installer'
— アプリケーションのインストール時に MathWorks Web サイトに接続せずにインストールできるように、インストーラー内に MATLAB Runtime を含めるオプション。エンド ユーザーがインターネットにアクセスできない可能性があると考えられる場合は、このオプションを使用します。
例: 'RuntimeDelivery','installer'
データ型: char
| string
Shortcut
— ショートカットへのパス
''
(既定値) | 文字ベクトル | string スカラー
インストール時にインストーラーがショートカットを作成するファイルまたはフォルダーへのパス。文字ベクトルまたは string スカラーとして指定します。
例: 'Shortcut','.\mymagic.exe'
データ型: char
| string
Summary
— アプリケーションの概要説明
''
(既定値) | 文字ベクトル | string スカラー
アプリケーションの概要説明。文字ベクトルまたは string スカラーとして指定します。
例: 'Summary','Generates a magic square.'
データ型: char
| string
Version
— インストールされるアプリケーションのバージョン
'1.0'
(既定値) | 文字ベクトル | string スカラー
インストールされるアプリケーションのバージョン番号。文字ベクトルまたは string スカラーとして指定します。
例: 'Version','2.0'
データ型: char
| string
出力引数
opts
— InstallerOptions オブジェクト
InstallerOptions
オブジェクト
インストーラー オプション。InstallerOptions
オブジェクトとして返されます。
バージョン履歴
R2020a で導入
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)