Hi All,

I am working with PB 5.0 on an XP Pro - SP2 machine.

I recently lost the ability to make a change in Project.reg, launch Makeimg
(Make Run-Time Image) and see my change in the freshly generated
reginit.ini.

As a temporary workaround, I added a Custom Build Action to my Project
Settings in order to enforce the copy of the Project files in the Pre-Make
Image step:

copy %_PROJECTOAKROOT%\files\project.* %_FLATRELEASEDIR%

Looking at the output, I discovered that there was a file access issue:

makeimg: run command: cmd /C C:\WINCE500\public\common\oak\misc\pbpremakeimg
Generating PBWorkspace Custom makeimg build step batch Files to
C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak
Done Generating PBWorkspace Custom makeimg build step batch Files
Doing PreMakeImage Custom Build Actions
C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.bib
Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
un autre processus.
C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.dat
Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
un autre processus.
C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.db
Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
un autre processus.
C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.reg
0 fichier(s) copi,(s).
Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
un autre processus.
Done Doing PreMakeImage Custom Build Actions

In english, the offending message states that "The process can't access the
file because this file is used by another process". Of course, I am unable
to see what other process could be accessing my Project files.

If I then "touch" the files with Platform Builder (i.e. forcing PB to write
them to the disk), the copy works, until the next boot...

Any hints and sugestions are welcome.

Remi

Re: Makeimg not copying project files to FLATRELEASEDIR by Dean

Dean
Thu Mar 09 08:09:17 CST 2006

One thing to clear up (you probably already know), makeimg is not
responsible for doing the copy. That job belongs to buildrel. You need to
either run that step manually, or check the menu item so it happens
automatically. Make sure that process is happening instead of relying on
the batch file, see if it gets you anywhere.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Remi de Gravelaine" <gravelaine at aton dash sys dot fr> wrote in message
news:eFi9nd1QGHA.4300@TK2MSFTNGP14.phx.gbl...
> Hi All,
>
> I am working with PB 5.0 on an XP Pro - SP2 machine.
>
> I recently lost the ability to make a change in Project.reg, launch
> Makeimg (Make Run-Time Image) and see my change in the freshly generated
> reginit.ini.
>
> As a temporary workaround, I added a Custom Build Action to my Project
> Settings in order to enforce the copy of the Project files in the Pre-Make
> Image step:
>
> copy %_PROJECTOAKROOT%\files\project.* %_FLATRELEASEDIR%
>
> Looking at the output, I discovered that there was a file access issue:
>
> makeimg: run command: cmd /C
> C:\WINCE500\public\common\oak\misc\pbpremakeimg
> Generating PBWorkspace Custom makeimg build step batch Files to
> C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak
> Done Generating PBWorkspace Custom makeimg build step batch Files
> Doing PreMakeImage Custom Build Actions
> C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.bib
> Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
> un autre processus.
> C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.dat
> Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
> un autre processus.
> C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.db
> Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
> un autre processus.
> C:\WINCE500\PBWorkspaces\EBB615EX\WINCE500\EBB615_x86\oak\files\project.reg
> 0 fichier(s) copi,(s).
> Le processus ne peut pas acc,der au fichier car ce fichier est utilis, par
> un autre processus.
> Done Doing PreMakeImage Custom Build Actions
>
> In english, the offending message states that "The process can't access
> the file because this file is used by another process". Of course, I am
> unable to see what other process could be accessing my Project files.
>
> If I then "touch" the files with Platform Builder (i.e. forcing PB to
> write them to the disk), the copy works, until the next boot...
>
> Any hints and sugestions are welcome.
>
> Remi
>
>



Re: Makeimg not copying project files to FLATRELEASEDIR by Remi

Remi
Thu Mar 09 12:03:57 CST 2006

Thanks a lot for your answer Dean,

There is something I missed: I really had the feeling that makeimg was
responsible for doing the project files copy and that I used this way
before, as it was the case in 4.2!

Moreover, one can read in 5.0 help, "Build Phases" topic, "Make Run-Time
Image Phase" section:

"At the beginning of the phase, the project-specific files, which include
Project.bib, Project.dat, Project.db, and Project.reg, are copied to the
release directory."

Buildrel + Makeimg do the trick however, so I can keep on working in an
acceptable way :-)

Thanks again.
Remi



Re: Makeimg not copying project files to FLATRELEASEDIR by Dean

