Hi,
I encountered two problems when I tried to compile Brainstorm by modifying the two files ‘bst_deploy_java_2016b.m’ and 'bst_javabuilder_2016b.prj' under the deploy folder.
Thanks in advance for your help!
Best Regards,
Pan
Ref:hot-to-compile-generated-scritp/1647
Build environment:
JDK version: 1.7.0_75
MATLAB version:R2016b
System environment:Window10
Brainstorm3 source code path:C:\Users\admin\Desktop\brainstorm3
Problem 1:
When I compile brainstom by bst_deploy_java_2016b.m
, I got some error messages.
I found that the brainstorm3_deploy\R2016b\sigproc
file is missing.
Error Message
DEPLOY> Starting Matlab Compiler...
Error: Caught exception when building project: C:\Users\admin\Desktop\brainstorm3\deploy\bst_javabuilder_2016b.prj
com.mathworks.project.api.InvalidProjectException
File sigproc from Files required for your library to run does not exist.
DEPLOY> Packaging binary distribution...
Problem 2:
When I went to step system(['deploytool -build ', compilerFile])
, the program (bst_deploy_java_2016b.m
) went wrong.
Error Message
DEPLOY> Starting Matlab Compiler...
Start build process
mcc -W 'java:bst_javabuilder_2016b,Run' -T link:lib -d C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing class{Run:C:\Users\admin\Desktop\brainstorm3\brainstorm.m} -a C:\Users\admin\Desktop\brainstorm3\defaults -a C:\Users\admin\Desktop\brainstorm3\deploy -a C:\Users\admin\Desktop\brainstorm3\doc -a C:\Users\admin\Desktop\brainstorm3\external -a C:\Users\admin\Desktop\brainstorm3\java -a C:\Users\admin\Desktop\brainstorm3\toolbox
lprj
Error using getSymbolNames
Import argument "org.brainstorm.tree.BstNode" in MATLAB code
'C:\Users\admin\Desktop\brainstorm3\toolbox\tree\node_create_subject.m' cannot
be found or cannot be imported.
Error in matlab.depfun.internal.MatlabInspector/getSymbols (line 161)
[F, S] = getSymbolNames(w);
Error in matlab.depfun.internal.MwFileInspector/analyzeSymbol (line 33)
symlist = getSymbols(obj, client.WhichResult);
Error in matlab.depfun.internal.Completion/findDependentFiles (line 1349)
analyzeSymbol(inspector, symbol);
Error in matlab.depfun.internal.Completion/computeDependencies (line 263)
findDependentFiles(obj);
Error in matlab.depfun.internal.Completion/computePartsList (line 2012)
computeDependencies(obj);
Error in matlab.depfun.internal.Completion/requirements (line 2412)
parts = computePartsList(obj, false);
Error in matlab.depfun.internal.requirements (line 215)
[parts, resources.products, resources.platforms] = c.requirements();
mcc -W 'java:bst_javabuilder_2016b,Run' -T 'link:lib' -d 'C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing' 'class{Run:C:\Users\admin\Desktop\brainstorm3\brainstorm.m}' -a 'C:\Users\admin\Desktop\brainstorm3\defaults' -a 'C:\Users\admin\Desktop\brainstorm3\deploy' -a 'C:\Users\admin\Desktop\brainstorm3\doc' -a 'C:\Users\admin\Desktop\brainstorm3\external' -a 'C:\Users\admin\Desktop\brainstorm3\java' -a 'C:\Users\admin\Desktop\brainstorm3\toolbox'
Unexpected error while determining required deployable files. Compilation terminated.
Build failed
DEPLOY> Packaging binary distribution...
Error using bst_deploy_java_2016b (line 279)
Compilation is incomplete: cannot package the binary distribution.
Error in brainstorm (line 340)
bst_deploy_java(varargin{2:end});
bst_javabuilder_2016b.prj:
<deployment-project plugin="plugin.ezdeploy" plugin-version="1.0">
<configuration build-checksum="805395868" file="C:\Users\admin\Desktop\brainstorm3\deploy\bst_javabuilder_2016b.prj" location="C:\Users\admin\Desktop\brainstorm3\deploy" name="bst_javabuilder_2016b" target="target.ezdeploy.library" target-name="Library Compiler">
<param.appname>bst_javabuilder_2016b</param.appname>
<param.icon />
<param.icons />
<param.version>1.0</param.version>
<param.authnamewatermark>Francois Tadel</param.authnamewatermark>
<param.email>francois.tadel@mcgill.ca</param.email>
<param.company>McGill University</param.company>
<param.summary />
<param.description />
<param.screenshot />
<param.guid />
<param.installpath.string>\McGill University\bst_javabuilder_2016b\</param.installpath.string>
<param.installpath.combo>option.installpath.programfiles</param.installpath.combo>
<param.logo />
<param.install.notes />
<param.target.install.notes />
<param.intermediate>C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing</param.intermediate>
<param.files.only>C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_redistribution_files_only</param.files.only>
<param.output>C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_redistribution</param.output>
<param.enable.clean.build>false</param.enable.clean.build>
<param.user.defined.mcr.options />
<param.embed.ctf>true</param.embed.ctf>
<param.target.type>subtarget.java.package</param.target.type>
<param.support.packages />
<param.required.mcr.products>
<item>35000</item>
<item>35010</item>
</param.required.mcr.products>
<param.namespace />
<param.classorg />
<param.web.mcr>false</param.web.mcr>
<param.package.mcr>false</param.package.mcr>
<param.no.mcr>false</param.no.mcr>
<param.web.mcr.name>MyAppInstaller_web</param.web.mcr.name>
<param.package.mcr.name>MyAppInstaller_mcr</param.package.mcr.name>
<param.no.mcr.name>MyAppInstaller_app</param.no.mcr.name>
<param.windows.command.prompt>true</param.windows.command.prompt>
<param.create.log>false</param.create.log>
<param.log.file />
<param.user.only.registration>false</param.user.only.registration>
<param.net.framework>option.net.framework.default</param.net.framework>
<param.assembly.type>false</param.assembly.type>
<param.encryption.key.file />
<param.net.enable.remoting>false</param.net.enable.remoting>
<param.net.tsa.enable>false</param.net.tsa.enable>
<param.net.tsa.assembly />
<param.net.tsa.interface />
<param.net.tsa.namespace />
<param.net.tsa.superclass>Run</param.net.tsa.superclass>
<param.net.tsa.metadata />
<param.net.tsa.metadata.assembly>C:\Users\admin\Desktop\brainstorm3</param.net.tsa.metadata.assembly>
<param.net.saved.interface />
<unset>
<param.icon />
<param.icons />
<param.version />
<param.authnamewatermark />
<param.email />
<param.company />
<param.summary />
<param.description />
<param.screenshot />
<param.guid />
<param.installpath.string />
<param.installpath.combo />
<param.logo />
<param.target.install.notes />
<param.enable.clean.build />
<param.user.defined.mcr.options />
<param.embed.ctf />
<param.support.packages />
<param.namespace />
<param.classorg />
<param.package.mcr />
<param.no.mcr />
<param.web.mcr.name />
<param.package.mcr.name />
<param.no.mcr.name />
<param.windows.command.prompt />
<param.create.log />
<param.log.file />
<param.user.only.registration />
<param.net.framework />
<param.assembly.type />
<param.encryption.key.file />
<param.net.enable.remoting />
<param.net.tsa.enable />
<param.net.tsa.assembly />
<param.net.tsa.interface />
<param.net.tsa.namespace />
<param.net.tsa.superclass />
<param.net.tsa.metadata />
<param.net.tsa.metadata.assembly />
<param.net.saved.interface />
</unset>
<fileset.exports>
<file>C:\Users\admin\Desktop\brainstorm3\brainstorm.m</file>
</fileset.exports>
<fileset.classes>
<entity.package name="">
<entity.class name="Run">
<file>C:\Users\admin\Desktop\brainstorm3\brainstorm.m</file>
</entity.class>
</entity.package>
</fileset.classes>
<fileset.resources>
<file>C:\Users\admin\Desktop\brainstorm3\defaults</file>
<file>C:\Users\admin\Desktop\brainstorm3\deploy</file>
<file>C:\Users\admin\Desktop\brainstorm3\doc</file>
<file>C:\Users\admin\Desktop\brainstorm3\external</file>
<file>C:\Users\admin\Desktop\brainstorm3\java</file>
<file>C:\Users\admin\Desktop\brainstorm3\toolbox</file>
<file>C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\sigproc</file>
</fileset.resources>
<fileset.depfun />
<fileset.package />
<build-deliverables>
<file location="C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing" name="bst_javabuilder_2016b.jar" optional="false">C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing\bst_javabuilder_2016b.jar</file>
<file location="C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing" name="doc" optional="false">C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing\doc</file>
<file location="C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing" name="readme.txt" optional="true">C:\Users\admin\Desktop\brainstorm3_deploy\R2016b\bst_javabuilder\for_testing\readme.txt</file>
</build-deliverables>
<workflow />
<matlab>
<root>C:\Program Files\MATLAB\R2016b</root>
<toolboxes />
</matlab>
<platform>
<unix>false</unix>
<mac>false</mac>
<windows>true</windows>
<win2k>false</win2k>
<winxp>false</winxp>
<vista>false</vista>
<linux>false</linux>
<solaris>false</solaris>
<osver>6.1</osver>
<os32>false</os32>
<os64>true</os64>
<arch>win64</arch>
<matlab>true</matlab>
</platform>
</configuration>
</deployment-project>