How to format -inputFile for mcr installation to specify products to be installed?
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jerome Blum
el 17 de En. de 2023
Comentada: Valery Polyakov
el 11 de Sept. de 2023
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 comentarios
Benjamin Tomlinson
el 18 de En. de 2023
@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
el 18 de En. de 2023
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.
Respuesta aceptada
Jerome Blum
el 23 de En. de 2023
Editada: Jerome Blum
el 23 de En. de 2023
2 comentarios
Valery Polyakov
el 25 de En. de 2023
Más respuestas (1)
Jared Wong
el 23 de Feb. de 2023
@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 comentarios
Valery Polyakov
el 11 de Sept. de 2023
Editada: Valery Polyakov
el 11 de Sept. de 2023
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
el 11 de Sept. de 2023
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.
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!