???How do I customize a build 
Author Message
 ???How do I customize a build

Hi,

Here is what I want to do:

- Add a step to the build process which checks the build configuration and
then ensures that the resource file is re-compiled each time I compile my
Dll.

But I don't know where to start.

I have created a default build type - Win32 MyBuild Release - which adds a
definition to the Preprocessor definitions the other builds don't have.

The reason I wish to do this because I have added this line to the .rc file

#ifdef MY_BUILD
VALUE "MyBuild", "Ben's build\0"
#endif

which will appear in the properties tab of the Dll if built using the Win32
MyBuild Release build type.

Help...

Thanks



Mon, 24 Feb 2003 23:07:03 GMT  
 ???How do I customize a build

Hi!

i'll focus on the question:
<<- Add a step to the build process which checks the build configuration and
 then ensures that the resource file is re-compiled each time I compile my
 Dll.

- try if this helps:

1) put in the dialog project->settings (chose in the left pane of the dialog
window the desired configuration in the combobox "Settings for" -
this is important since it establishes the configuration for which the
following should happen, and you wanted this only for a certain
configuration which you called "Win32 MyBuild Release"),
in the tab "pre-link step"  a command to compile your resources:
something like
rc /fo".\DesiredResfileName.res" /d"MY_BUILD" .\res\Your_rc_file
(adjust it to the context of your project)

2) go in the same dialog to the tab "resources" and clear the textbox
"resource file name"
3) go to the tab "link" in the same dialog and put in the textbox
"object/library modules" DesiredResfileName.res from the rc invocation in
step 1)
4) delete in the "post-build step" tab some small .obj file in the directory
of your configuration (you can even add a dummy source file and delete
its .obj file, in order to let its recompilation be quick) ; use something
like   del .\Folder for MyBuild Release\Dummy.obj

from now on whenever you hit f7 the resources will be compiled and the
project will be linked again with the new compiled resources (and the
dummy.obj)

the purpouse of step 4) is to ensure that the dependency check ensures a new
build even if you hit only f7 and thus a new execution of the pre-link step.

does that help?

-aurelian

Mention:
this will recompile the resources even if you didn't change the resource
file(s) but



Quote:
> Hi,

> Here is what I want to do:

> - Add a step to the build process which checks the build configuration and
> then ensures that the resource file is re-compiled each time I compile my
> Dll.

> But I don't know where to start.

> I have created a default build type - Win32 MyBuild Release - which adds a
> definition to the Preprocessor definitions the other builds don't have.

> The reason I wish to do this because I have added this line to the .rc
file

> #ifdef MY_BUILD
> VALUE "MyBuild", "Ben's build\0"
> #endif

> which will appear in the properties tab of the Dll if built using the
Win32
> MyBuild Release build type.

> Help...

> Thanks



Tue, 25 Feb 2003 18:24:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Customizing Visual C++ 6.0 Build process

2. Help: Custom build doing MIDL hangs MSVC

3. LNK2005 Link errors when doing Release Build??

4. Help: Custom build doing MIDL hangs MSVC

5. Visual C++ hangs when doing custom build in MFC project

6. LNK2005 Link errors when doing Release Build??

7. Unable to build ReleaseMinSize - Debug version builds fine.

8. Debug build breaks, Release build ok

9. ANNOUNCE: Automate your software builds with Visual Build and VSMake

10. ANN: Automate your software builds with Visual Build and VSMake

11. Commands in the custom build causes building to hang

12. Debug Build vs. Release Build

 

 
Powered by phpBB® Forum Software