Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Custom build actione

2 views
Skip to first unread message

Sid Price

unread,
Apr 2, 2003, 11:03:08 AM4/2/03
to
I would like to run a small EXE each time I build my platform (PB 4.1). This
EXE generates a build number and date stamp text file that is built into the
image. I have searched the help and I just can't figure out how to do it,
could someone please point me in the right direction?

Thanks
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------


Paul G. Tobey [eMVP]

unread,
Apr 2, 2003, 11:17:44 AM4/2/03
to
Wow, now everyone is doing this. There are some recent messages from me
about doing this same thing. Here is my strategy:

1. Create a CEC file for the versioning capability. The CEC file will tell
the build system what it wants to do (in my case, run a custom EXE), and
when it needs to do it (in my case, during the PreMakeImg stage of the
build). The #CUSTOM build action allows you to run a batch file or EXE (as
indicated in my other messages, don't put the EXE in the same directory
where it's supposed to run, however, unless you include the full path).

2. Add this CEC file to the catalog (File|Manage Catalog Features... menu
item in PB).

3. Add the feature to your project (find it in the catalog and add feature
to platform).

Depending on what exectly you're doing and when it needs to be done, this
should handle most cases.

Paul T.

"Sid Price" <sidp...@softtools.com> wrote in message
news:OnYZcFT#CHA....@TK2MSFTNGP11.phx.gbl...

Sid Price

unread,
Apr 2, 2003, 11:25:01 AM4/2/03
to
Thanks Paul, I will look into doing this.

Once again it seems to me that this a missing feature of the tool chain, to
be able to version the image. With DevStudio and eVC one has to play similar
games to get the version of an EXE or DLL updated automatically. This is
something that should be bult into all these kinds of tools. Now VB has it
built-in!

Thanks again,
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message
news:#8swbNT#CHA....@TK2MSFTNGP10.phx.gbl...

Paul G. Tobey [eMVP]

unread,
Apr 2, 2003, 11:30:22 AM4/2/03
to
I'm with you! What I'm doing now is really for support. When a customer
calls in, they want to know what version of the OS image he is using. I'm
modifying copyrts.txt, which is a shell component, to add our copyright and
have an autoincrementing version number. This is displays on one of the
tabs in the System Control Panel applet, which is a good place for us.
However, why PB shouldn't be able to keep track of the number of builds is a
bit of a mystery. That would work for a single-user scenario, at least.

Paul T.

"Sid Price" <sidp...@softtools.com> wrote in message

news:#Ke3qRT#CHA....@TK2MSFTNGP10.phx.gbl...

Sid Price

unread,
Apr 2, 2003, 1:33:39 PM4/2/03
to
I can't get my EXE to run. Could you take a look at this CEC segment and see
if you see any problem please:

