How can I create an installer for compiled MATLAB that asks the user to accept the license terms?

I am writing programs in MATLAB for distribution to Windows users. I am using the MATLAB compiler with the release of MATLAB r2014a to create programs. I can create a Windows installer using the MATLAB application compiler, and it works just fine.

However, I would like the installer to require my users to review and accept the license agreement before they install the software. The MATLAB installer does not provide this feature.

Can anyone suggest an alternative way to package my compiled MATLAB applications? I would agree with the installer of two levels, where the first installer represents the terms of the license, unpacks MATLAB installers, which must be run in the second stage of installation. Obviously, a single-phase solution will be better.

+2
source share
1 answer

You can use inno setup (a free installer for windows) and inno script studio (a third-party interface for editing installer scripts).

Setting up Inno also allows you to write your own pascal code, so you can even check that the Matlab runtime is set on the target machine before the installation starts:

[Code] function IsMCR90Installed : Boolean; begin Result := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\MathWorks\MATLAB Runtime\9.0'); end; function InitializeSetup(): Boolean; begin Result := true; if (not IsMCR90Installed) then begin MsgBox('This setup requires the Matlab Component runtime v9.0.'#13'Please install the Matlab Component Runtime and run this setup again.', mbError, MB_OK) ; Result:=false; Exit; end; end; 

Note. For a one-step installation, you can deploy the executable generated by the matlab compiler with the inno setting.

Edit

To add a license page with an inno installation, simply set the pointer to the license text in the [Setup] section of the script installer. See http://www.jrsoftware.org/ishelp/index.php?topic=setup_licensefile for details.

See also fooobar.com/questions/1242540 / ... if you want to display custom text for each language.

+4
source

Source: https://habr.com/ru/post/1242537/


All Articles