How to format -inputFile for mcr installation to specify products to be installed?
15 ビュー (過去 30 日間)
古いコメントを表示
For MATLAB Runtime R2021a (9.10), the -inputFile could be structured as follows:
% mcrInputFile.txt for R2021a(v910)
mode silent
destinationFolder /opt/mcr/
agreeToLicense yes
product.MATLAB_Runtime___Core true
product.MATLAB_Runtime___Numerics true
This does not seem to work anymore for MCR R2022b. Through some research, I found out that the format must have been changed sometime between the two releases mentioned. I found out, that the following format works for the "normal" options, but not for the products to be installed:
% mcrInputFile.txt for R2022b(v913) (products-part NOT WORKING!)
mode=silent
destinationFolder=/opt/mcr/
agreeToLicense=yes
product.MATLAB_Runtime___Core=true
product.MATLAB_Runtime___Numerics=true
Options and arguments must be separated by a '=' sign - this works for the "normal" options but not for the products to be installed.
How do you specify the products you want to install? A complete installation is >9GB. This is unnecessarily large for my application.
Here is an extract of the installation log file. It shows that the license agreement and the destination folder have been overtaken successfully, but the specified products have been ignored.
(Jan 17, 2023 06:52:13) ##################################################################
(Jan 17, 2023 06:52:13) #
(Jan 17, 2023 06:52:13) # Today's Date:
(Jan 17, 2023 06:52:13) Jan 17, 2023 06:52:13 +0000
(Jan 17, 2023 06:52:13)
(Jan 17, 2023 06:52:13) System Info
(Jan 17, 2023 06:52:13) OS: Linux Linux 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64
(Jan 17, 2023 06:52:13) Arch: amd64
(Jan 17, 2023 06:52:13) Language: C_
(Jan 17, 2023 06:52:13) Release Description: R2022b Update 3
(Jan 17, 2023 06:52:13) Installer build number: 9.13.0.2126072
(Jan 17, 2023 06:52:13) Content of the file mcr.InputFile.txt
mode=silent
agreeToLicense=yes
destinationFolder=/opt/mcr/
outputFile=/opt/mcr/install.log
product.MATLAB_Runtime___Core=true
product.MATLAB_Runtime___Numerics=true
End of the file mcr.InputFile.txt
(Jan 17, 2023 06:52:14) Session key: 6e4faf9b-b4ed-4b2c-a1dd-ba6e54f77b9b
(Jan 17, 2023 06:52:14) Product Files Folder: /unzipped/archives
(Jan 17, 2023 06:52:16) License Agreement validation is successful.
(Jan 17, 2023 06:52:16) Folder validation is successful.
(Jan 17, 2023 06:52:16) Confirm Selections
(Jan 17, 2023 06:52:16) Destination
(Jan 17, 2023 06:52:16) /opt/mcr/R2022b
(Jan 17, 2023 06:52:16) Products
(Jan 17, 2023 06:52:16) MATLAB Runtime R2022b
(Jan 17, 2023 06:52:16) 9.68 GB required
(Jan 17, 2023 06:52:17) 1%
(Jan 17, 2023 06:52:18) 2%
(Jan 17, 2023 06:52:22) 5%
(Jan 17, 2023 06:52:50) 20%
(Jan 17, 2023 06:52:50) 21%
(Jan 17, 2023 06:52:51) 22%
...
...
...
6 件のコメント
Benjamin Tomlinson
2023 年 1 月 18 日
@Valery Polyakov Have you succesfully tested the format you propose? It doesnt work for me.
(Why is your destination folder v92? - that is version R2017a)
Valery Polyakov
2023 年 1 月 18 日
No, as a matter of fact, this doesn't work. My apologies for that. That was just a suggestion I got from ChatGPT (and the destination folder name was copied verbatim). I have just spent a couple of hours trying every conceivable permutation of specifying toolboxes, without success. One thing that's clear is that in 2022b, there's been a change with the regard to specifying even the basic options (such as 'agreeToLicense'): equal sign (=) is now required.
You'd naively think that someone from Mathworks would step in and give the answer, but that's just me being, well, naive.
採用された回答
Jerome Blum
2023 年 1 月 23 日
編集済み: Jerome Blum
2023 年 1 月 23 日
2 件のコメント
Valery Polyakov
2023 年 1 月 25 日
その他の回答 (1 件)
Jared Wong
2023 年 2 月 23 日
@Jerome Blum @Benjamin Tomlinson I have found that it is possible to install only specific products in the MCR for R2022b (9.13). Here is an example of the file:
mode silent
destinationFolder /usr/local/MATLAB/MATLAB_Runtime
agreeToLicense=yes
product.MATLAB Runtime - Core
product.MATLAB Runtime - Numerics
product.MATLAB Runtime - Image Processing Toolbox Addin
Note that they no longer replace the spaces with underscores and there is no "true" statement or "=" following the lines specifying the products. The product names must exactly match their respective names that can be found under the "productdata" folder. I did have to set the "agreeToLicense=yes" using an equal sign as it complained otherwise.
3 件のコメント
Valery Polyakov
2023 年 9 月 11 日
編集済み: Valery Polyakov
2023 年 9 月 11 日
Ok, I see what it was. destinationFolder option above needs a "=" before the value, otherwise it doesn't work (exits silently, like I said).
destinationFolder=/usr/local/MATLAB/MATLAB_Runtime
Valery Polyakov
2023 年 9 月 11 日
And one last comment: thus generated MCR seems to be unusable:
Error: The installed MATLAB Runtime is not compatible with the application. Reinstall the MATLAB Runtime or the application using the application installer generated using deploytool.
When I do the full install, it works just fine.
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!