deploytool not working in -batch mode

This works - Matlab opens, builds the installer, and exits:
matlab -nosplash -wait -r "deploytool -package myapp.prj; exit"
This does not - only the output file for_testing/spash.png is created:
matlab -batch "deploytool -package myapp.prj"
Tried with both R2019b and R2020a. The source file is an .mlapp package, if that makes a difference.
-----
After further testing, sometimes the first command also exits having only created for_testing/spash.png.
How to reliably build and package an app from the command line, without having to manually close Matlab afterwards?

1 Comment

Adding a sufficiently large pause - e.g. pause(30) allows it to finish. But this is not a very reliable solution.

Sign in to comment.

Answers (0)

Categories

Asked:

on 17 Aug 2020

Commented:

on 17 Aug 2020

Community Treasure Hunt

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

Start Hunting!