Re: Add user defined file to my SDK by Paul
Paul
Tue Apr 22 08:55:02 PDT 2008
Yes, you don't see the actual copy command lines in the build log. I think
that you could, in the dependency list for CopySDK (makefile.inc), use @echo
on and @echo off to cause the operation to show in the log file, but that
never seemed important to me.
You don't want to use postlink.bat because that will only be executed in
certain situations and those might not match what you actually do. This
wouldn't necessarily completely screw you up, but you might miss getting an
updated file into the SDK or something. Making CopySDK an extra target for
the build means that any time the project's build state is checked, the
latest files will get copied.
Paul T.
"Rob" <Rob@discussions.microsoft.com> wrote in message
news:9F1C6ECF-1D04-4D28-A3CB-1618C0210B46@microsoft.com...
> Update: it DOES copy the files, just no trace of it in the build output.
> (including the echo)
> Rob.
>
>
> "Rob" wrote:
>
>> Hi Paul,
>> the BSP guys are "considdering to fix it in the next release"
>> Translated to dutch this means something like "fix it yourself" ;-)
>>
>> I am now trying you suggestion with the makefile.inc.
>> If I build my subproject, I doNOT see the echo after "CopySDK:".
>> if I put a deliberate typo in the INC file it does complain, so it is
>> handled.
>>
>> in MDSN I find that after "CopySDK:" a dependent file should be stated.
>> Which is empty in this case ?
>> Any idea why it isn't performing my statements ? Did you leave out some
>> details ?
>>
>> What's wrong with doing the copy from postlink.bat ?
>> I noticed that since CE5, the behaviour of postlink.bat seems differrent
>> (is
>> not anymore called after each build, haven't figured it out in detail
>> yet)
>> do you know anything about this ?
>>
>> Greetings,
>> Rob.
>>
>>
>>
>>
>>
>>
>>
>> "Paul G. Tobey [eMVP]" wrote:
>>
>> > Yes, a user project can do it. Base the project on SOURCES/DIRS, and
>> > create
>> > suitable SOURCES and MAKEFILE.INC files (you can make the project
>> > basically
>> > empty by having it built a LIBRARY and just have a dummy .C source file
>> > as
>> > the only SOURCES entry.
>> >
>> > Naturally, putting the files that should be in the SDK from the BSP
>> > into the
>> > SDK is the BSP developer's job. You never said you weren't the BSP
>> > developer...
>> >
>> > Paul T.
>> >
>> > "Rob" <Rob@discussions.microsoft.com> wrote in message
>> > news:B0025F8D-ED1A-49CB-9169-A411E71187BE@microsoft.com...
>> > > Thanks for your info,
>> > > I passed it on to the BSP manufacturer (I guess they should know
>> > > this).
>> > >
>> > > I donot want to modify or clone the BSP files if possible, If they
>> > > don't
>> > > fix
>> > > it I might make a userproject or premakeimg action , which only
>> > > purpose is
>> > > to
>> > > copy the BSP files to the SDK folder I'll have to look into that to
>> > > see if
>> > > that will do the trick.
>> > > I'll first see what the BSP guys have to say about it.
>> > >
>> > > It seems to me that if one provides an API, people should be able to
>> > > use
>> > > it
>> > > out of the box, without expert knowledge on how to distribute it.
>> > > Most developers just install the SDK, without PB/SDK.
>> > >
>> > > Greetings,
>> > > Rob.
>> > >
>> > >
>> > >
>> > >
>> > > "Paul G. Tobey [eMVP]" wrote:
>> > >
>> > >> If you have a driver or a DLL that is built as part of your platform
>> > >> folder
>> > >> build and you need, when that's done, to include some SDK files, you
>> > >> can
>> > >> do
>> > >> that easily, but you have to know how the biuld system works and use
>> > >> that
>> > >> fact. You might add the following as MAKEFILE.INC in your driver
>> > >> folder:
>> > >>
>> > >> -----
>> > >>
>> > >> !if 0
>> > >> PGT: File defining what needs to be copied for the SDK for
>> > >> the device from this folder. Note that there are a couple of
>> > >> long lines here that continue on the next one and which have
>> > >> to be single lines in your actual file.
>> > >> !endif
>> > >>
>> > >> CopySDK:
>> > >> @echo Copying SDK files...
>> > >> if not EXIST $(_PROJECTSDKROOT)\Inc mkdir $(_PROJECTSDKROOT)\Inc
>> > >> xcopy /I /D /Q myinclude.h $(_PROJECTSDKROOT)\Inc
>> > >> xcopy /I /D /Q *.vb $(_PROJECTSDKROOT)\Inc
>> > >> xcopy /I /D /Q *.cs $(_PROJECTSDKROOT)\Inc
>> > >> if not EXIST $(_PROJECTSDKROOT)\lib mkdir $(_PROJECTSDKROOT)\lib
>> > >> if not EXIST $(_PROJECTSDKROOT)\lib\$(_CPUINDPATH) mkdir
>> > >> $(_PROJECTSDKROOT)\lib\$(_CPUINDPATH)
>> > >> xcopy /I /D /Q
>> > >> $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\myimportlib.lib
>> > >> $(_PROJECTSDKROOT)\lib\$(_CPUINDPATH)
>> > >>
>> > >> -----
>> > >>
>> > >> What you've done there is copy the components built for this driver
>> > >> to
>> > >> the
>> > >> SDK folder. They will be automatically included in the SDK when you
>> > >> build
>> > >> it. However, you now need to make sure that the CopySDK target is
>> > >> built
>> > >> when your driver is built. To do that, you need to modify the
>> > >> SOURCES
>> > >> file:
>> > >>
>> > >> -----
>> > >>
>> > >> WINCETARGETFILES= \
>> > >> CopySDK \
>> > >>
>> > >> -----
>> > >>
>> > >> This tells build that it needs to build an extra target, the
>> > >> definition
>> > >> of
>> > >> which it will find in MAKEFILE.INC.
>> > >>
>> > >> Paul T.
>> > >>
>> > >> "Rob" <Rob@discussions.microsoft.com> wrote in message
>> > >> news:35FCA8B6-7A3C-43D7-8ECC-2AEB8A897889@microsoft.com...
>> > >> > Hi,
>> > >> > For some reason my (CE6.0) BSP does not add the driver-interface
>> > >> > include-files to the SDK.
>> > >> > I want to add these myself. I tried to follow "Adding
>> > >> > User-defined
>> > >> > Files
>> > >> > to
>> > >> > an SDK", but this leads me around in circles without providing the
>> > >> > required
>> > >> > info.
>> > >> >
>> > >> > From what I understand sofar I need to add a VBS script in a
>> > >> > folder,
>> > >> > which
>> > >> > would specify the files to add. I tried using "additional
>> > >> > folders", but
>> > >> > it
>> > >> > won't accept the folder I refer to (because I have no VBS there
>> > >> > ?).
>> > >> >
>> > >> > The page on MSDN which I would expect to contain a sample script,
>> > >> > provides
>> > >> > only a link, which is wrong (to main MSDN page).....
>> > >> >
>> > >> > Am I missing something here ?
>> > >> > Can someone show me a sample VBS script ?
>> > >> > No UI-based procedure somewhere to add files ?
>> > >> >
>> > >> > Greetings,
>> > >> > Rob.
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >>
>> > >>
>> > >>
>> >
>> >
>> >