0

如果我在 MATLAB 中运行 deploytool,我有一个 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>
4

1 回答 1

1

事实证明这是 MATLAB R2014a 中的一个错误,在 R2014b 中已修复。

于 2015-02-06T08:27:47.393 回答