Thread Subject: Matlab Compiler bug - force unzip of ctf file

Subject: Matlab Compiler bug - force unzip of ctf file

From: Tim

Date: 26 Mar, 2008 22:58:02

Message: 1 of 6

Hi,

We use Matlab Compiler and the Matlab Component Runtime for
the number crunching within our .NET C++ application.

As users will be aware the Matlab compilation process
produces a "CTF" file. This CTF file is distributed along
with the host application. During the initialization of
Matlab within the host application, it expands the CTF into
all the related p code. The bug is that sometimes it does
not recognize when a new version of the CTF has been
deployed, and fails to initiate the unzipping process.

For a long time we got around this by having our
application setup kit delete the matlab p code directory.
This would force the unzipping of the CTF file when our
application first run. However since the advent of Vista
with of its 'security' MSI setup kits are no longer allowed
this level of file access.

Does anyone else have this problem?

Is there an (undocumented) function available to the C++
app to force the unziping of the CTF file?

Thanks in advance,
Tim.

Subject: Matlab Compiler bug - force unzip of ctf file

From: colin

Date: 27 Mar, 2008 14:56:12

Message: 2 of 6

I'm not sure that this is helpful, as I do not know *how* it was done,
only *that* it was done.
I spoke to a IT guy at a bank who said they had put a timestamp in the
CTF file, and forced the exe to look for the ctf that matched its
timestamp
Therefore they did not need to delete anything

hope this helps

Subject: Matlab Compiler bug - force unzip of ctf file

From: Scott Burnside

Date: 27 Mar, 2008 15:53:04

Message: 3 of 6

colin <noidfreak@gmail.com> wrote in message <422c33f2-
ba44-42f9-8b2e-
09a8736182a5@s12g2000prg.googlegroups.com>...
> I'm not sure that this is helpful, as I do not know
*how* it was done,
> only *that* it was done.
> I spoke to a IT guy at a bank who said they had put a
timestamp in the
> CTF file, and forced the exe to look for the ctf that
matched its
> timestamp
> Therefore they did not need to delete anything
>
> hope this helps
>

I remember something like this as well. My notes for
deploying executables mentions that the files must be
moved .exe, then .ctf and then _mcr so that the timestamps
were in the correct order.

Scott

Subject: Matlab Compiler bug - force unzip of ctf file

From: Tim

Date: 27 Mar, 2008 16:14:03

Message: 4 of 6

"Scott Burnside" <no@spam.com> wrote in message <fsgft0
$jjp$1@fred.mathworks.com>...
> colin <noidfreak@gmail.com> wrote in message <422c33f2-
> ba44-42f9-8b2e-
> 09a8736182a5@s12g2000prg.googlegroups.com>...
> > I'm not sure that this is helpful, as I do not know
> *how* it was done,
> > only *that* it was done.
> > I spoke to a IT guy at a bank who said they had put a
> timestamp in the
> > CTF file, and forced the exe to look for the ctf that
> matched its
> > timestamp
> > Therefore they did not need to delete anything
> >
> > hope this helps
> >
>
> I remember something like this as well. My notes for
> deploying executables mentions that the files must be
> moved .exe, then .ctf and then _mcr so that the
timestamps
> were in the correct order.
>
> Scott


Thanks Colin & Scott for both of these suggestions.

Including the timestamp in the matlab ctf name is a novel
idea. I guess the downside of this is that old ctf
expanded archives will be left on users machines with each
successive upgrade.

Scott - to clarify - do you mean that the .ctf file must
have a timestamp later than the .exe for everything to
function correctly?

Regards,
Tim.

Subject: Matlab Compiler bug - force unzip of ctf file

From: Scott Burnside

Date: 27 Mar, 2008 17:35:03

Message: 5 of 6

