News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

prebuild script question?

Started by jfpjr, September 12, 2008, 11:04:58 PM

Previous topic - Next topic

jfpjr

I am trying to add a file to the project with a prebuild script. The file should be compiled and added to both debug and release targets.

The command I have tried is

project.AddFile(5,project_file.file.GetName() + _T(".aaa"),GetProjectManager().GetActiveProject(),true,true,50);

It adds the file but does not set the compile bit or add to target.
I have set a custom build command in the advanced options for the compiler and it
works when I manually add the checkmarks to file prop.

Win XP Mingw Aug 22 nightly

stahta01

#1
The extension appears, at first glance at code, to need to be an valid ftSource or ftResource extension.

I think filefilters.cpp is where extensions are added.

globals.cpp seems to be where extensions are added to ftSource.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]