Add version information for Matlab R2015b compiled DLLs
1 view (last 30 days)
Show older comments
Hello,
I use Matlab R2015b and mcc for compiling matlab scripts to .dll files for deployment.
I want to add version information (file version, product version, product name, company, copyright information,...) to compiled dlls.
I have created a resource definition .rc file with required fields
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 1, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0
BEGIN
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0" 0x0409
BEGIN
VALUE "FileVersion", "1.1.0.0"
VALUE "CompanyName", "MyCompany"
VALUE "FileDescription", "FilesDescription"
VALUE "Copyright", "MyCompany Copyright"
VALUE "ProductName", "MyProduct"
VALUE "ProductVersion", "1.0.0.0"
END
END
END
I compiled .rc file to .res file using rc.exe from Microsoft Visual Studio 2015.
The link https://in.mathworks.com/matlabcentral/answers/15417-is-it-possible-to-add-file-product-version-information-to-an-executable-compiled-with-mcc provides an mcc command (R2011a) that allows to specify a compiled resource file (res) as argument with -l option for embedding version information in matlab compiled dlls. But I could not get it work. In fact, mcc in my machine does not support a -l option.
The command I use to create dll is
mcc -v -a testfile1.m -W cpplib:libTest -T link:lib Test.m -d E:\Test\bin
How can I use this command to add version information to the compiled dll files?
The OPTIONS supported from mcc installed in my machine:
a <filename> Add <filename> to the deployable archive. If the specified
file is an m, mex or p file, this function will not be exported in the
resulting target.
C Generate a separate deployable archive.
d <directory> Output directory.
e Suppress MS-DOS Command Window. Use in place of -m.
g Include debugging symbol information.
I <path> Add <path> to the list of paths to search for files.
m Generate a standalone application.
N Clear the compilation search path of all directories except the following
core directories:
<matlabroot>/toolbox/matlab
<matlabroot>/toolbox/local
<matlabroot>/toolbox/compiler
o <outputfilename> Output name.
p <directory> Add <directory> to the compilation search path. This
option can only be used in conjunction with the -N option.
R <option> Specify the run-time options for the MATLAB Runtime.
v Verbose.
Y <license.dat file> Override the default license.dat file.
Thanks all.
0 Comments
Answers (0)
See Also
Categories
Find more on Deploy to C++ Applications Using mwArray API (C++03) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!