"Tim " <tadler@wcmbllc.remove.this.com> wrote in message
<fsgh4b$59m$1@fred.mathworks.com>...
> "Scott Burnside" <no@spam.com> wrote in message <fsgft0
> $jjp$1@fred.mathworks.com>...
> > colin <noidfreak@gmail.com> wrote in message <422c33f2-
> > ba44-42f9-8b2e-
> > 09a8736182a5@s12g2000prg.googlegroups.com>...
> > > I'm not sure that this is helpful, as I do not know
> > *how* it was done,
> > > only *that* it was done.
> > > I spoke to a IT guy at a bank who said they had put
a
> > timestamp in the
> > > CTF file, and forced the exe to look for the ctf
that
> > matched its
> > > timestamp
> > > Therefore they did not need to delete anything
> > >
> > > hope this helps
> > >
> >
> > I remember something like this as well. My notes for
> > deploying executables mentions that the files must be
> > moved .exe, then .ctf and then _mcr so that the
> timestamps
> > were in the correct order.
> >
> > Scott
>
>
> Thanks Colin & Scott for both of these suggestions.
>
> Including the timestamp in the matlab ctf name is a
novel
> idea. I guess the downside of this is that old ctf
> expanded archives will be left on users machines with
each
> successive upgrade.
>
> Scott - to clarify - do you mean that the .ctf file must
> have a timestamp later than the .exe for everything to
> function correctly?
>
> Regards,
> Tim.

We would compile on a development linux box and then run
the .exe once on the dev box to create the _mcr. Then we
moved the .exe, .ctf and _mcr over to a server and they
had to be moved in that order. I never looked into why
this was necessary so I'm afraid that I don't know much
more about it.

Scott

Subject: Matlab Compiler bug - force unzip of ctf file

From: Tim

Date: 27 Mar, 2008 20:54:02

Message: 6 of 6

"Scott Burnside" <no@spam.com> wrote in message <fsgls7$6l3
$1@fred.mathworks.com>...
> "Tim " <tadler@wcmbllc.remove.this.com> wrote in message
> <fsgh4b$59m$1@fred.mathworks.com>...
> > "Scott Burnside" <no@spam.com> wrote in message <fsgft0
> > $jjp$1@fred.mathworks.com>...
> > > colin <noidfreak@gmail.com> wrote in message
<422c33f2-
> > > ba44-42f9-8b2e-
> > > 09a8736182a5@s12g2000prg.googlegroups.com>...
> > > > I'm not sure that this is helpful, as I do not know
> > > *how* it was done,
> > > > only *that* it was done.
> > > > I spoke to a IT guy at a bank who said they had put
> a
> > > timestamp in the
> > > > CTF file, and forced the exe to look for the ctf
> that
> > > matched its
> > > > timestamp
> > > > Therefore they did not need to delete anything
> > > >
> > > > hope this helps
> > > >
> > >
> > > I remember something like this as well. My notes for
> > > deploying executables mentions that the files must be
> > > moved .exe, then .ctf and then _mcr so that the
> > timestamps
> > > were in the correct order.
> > >
> > > Scott
> >
> >
> > Thanks Colin & Scott for both of these suggestions.
> >
> > Including the timestamp in the matlab ctf name is a
> novel
> > idea. I guess the downside of this is that old ctf
> > expanded archives will be left on users machines with
> each
> > successive upgrade.
> >
> > Scott - to clarify - do you mean that the .ctf file
must
> > have a timestamp later than the .exe for everything to
> > function correctly?
> >
> > Regards,
> > Tim.
>
> We would compile on a development linux box and then run
> the .exe once on the dev box to create the _mcr. Then we
> moved the .exe, .ctf and _mcr over to a server and they
> had to be moved in that order. I never looked into why
> this was necessary so I'm afraid that I don't know much
> more about it.
>
> Scott
>

That makes sense. We were wondering if the unzipping of
the CTF archive was OS specific (2000/XP/Vista etc..).
Your work around would suggest that it is not OS specific.

Thanks.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
compiler ctf c Tim 26 Mar, 2008 19:00:23
rssFeed for this Thread

Contact us at files@mathworks.com