Filter löschen
Filter löschen

Create MCR using command line using requiredMCRProducts.txt

32 Ansichten (letzte 30 Tage)
When I create a python package (Library compiler) using the MATLAB GUI, if I mark the the box "Runtime included in the package" then MyAppInstaller_mcr.install is created which contains just the products required for the package to execute. I think this information is taken from "requiredMCRProducts.txt".
This means the MCR is relatively small (at least compared to the complete MCR which is what the option "Runtime downloaded from web" would create).
Does this functionality to create a small MCR exist using only the command line functions?
I can create the python package fine using:
results = compiler.build.pythonPackage('magicsquare.m');
But then to create the compiler I can't see how to make the smaller MCR containing just the required products.
This command creates a web installer which will download the complete MCR:
compiler.package.installer(results, 'RuntimeDelivery', 'web');
And this command just adds the complete MCR (which had been previously downloaded) with the rest of the python package
compiler.package.installer(results, 'RuntimeDelivery', 'installer');
Thanks for any help offered,
Ben
(MATLAB version R2022a Linux)

Akzeptierte Antwort

Benjamin Tomlinson
Benjamin Tomlinson am 20 Dez. 2022
I'll answer my own question in case anyone else has a similar doubt:
Install slim MCR
You can install a reduced-size (slim) MCR using an installer_input.txt file and the complete MCR at the command line using:
./install -inputFile installer_input.txt
An example installer_input.txt looks like:
mode silent
destinationFolder /opt/mcr
agreeToLicense yes
product.MATLAB_Runtime___Core true
product.MATLAB_Runtime___Numerics true
product.MATLAB_Runtime___Java_Addin true
product.MATLAB_Runtime___Optimization_Toolbox_Addin true
Only the products outlined in this text file will be actually installed
Get product names from ID
The next problem is how to get these product names from the the IDs in "requiredMCRProducts.txt". (e.g. 35000)
Again, the complete MCR is required - look in the folder called "productdata". There is a list of files by product ID, which each contain the name of the product. (e.g. Core)
Related issues:

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB Compiler SDK finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by