Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
mhow to get the date of compilation of standalones automatically?

Subject: mhow to get the date of compilation of standalones automatically?

From: nor ki

Date: 28 Apr, 2008 08:36:02

Message: 1 of 2

Hi,

As I distribute standalones it would be nice to have an
internal control of the date of compilation.

So I just tried to use mfilename('fullpath') in order to get
the location of the *.exe and then I wanted to get its date
with the dir command.

But in 2008a the exe file is expanded in a directory which
is not necesarrily a subdirectory of the exe file path.

As mfilename gives back the path in which the file was
expanded the date of this file only contains the date of
first execution on this machine and not the date when the
file was compiled.

Any idea how to get the compilation date of a file
automatically in 2008a ?

thank you very much for every idea

kinor

Subject: mhow to get the date of compilation of standalones automatically?

From: Jonathan

Date: 20 Apr, 2009 20:11:01

Message: 2 of 2

in mkproj.m

fid = fopen('builddate.m','w');
    fprintf(fid, 'function s = builddate\n');
    fprintf(fid, 's=''%s'';\n',date);
    fclose(fid);
    
    mcc -F 'C:\home\proj\dvb-sh\ofdm_sim_src\DVB.prj'

in my project:

if isdeployed,
    fprintf('>>> Build date: %s <<<\n', builddate);
end



"nor ki" <kinor.removeme@gmx.de> wrote in message <fv429i$il1$1@fred.mathworks.com>...
> Hi,
>
> As I distribute standalones it would be nice to have an
> internal control of the date of compilation.
>
> So I just tried to use mfilename('fullpath') in order to get
> the location of the *.exe and then I wanted to get its date
> with the dir command.
>
> But in 2008a the exe file is expanded in a directory which
> is not necesarrily a subdirectory of the exe file path.
>
> As mfilename gives back the path in which the file was
> expanded the date of this file only contains the date of
> first execution on this machine and not the date when the
> file was compiled.
>
> Any idea how to get the compilation date of a file
> automatically in 2008a ?
>
> thank you very much for every idea
>
> kinor

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us