ComponentType
(
Name ( "Build Control" )
GUID ( {0C5D229C-8CAE-4338-A329-3F019A97C632} )
MaxResolvedImpsAllowed( 1 )
Implementations
(
Implementation
(
Name ( "IncrementBuild" )
GUID ( {590257B3-5303-44FB-A265-079DDC4E4F52} )
Description ( "Increment the build number file for the current
platform" )
Version ( "4.1.0.0" )
Locale ( 0409 )
Vendor ( "Sid Price Software Tools" )
Date ( "4/2/2003" )
SizeIsCPUDependent( 1 )
BuildMethods
(
BuildMethod
(
GUID ( {DB394F4A-ABED-4AD3-8A04-3C48B17C8E63} )
Step ( PreMakeImg )
CPU ( "emulator" )
CPU ( "x86" )
CoreOS ( "IABASE" )
CoreOS ( "HLBASE" )
Action ( '#CUSTOM("$(_FLATRELEASEDIR)",
"$(_WINCEROOT)\COMMON\BuildInc\BuildInc.exe")' )
)
)
)
)
)

Thanks
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message
news:OYoOfUT#CHA....@TK2MSFTNGP11.phx.gbl...

Dean Ramsier

unread,
Apr 2, 2003, 1:35:55 PM4/2/03
to
If you're not picky about how the versioning is done, you could always use
the build time/date. That information is readily available at compile time,
and is a quick and easy way to do versioning.

--
Dean Ramsier - eMVP
Accelent Systems
http://www.accelent.com

"Sid Price" <sidp...@softtools.com> wrote in message
news:OnYZcFT#CHA....@TK2MSFTNGP11.phx.gbl...

Paul G. Tobey [eMVP]

unread,
Apr 2, 2003, 1:45:07 PM4/2/03
to
Sid,

I *don't* see anything wrong. What exactly does the build log say when it
fails? You *are* intending to limit the tool to x86 and emulator builds,
right? Any chance that the GUIDs are copied from some other CEC already in
the build, causing a problem?

Paul T.

"Sid Price" <sidp...@softtools.com> wrote in message

news:eGoDjZU#CHA....@TK2MSFTNGP10.phx.gbl...

Sid Price

unread,
Apr 2, 2003, 2:05:11 PM4/2/03
to
I made the CEC skeleton with the CEC editor then placed my CUSTOM command
into it. I imported it into the catalog and added it to my platform.

Now at this point the EXE does NOT live where the CEC file says it is, in
fact it doesn't exist I am still writing it. So, when I build my platform it
should error right? Well I see no error and my platform builds.

Any clues?
Sid

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message

news:emJdyfU#CHA....@TK2MSFTNGP10.phx.gbl...

Steve Maillet (eMVP)

unread,
Apr 2, 2003, 3:11:16 PM4/2/03
to
Unfortunately every company wants to do versioning a bit different. And
while a single user situation might work for small companies it doesn't work
with more then one developer very well as they end up with competing build
numbers.

Keeping that in mind it would be nice if the tools provided an open
architecture based on real world scenarios covering the single developer
scenario to large teams where only the QA group assigns build numbers. There
are a number of ways to do this using CEC files and the post processing BAT
files. But no standard has arisen as of yet.

--
Steve Maillet (eMVP)
Entelechy Consulting
smaillet_AT_EntelechyConsulting_DOT_com


Sid Price

unread,
Apr 2, 2003, 4:56:40 PM4/2/03
to
Bigger Hmmm, after many attempts and then a "clean" the utility now runs. Go
figure :o|

I have two more questions: Is there a macro to get to my project base
directory, I tried $(_TARGETPLATROOT) but that takes me to the root of the
BSP not the platform I am building. By using this the CEC becomes generic
since I can copy to $(_FLATRELEASEDIR). BTW: Where are these very useful
macros listed?

Also, which output stream of my utility will PB capture for the output
window? I would like some confirmation that it has run. I tried making it a
console application and using printf, but that did not appear.

Many thanks for all the help,
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message

news:O0rgaJV#CHA....@TK2MSFTNGP11.phx.gbl...
> Hmmm. If you do a Clean from the Build menu (I'm assuming you're using PB
> 4.1, I guess), it should do the custom step very early in the process.
> Also, if you do a Make Image from the Build Menu, it's pretty much the
first
> thing that happens. It generates a red error line in the build output
window
> for me when it can't find the EXE. The only thing that might be a problem
> is the CPU choice or, maybe, the OS choice (IABase, etc.). I don't even
> have an OS type in my CEC file. My CEC is attached.


>
> Paul T.
>
> "Sid Price" <sidp...@softtools.com> wrote in message

> news:uqRYMrU#CHA....@TK2MSFTNGP10.phx.gbl...

Sid Price

unread,
Apr 2, 2003, 5:21:29 PM4/2/03
to
I think I got the macro figured out: $(_PUBLICROOT)\$(_TGTPROJ).

Where is this stuff documented?

Still would like some output from my utility in the output window, any
pointers please,
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Sid Price" <sidp...@softtools.com> wrote in message
news:u19R#KW#CHA....@TK2MSFTNGP11.phx.gbl...

Steve Maillet (eMVP)

unread,
Apr 2, 2003, 5:31:50 PM4/2/03
to
print should output to the build window...

The macros are unfortunately not documented in any one place. Worse yet the
available macros are different depending on where you are trying to use
them! This is an area of the tools that is need of some cleaning up.

Paul G. Tobey [eMVP]

unread,
Apr 2, 2003, 5:40:40 PM4/2/03
to
I'm using _tprintf() from my (non-Unicode), Win32 application to put some
text in the build log.

Paul T.

"Steve Maillet (eMVP)" <nos...@EntelechyConsulting.com> wrote in message
news:OH68KfW#CHA....@TK2MSFTNGP11.phx.gbl...

Sid Price

unread,
Apr 2, 2003, 5:54:14 PM4/2/03
to
Thanks Paul and Steve, my utility is now in place and working,
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message

news:eyEQajW#CHA....@TK2MSFTNGP10.phx.gbl...

Dean Ramsier

unread,
Apr 3, 2003, 2:13:32 PM4/3/03
to
If you're asking about the $(xyz) stuff, those are environment variables.
The best way to figure out those is to open a build window (Build->Open
BuildReleaseDirectory) and dump the environment. Lots of useful things
there.

--
Dean Ramsier - eMVP
Accelent Systems
http://www.accelent.com

"Sid Price" <sidp...@softtools.com> wrote in message
news:em$81YW#CHA....@TK2MSFTNGP11.phx.gbl...

Sid Price

unread,
Apr 3, 2003, 2:40:11 PM4/3/03
to
Funny you should mention that! That is exactly how I got this to work.

Thanks for taking the time to respond,
Sid.

--

----------------------------------------
Sid Price's Software Tools
http://www.softtools.com
-----------------------------------------

"Dean Ramsier" <dramsie...@accelentnospam.com> wrote in message
news:eWgSfUh#CHA....@TK2MSFTNGP12.phx.gbl...

0 new messages