How to format -inputFile for mcr installation to specify products to be installed?

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

@Jerome Blum Thanks for making this post. I really hope (but doubt) someone from Mathworks can comment on this issue - I can't understand why this is so poorly documented.
As stated in another post the inputFile format for R2021a also works in R2022a, so the change must be between R2022a and R2022b.
Where did you find out about having to add the equals sign?
@Benjamin Tomlinson The root directory of "MATLAB_Runtime_R2022b_Update_3_glnxa64.zip" contains a file "matlabruntime_installer_input.txt" as a template. But the only parameters that are mentioned are:
destinationFolder=<Folder>
agreeToLicense=<yes/no>
outputFile=<Filelocation>
No mention about the products to be installed...
I will stay on it and update here, as soon as I find a solution.
@Jerome Blum, see if this works:
-mode silent
-agreeToLicense yes
-destinationFolder /usr/local/mcr/v92
-component runtime
-component libmwservices
I have just finally found out (from chatGPT) how to specify the names of the toolboxes. Here's, for example, Optimization Toolbox:
-include 'Optimization_Toolbox'
And then you should be able to put all of this in a text file:
./install -inputFile mcr_installer_options.txt
I just downgraded to R2022a and tried again. The result is it worked like before. Here is the output from the installation log:
(Jan 18, 2023 07:19:41) ##################################################################
(Jan 18, 2023 07:19:41) #
(Jan 18, 2023 07:19:41) # Today's Date:
(Jan 18, 2023 07:19:41) Wed Jan 18 07:19:41 GMT 2023
(Jan 18, 2023 07:19:41)
(Jan 18, 2023 07:19:41) System Info
(Jan 18, 2023 07:19:41) OS: Linux 5.15.49-linuxkit
(Jan 18, 2023 07:19:41) Arch: amd64
(Jan 18, 2023 07:19:41) Data Model: 64
(Jan 18, 2023 07:19:41) Language: en
(Jan 18, 2023 07:19:41) Java Vendor: Oracle Corporation
(Jan 18, 2023 07:19:41) Java Home: /unzipped/sys/java/jre/glnxa64/jre
(Jan 18, 2023 07:19:41) Java Version: 1.8.0_202
(Jan 18, 2023 07:19:41) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Jan 18, 2023 07:19:41) Release Description: R2022a_Update_5
(Jan 18, 2023 07:19:41) Java Class Path: /unzipped/java/config/installagent/pathlist.jar
(Jan 18, 2023 07:19:41) User Name: root
(Jan 18, 2023 07:19:41) Current Directory: /usr/src/app
(Jan 18, 2023 07:19:41) Input arguments:
(Jan 18, 2023 07:19:41) root /unzipped
(Jan 18, 2023 07:19:41) libdir /unzipped
(Jan 18, 2023 07:19:41) inputFile mcr.InputFile.txt
(Jan 18, 2023 07:19:41) standalone true
(Jan 18, 2023 07:19:41) connectionMode OFFLINE_ONLY
(Jan 18, 2023 07:19:41) Input file:
mode silent
agreeToLicense yes
destinationFolder /opt/mcr/
outputFile /opt/mcr/install.log
product.MATLAB_Runtime___Numerics true
product.MATLAB_Runtime___Python true
(Jan 18, 2023 07:19:44) Starting local product/component search in download directory
(Jan 18, 2023 07:19:44) Searching for archives...
(Jan 18, 2023 07:19:44) Reading /unzipped/archives
(Jan 18, 2023 07:19:44) Assembling product list...
(Jan 18, 2023 07:19:44) 4012 files found in /unzipped/archives
(Jan 18, 2023 07:19:44) Reading /unzipped
(Jan 18, 2023 07:19:44) 12 files found in /unzipped
(Jan 18, 2023 07:19:44) Archive search complete. 4024 total files found.
(Jan 18, 2023 07:19:58) Completed local product/component search
(Jan 18, 2023 07:19:58) Starting local product/component search in download directory
(Jan 18, 2023 07:19:58) Searching for archives...
(Jan 18, 2023 07:19:58) /opt/mcr/v912/archives doesn't exist ... skipping.
(Jan 18, 2023 07:19:58) Archive search complete. 0 total files found.
(Jan 18, 2023 07:19:58) Completed local product/component search
(Jan 18, 2023 07:19:58) Download thread pool size = 4
(Jan 18, 2023 07:19:58) Installing Product: MATLAB Runtime - Numerics
(Jan 18, 2023 07:20:16) Installing Product: MATLAB Runtime - Python
(Jan 18, 2023 07:20:17) Notes:
On the target computer, append the following to your LD_LIBRARY_PATH environment variable:
/opt/mcr/v912/runtime/glnxa64:/opt/mcr/v912/bin/glnxa64:/opt/mcr/v912/sys/os/glnxa64:/opt/mcr/v912/extern/bin/glnxa64
If MATLAB Runtime is to be used with MATLAB Production Server or MATLAB Web App Server, you do not need to modify the above environment variable.
(Jan 18, 2023 07:20:17) Exiting with status 0
(Jan 18, 2023 07:20:17) End - Successful.
This means that it indeed has been changed from Release R2022a to R2022b. The question remains, if the product specification feature has been removed completely, or only the syntax has been changed.
The current downside is that Im stuck with python 3.9. (R2022b would already support python 3.10!)
@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)
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.

Iniciar sesión para comentar.

 Respuesta aceptada

Jerome Blum
Jerome Blum el 23 de En. de 2023
Editada: Jerome Blum el 23 de En. de 2023
Through a service request with Mathworks, I got the following answer: ". . . and they confirm that a change has been made from R2022a to R2022b. However, there is currently not a workaround for this, as specifying products in not supported for MCR."
They will submit an enhancement request for future releases - until then, I will have to work with MCR R2022a!

2 comentarios

Thank you @Jerome Blum for researching this and posting your findings.
Indeed, thank you so much, @Jerome Blum, for finding this out. Mathworks never ceases to amaze me.

Iniciar sesión para comentar.

Más respuestas (1)

@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

This doesn't work for me for 2023a (v914). Just silently exits when I specify the -inputFile option, no errors, no action. Just as you'd expect from Mathworks.
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
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.

Iniciar sesión para comentar.

Categorías

Productos

Versión

R2022b

Preguntada:

el 17 de En. de 2023

Comentada:

el 11 de Sept. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by