Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jfpjr on September 12, 2008, 11:04:58 pm

Title: prebuild script question?
Post by: jfpjr on September 12, 2008, 11:04:58 pm
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
Title: Re: prebuild script question?
Post by: stahta01 on September 13, 2008, 08:30:22 am
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