Author Topic: prebuild script question?  (Read 2887 times)

Offline jfpjr

  • Multiple posting newcomer
  • *
  • Posts: 27
prebuild script question?
« 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
« Last Edit: September 12, 2008, 11:08:10 pm by jfpjr »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: prebuild script question?
« Reply #1 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
« Last Edit: September 13, 2008, 08:38:30 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org