我有一个deploytool项目,如果我在MATLAB中运行deploytool,它可以正确地编译MATLAB命令行应用程序并将其打包到windows 64可安装的exe文件中。如果我在MATLAB deploytool GUI中构建,打包过程也能正常工作。
如果我从Windows命令行运行deploytool,则同一项目正确构建应用程序,结果在for_testing文件夹中,但无法使用错误消息“程序包失败”创建可安装映像,但没有进一步信息。我找不到日志文件或任何其他数据来帮助解决问题。
请帮忙。
我在64位Windows 7下使用MATLAB R2014a。
这是MATLAB内部的输出(对于deploytool或applicationcompiler是相同的)。有点奇怪的是MATLAB命令提示符在mcc行之后返回,虽然进程仍然在运行,但就好像它在后台运行一样:
>> applicationCompiler -package nam_converter.prj
Some of the build deliverables are missing. Rebuilding the project.
ant:
<ant>
<mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_redistribution" />
<mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing" />
</ant>
mcc -C -o nam_converter -W main:nam_converter -T link:exe -d C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing -R '-logfile,nam_converter.log' -v C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m
Compiler version: 5.1 (R2014a)
Dependency analysis by REQUIREMENTS.
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\matlab\winfun\NET
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR\dataclasses
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\simulink\simulink\MPlayIO
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\slvnv\reqmgt\RTExplorer
> In path at 33
In requirements at 156
[Warning: Adding path
"C:\Users\ndavies\Documents\matlab_utilities\nam_converter" to Compiler path
instance.
Parsing file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\printdlg.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\readme.txt".
Start packaging process
Packaging...
Adding custom icon C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter_resources\icon.ico to C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\nam_converter.exe.
Attempting to embed the CTF archive into the application C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\nam_converter.exe.
Finished embedding CTF archive. Deleting the external CTF archive.
Creating the bundle...
Web based installer created at C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_redistribution\nam_converter_installer_web.exe.
Packaging complete.
Package finished
以下是命令窗口中的输出:
C:\Users\ndavies\Documents\matlab_utilities\nam_converter>deploytool -package nam_converter.prj
Some of the build deliverables are missing. Rebuilding the project.
ant:
<ant>
<mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_redistribution" />
<mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing" />
</ant>
mcc -C -o nam_converter -W main:nam_converter -T link:exe -d C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing -R '-logfile,nam_converter.log' -v C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m
lprj
mcc -C -o 'nam_converter' -W 'main:nam_converter' -T 'link:exe' -d 'C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing' -R -logfile,nam_converter.log -v 'C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m'
Compiler version: 5.1 (R2014a)
Dependency analysis by REQUIREMENTS.
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\matlab\winfun\NET
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR\dataclasses
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\simulink\simulink\MPlayIO
> In path at 33
In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\slvnv\reqmgt\RTExplorer
> In path at 33
In requirements at 156
Warning: Adding path
"C:\Users\ndavies\Documents\matlab_utilities\nam_converter" to Compiler path
instance.
Parsing file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\printdlg.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\readme.txt".
Start packaging process
Package failed
C:\Users\ndavies\Documents\matlab_utilities\nam_converter>
答案 0 :(得分:1)
这在MATLAB R2014a中是一个错误,已在R2014b中修复。