After a bit of digging, I have partially answered my own question. There are two places where the products a standalone app requires are listed:
- The output of compiler.build.standaloneApplication
- In the standalone app's root directory in file requiredMCRProducts.txt.
For my application, I found (1) and (2) listed different products, and I needed to include all of them for the application to run. The file in (2) just lists product numbers. These are linked to product names files in the MATLAB Runtime installer's productData subdirectory. These are given in the table below, with a corresponding instruction line.
Once the required products are identified, MATLAB Runtime can be installed selectively using the -inputFile argument when running MATLAB Runtime install. The input file should include the instruction lines from the table and any other necessary arguments. For an example input file, please see my other question.
This method works in MATLAB R2021a. It does not work in R2019b. Perhaps a Mathworks staff member can confirm when the selective install function was added. I suspect it came along with the ability to package standalone applications into Docker images in R2020b. https://uk.mathworks.com/help/compiler/release-notes.html
Table linking product numbers to input file instruction lines. Used commented code because I couldn't figure out how to insert a table.
%productNumber productName instruction
%35000 MATLAB Runtime - Core product.MATLAB_Runtime___Core true
%35010 MATLAB Runtime - Numerics product.MATLAB_Runtime___Numerics true
%35051 MATLAB Runtime - NET And Excel Addin product.MATLAB_Runtime___NET_And_Excel_Addin true
%35052 MATLAB Runtime - Hadoop And Spark Addin product.MATLAB_Runtime___Hadoop_And_Spark_Addin true
%35053 MATLAB Runtime - Java Addin product.MATLAB_Runtime___Java_Addin true
%35054 MATLAB Runtime - Production Server Addin product.MATLAB_Runtime___Production_Server_Addin true
%35055 MATLAB Runtime - Python product.MATLAB_Runtime___Python true
%35103 MATLAB Runtime - Control System Toolbox Addin product.MATLAB_Runtime___Control_System_Toolbox_Addin true
%35104 MATLAB Runtime - System Identification Toolbox Addin product.MATLAB_Runtime___System_Identification_Toolbox_Addin true
%35106 MATLAB Runtime - Optimization Toolbox Addin product.MATLAB_Runtime___Optimization_Toolbox_Addin true
%35108 MATLAB Runtime - Signal Processing Toolbox Addin product.MATLAB_Runtime___Signal_Processing_Toolbox_Addin true
%35111 MATLAB Runtime - Mapping Toolbox Addin product.MATLAB_Runtime___Mapping_Toolbox_Addin true
%35112 MATLAB Runtime - Deep Learning Toolbox Addin product.MATLAB_Runtime___Deep_Learning_Toolbox_Addin true
%35117 MATLAB Runtime - Image Processing Toolbox Addin product.MATLAB_Runtime___Image_Processing_Toolbox_Addin true
%35119 MATLAB Runtime - Statistics and Machine Learning Toolbox Addin product.MATLAB_Runtime___Statistics_and_Machine_Learning_Toolbox_Addin true
%35122 MATLAB Runtime - Model Predictive Control Toolbox Addin product.MATLAB_Runtime___Model_Predictive_Control_Toolbox_Addin true
%35123 MATLAB Runtime - Fuzzy Logic Toolbox Addin product.MATLAB_Runtime___Fuzzy_Logic_Toolbox_Addin true
%35124 MATLAB Runtime - DSP System Toolbox Addin product.MATLAB_Runtime___DSP_System_Toolbox_Addin true
%35130 MATLAB Runtime - Financial Toolbox Addin product.MATLAB_Runtime___Financial_Toolbox_Addin true
%35131 MATLAB Runtime - Partial Differential Equation Toolbox Addin product.MATLAB_Runtime___Partial_Differential_Equation_Toolbox_Addin true
%35135 MATLAB Runtime - Wavelet Toolbox Addin product.MATLAB_Runtime___Wavelet_Toolbox_Addin true
%35136 MATLAB Runtime - Communications Toolbox Addin product.MATLAB_Runtime___Communications_Toolbox_Addin true
%35141 MATLAB Runtime - Database Toolbox Addin product.MATLAB_Runtime___Database_Toolbox_Addin true
%35144 MATLAB Runtime - MATLAB Report Generator Addin product.MATLAB_Runtime___MATLAB_Report_Generator_Addin true
%35150 MATLAB Runtime - Datafeed Toolbox Addin product.MATLAB_Runtime___Datafeed_Toolbox_Addin true
%35160 MATLAB Runtime - Curve Fitting Toolbox Addin product.MATLAB_Runtime___Curve_Fitting_Toolbox_Addin true
%35162 MATLAB Runtime - Instrument Control Toolbox Addin product.MATLAB_Runtime___Instrument_Control_Toolbox_Addin true
%35166 MATLAB Runtime - Simulink 3D Animation Addin product.MATLAB_Runtime___Simulink_3D_Animation_Addin true
%35178 MATLAB Runtime - Image Acquisition Toolbox Addin product.MATLAB_Runtime___Image_Acquisition_Toolbox_Addin true
%35180 MATLAB Runtime - Parallel Computing Toolbox Cluster Addin product.MATLAB_Runtime___Parallel_Computing_Toolbox_Cluster_Addin true
%35183 MATLAB Runtime - Bioinformatics Toolbox Addin product.MATLAB_Runtime___Bioinformatics_Toolbox_Addin true
%35186 MATLAB Runtime - RF Toolbox Addin product.MATLAB_Runtime___RF_Toolbox_Addin true
%35190 MATLAB Runtime - Global Optimization Toolbox Addin product.MATLAB_Runtime___Global_Optimization_Toolbox_Addin true
%35191 MATLAB Runtime - Fixed-Point Designer Addin product.MATLAB_Runtime___Fixed_Point_Designer_Addin true
%35196 MATLAB Runtime - Computer Vision Toolbox Addin product.MATLAB_Runtime___Computer_Vision_Toolbox_Addin true
%35203 MATLAB Runtime - SimBiology Addin product.MATLAB_Runtime___SimBiology_Addin true
%35208 MATLAB Runtime - Aerospace Toolbox Addin product.MATLAB_Runtime___Aerospace_Toolbox_Addin true
%35212 MATLAB Runtime - Phased Array System Toolbox Addin product.MATLAB_Runtime___Phased_Array_System_Toolbox_Addin true
%35224 MATLAB Runtime - Vehicle Network Toolbox Addin product.MATLAB_Runtime___Vehicle_Network_Toolbox_Addin true
%35225 MATLAB Runtime - Econometrics Toolbox Addin product.MATLAB_Runtime___Econometrics_Toolbox_Addin true
%35227 MATLAB Runtime - Simulink Design Optimization Addin product.MATLAB_Runtime___Simulink_Design_Optimization_Addin true
%35236 MATLAB Runtime - Financial Instruments Toolbox Addin product.MATLAB_Runtime___Financial_Instruments_Toolbox_Addin true
%35240 MATLAB Runtime - LTE Toolbox Addin product.MATLAB_Runtime___LTE_Toolbox_Addin true
%35242 MATLAB Runtime - Robotics System Toolbox Addin product.MATLAB_Runtime___Robotics_System_Toolbox_Addin true
%35245 MATLAB Runtime - WLAN Toolbox Addin product.MATLAB_Runtime___WLAN_Toolbox_Addin true
%35250 MATLAB Runtime - Risk Management Toolbox Addin product.MATLAB_Runtime___Risk_Management_Toolbox_Addin true
%35251 MATLAB Runtime - Audio Toolbox Addin product.MATLAB_Runtime___Audio_Toolbox_Addin true
%35252 MATLAB Runtime - Automated Driving Toolbox Addin product.MATLAB_Runtime___Automated_Driving_Toolbox_Addin true
%35256 MATLAB Runtime - Text Analytics Toolbox Addin product.MATLAB_Runtime___Text_Analytics_Toolbox_Addin true
%35257 MATLAB Runtime - Sensor Fusion and Tracking Toolbox Addin product.MATLAB_Runtime___Sensor_Fusion_and_Tracking_Toolbox_Addin true
%35258 MATLAB Runtime - Predictive Maintenance Toolbox Addin product.MATLAB_Runtime___Predictive_Maintenance_Toolbox_Addin true
%35261 MATLAB Runtime - 5G Toolbox Addin product.MATLAB_Runtime___5G_Toolbox_Addin true
%35272 MATLAB Runtime - Reinforcement Learning Toolbox Addin product.MATLAB_Runtime___Reinforcement_Learning_Toolbox_Addin true
%35274 MATLAB Runtime - Rapid Accelerator product.MATLAB_Runtime___Rapid_Accelerator true
%35275 MATLAB Runtime - ROS Toolbox Addin product.MATLAB_Runtime___ROS_Toolbox_Addin true
%35276 MATLAB Runtime - Navigation Toolbox Addin product.MATLAB_Runtime___Navigation_Toolbox_Addin true
%35278 MATLAB Runtime - Lidar Toolbox Addin product.MATLAB_Runtime___Lidar_Toolbox_Addin true
%35281 MATLAB Runtime - Radar Toolbox Addin product.MATLAB_Runtime___Radar_Toolbox_Addin true
%35282 MATLAB Runtime - UAV Toolbox Addin product.MATLAB_Runtime___UAV_Toolbox_Addin true
%35380 MATLAB Runtime - Parallel Computing Toolbox GPU Addin product.MATLAB_Runtime___Parallel_Computing_Toolbox_GPU_Addin true
%35500 MATLAB Runtime - Web Apps Addin product.MATLAB_Runtime___Web_Apps_Addin true