When building your Windows Embedded CE OS image you might have noticed, that a lot of components are built even though they are not part of your image neither do you need them later on. This behavior takes up precious time, and space on your hard drive.
Having realized this behavior, it of course raises a couple of questions; How come those components that I don’t need are being built? And more importantly, is there a way to avoid building those components?
As you might have guessed, YES! You can avoid building the unnecessary components and it is quite easy, too! Simply set the environment variable SKIPBUILD in each applicable SOURCES file (e.g. set SKIPBUILD=1).
Make sure you use the respective SYSGEN variable set by selecting the appropriate catalog item in connection with the SKIPBUILD environment variable:
!if "$(SYSGEN_MY_VAR)" != "1"
Et voilá, problem solved!
As stated in the comment section, there might, however arise one problem when using the SKIPBUILD environment variable:
Your sources file will still get pre-processed which could only cause a problem when you have two (or more) sources files generating a dll/exe/lib with the same name:
Your fist sources file (without SKIPBUILD condition) will generate the dll/exe/lib. But the second sources file (with SKIPBUILD condition), due to being pre-processed deletes your just build dll/exe/lib and due to the SKIPBUILD condition does not regenerate the dll/exe/lib.
Thanks for the useful input!
3 weeks ago