Installer deployment from standalone

9 visualizzazioni (ultimi 30 giorni)
Tero
Tero il 10 Nov 2023
Risposto: Akanksha il 13 Giu 2025
Hi all,
I have made a standalone (remoteLicenseGen.exe), which compiles a new exe file by using the mcc command. This works fine. However, I'm having trouble in getting the standalone to compile me the installer file of this newly compiled exe.
I'm using the compiler.package.installer for the installer creation. Running the whole script from Matlab works fine, and the script first compiles the program itself, and then creates the installer just fine. However, after I turn the script into this standalone, and run it, it throws an exception at the line of compiler.package.installer. The error is as follows:
Any ideas what to do? Any other method for the installer creation than what I've used?
Thanks,
Tero
  1 Commento
Tero
Tero il 13 Nov 2023
Well, I guess this is not a show stopper as I'm getting the program itself compiled, so I'll just use that instead

Accedi per commentare.

Risposta accettata

Akanksha
Akanksha il 13 Giu 2025
Hey @ Tero,
The error occurs because thecompiler.package.installer  function depends on internal MATLAB components that are nt included in the MATLAB Runtime (MCR). When you run your script inside MATLAB, it has access to all the necessary files and databases. But when you compile it into a standalone .exe, it runs using the MCR, which is a lightweight version of MATLAB meant only for running compiled applications—not for development or packaging tasks.
Specifically, the error message shows that a required internal database file is missing:
Database file ...\pcm\win64\db?mode=ro not found
This confirms that the installer packaging tools are not supported in standalone mode.
The workaround could be to Use External Installer Tools, after the standalone app generates the .exe or split the workflow into two parts:
Step 1: Let App Just Build the Program
The standalone app (remoteLicenseGen.exe) should focus on taking the MATLAB code and turning it into a .exe file. This part is already working well for you, so no need to change anything here.
Step 2: Make the Installer Using MATLAB (Not the App)
Once the .exe is ready, open MATLAB itself (not the standalone app) and run a small script that tells MATLAB to wrap the .exe into an installer.
This step must be done inside MATLAB, because the installer tool needs special internal files that aren’t included in the free MATLAB Runtime (which the standalone app uses).
Attached are the R2022b documentation links along with the subsection that will help you with the above mentioned process :
https://www.mathworks.com/help/releases/R2022b/compiler/compiler.package.installer.html?searchHighlight=compiler.package.installer&s_tid=doc_srchtitle - Create Installer Using Results Object (This section shows how to use the compiler.package.installer(results) function inside MATLAB after building the application with compiler.build.standaloneApplication.)
Hope this helps!

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by