deploytool batch file issue
7 views (last 30 days)
Show older comments
I'm trying to write a simple batch file to automate building my Matlab compiled application. I'm deploying to both 32-bit and 64-bit machines. The individual commands work at the command line, but the batch file stops after the first deploytool command. Has anyone encountered this? Any idea what is going on? Here is my simple batch file:
echo off
echo Building win64 application...
deploytool -build source_win64.prj
echo Building win32 application...
deploytool -build -win32 source_win32.prj
echo Copying executables to deployment folder...
copy /y source_win64.exe D:\deployment
copy /y source_win32.exe D:\deployment
Thanks, Tobyn VanVeghten
3 Comments
Kaustubha Govind
on 26 Jun 2013
What about if you manually run the commands in sequences from the shell. Do you see any error? Is your MATLAB 64-bit or 32-bit?
Answers (1)
Muthu Annamalai
on 26 Jun 2013
@Tobyn you probably want to invoke MATLAB from shell to do this right. I understand your code is executed on the windows commandline.
So you should have to write in your shell script,
matlab -r 'deploytool -build source_win64.prj; exit'
matlab -r 'deploytool -build -win32 source_win32.prj; exit'
However if your script was a MATLAB code in the 'command' mode you want to use
'copyfile' instead of 'copy'
2 Comments
BG
on 15 May 2014
I don't think the deploytool's -win32 option is usable in R2014a, because the installer will not allow you to install 32-bit and 64-bit versions to the same root directory (I just tried and got an error message that it is not supported). So it is not possible to meet the requirement that "you use the same MATLAB installation root for both 32-bit and 64-bit versions of MATLAB" (from deploytool documentation).
I also would like to know if there is a way to run deploytool in the foreground. Unless that is possible, I think a fully non-interactive build script would have to call mcc directly (presumably sacrificing some of the nice features of deploytool).
See Also
Categories
Find more on Standalone Applications in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!