Dean
Thu Mar 09 13:20:08 CST 2006

That statement is misleading at best, more likely just plain incorrect. The
Release Copy Phase described just above is the one that does the buildrel.
The build sequence has always worked this way (including 4.2), at least as
long as I've been involved with CE.

There is one other thing to take note of. The release copy phase (buildrel)
can do either a normal xcopy or create hard links. If the links are enabled
and your editor doesn't break the links when modifying a file, then an edit
to a file on one side of the link will cause it to change on the other.
This could explain why it used to work for you. You might have disabled
this feature, or switched to a different editor, or never run buildrel the
first time to create the initial link.

Note that the feature can be dangerous, editing a file in the flat release
directory will modify the original source file. You can unintentionally
cause all sorts of damage that way, but it sure speeds up the buildrel...

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Remi de Gravelaine" <gravelaine at aton dash sys dot fr> wrote in message
news:ek6Z9P6QGHA.2276@tk2msftngp13.phx.gbl...
> Thanks a lot for your answer Dean,
>
> There is something I missed: I really had the feeling that makeimg was
> responsible for doing the project files copy and that I used this way
> before, as it was the case in 4.2!
>
> Moreover, one can read in 5.0 help, "Build Phases" topic, "Make Run-Time
> Image Phase" section:
>
> "At the beginning of the phase, the project-specific files, which include
> Project.bib, Project.dat, Project.db, and Project.reg, are copied to the
> release directory."
>
> Buildrel + Makeimg do the trick however, so I can keep on working in an
> acceptable way :-)
>
> Thanks again.
> Remi
>
>



Re: Makeimg not copying project files to FLATRELEASEDIR by Remi

Remi
Fri Mar 10 02:29:43 CST 2006

Dean, in 4.2, I am *certain* of this behaviour:

1) Make a clean build or start from an already built image.
2) Make a change in project.reg (for instance)
3) Make a "Build / Make Image"
4) Check that a) the new project.reg file ends in FLATRELEASEDIR, b)
changes are visible in reginit.ini

I reactivated an old computer to check it again.
In 5.0, I have a doubt but I really have the feeling that it once worked
this way.

In 4.2, output log explicitly states "BUILDREL: Using xcopy command" at the
beginning of the phase, while in 5.0 "BUILDREL: Using copylink command" is
written. So there's a real difference and I have the feeling my troubles can
come from the hard links. I confess that I already edited files with
notepad, eVC++, VS and even Visual C++ 1.52 while they were open in PB 5.0.
I'll try to avoid this in the future. I experienced hard links with Unix in
the past and I agree with you that they can be very dangerous!

Thanks again.
Remi



Re: Makeimg not copying project files to FLATRELEASEDIR by Dean

Dean
Fri Mar 10 07:48:54 CST 2006

Glad you've got it figured out. I don't doubt that it worked the way you
described in 4.2, I'm just describing what is really going on behind the
scenes. Buildrel is the operation that performs the copy, whether you
manually call it or the IDE is doing it for you. Step 3, Build/Makeimg is
also calling buildrel it just isn't obvious from the menu label.

In 5.0 MS changed the build menus to more closely align with the operations
that are actually taking place.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Remi de Gravelaine" <gravelaine at aton dash sys dot fr> wrote in message
news:eOotX1BRGHA.336@TK2MSFTNGP12.phx.gbl...
> Dean, in 4.2, I am *certain* of this behaviour:
>
> 1) Make a clean build or start from an already built image.
> 2) Make a change in project.reg (for instance)
> 3) Make a "Build / Make Image"
> 4) Check that a) the new project.reg file ends in FLATRELEASEDIR, b)
> changes are visible in reginit.ini
>
> I reactivated an old computer to check it again.
> In 5.0, I have a doubt but I really have the feeling that it once worked
> this way.
>
> In 4.2, output log explicitly states "BUILDREL: Using xcopy command" at
> the beginning of the phase, while in 5.0 "BUILDREL: Using copylink
> command" is written. So there's a real difference and I have the feeling
> my troubles can come from the hard links. I confess that I already edited
> files with notepad, eVC++, VS and even Visual C++ 1.52 while they were
> open in PB 5.0. I'll try to avoid this in the future. I experienced hard
> links with Unix in the past and I agree with you that they can be very
> dangerous!
>
> Thanks again.
> Remi
>