Install MATLAB Runtime (MCR) with specified products

61 次查看(过去 30 天)
Hi
Is it possible to install MATLAB Runtime with selected products only? By default the installer will install ALL products, where I only need a few of these.
I'm installing the runtime using the silent mode in Ubuntu. When installing MATLAB you can use an installer_input.txt file, where you can select the products to be installed. However, this doesn't seem to be working for the runtime installer (I've tried), although it is possible to use a installer_input.txt file for the runtime installer.
On the documentation page for the runtime installer it states:
However, this doens't seem to be the case, as I can't find any installer_input.txt "templates" in the downloaded runtime files from https://se.mathworks.com/products/compiler/matlab-runtime.html. (I'm thinking this template file might be able to help me, but I can't seem to find it anywhere)
Kind regards Anders

回答(4 个)

Stefanie Schwarz
Stefanie Schwarz 2024-9-19
Starting from R2024b, the 'compiler.runtime.customInstaller' function is available to create a custom MATLAB Runtime installer with a minimal size footprint. See this MATLAB Answer for an overview and doc links:

amit lipman
amit lipman 2021-11-8
I've attached the installer_input.txt file.
I hope it will help!
BR,
Amit Lipman
  4 个评论
Valery Polyakov
Valery Polyakov 2023-1-17
@Jerome Blum, I can't confirm that, I haven't tried R2022b yet. Isn't it remarkable that Mathworks won't make this information readily available?
Jerome Blum
Jerome Blum 2023-1-17
@Valery Polyakov Indeed, it is. I have created my own question here, feel free to follow the thread if you're interested.

请先登录,再进行评论。


Valery Polyakov
Valery Polyakov 2023-1-17
Well. Where Mathworks failed, ChatGPT seems to have succeeded. I tried it, just for grins, and it looks like this might be the answer we need, although that doesn't tell you the keywords to use for each component.
(My query was "How can I install only a minimal subset of matlab compiler runtime using linux command-line installer?" followed by "And what is the format of such an input file in the case of version 2022b?"
--------------------------
The format of the response file for a silent installation of the MATLAB Compiler Runtime (MCR) version 2022b is a plain text file that contains the options and values that you want to use for the installation. The file must contain one option and value per line, in the format -option value.
For example, to specify that you want to install the MCR runtime and the runtime libraries for a silent installation to the directory /usr/local/mcr/v92, you would create a response file with the following contents:
-mode silent
-agreeToLicense yes
-destinationFolder /usr/local/mcr/v92
-component runtime
-component libmwservices
You would then run the installer command with the -inputFile option to specify the response file:
./install -inputFile mcr_installer_options.txt
It's important to note that options you specify in the response file will overwrite options passed in the command line, so you should only include the options that you want to set in the response file.
You can find more information about response file and the available options for silent installation in the Mathworks website.
  2 个评论
Valery Polyakov
Valery Polyakov 2023-1-17
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'
Jim Hamilton
Jim Hamilton 2023-4-6
If I want to only install two toolboxes, would this work in Linux?
./install -mode silent -agreeToLicense yes -install 'Optimization_Toolbox' -install 'Image_Processing_Toolbox'

请先登录,再进行评论。


Victor
Victor 2023-7-17
编辑:Victor 2023-7-17
This is a bit hacky way to install selected add-ons only:
ls archives/mwcontents_* archives/productdata_* | grep -Ev 'Python99|Numerics99|Core99|MATLAB_Runtime99|DSP_System_Toolbox' | xargs rm &&
./install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent
Basically, Matlab looks into archives/mwcontents_* and archives/productdata_* files to get available components. The command above deletes all component files besides listed by the grep command. Than Matlab installs only listed components.
Complete Matlab installation script:
mkdir /mcr-install && \
mkdir /opt/mcr && \
cd /mcr-install && \
wget https://ssd.mathworks.com/supportfiles/downloads/R2020b/Release/3/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020b_Update_3_glnxa64.zip && \
unzip -q MATLAB_Runtime_R2020b_Update_3_glnxa64.zip && \
ls archives/mwcontents_* archives/productdata_* | grep -Ev 'Python99|Numerics99|Core99|MATLAB_Runtime99|DSP_System_Toolbox|Signal_Processing_Toolbox|Statistics_and_Machine_Learning_Toolbox' | xargs rm && \
./install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \
rm -rf /mcr-install

类别

Help CenterFile 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!

Translated by