Author Topic: Writting attributes to the project  (Read 3596 times)

Offline yop

  • Regular
  • ***
  • Posts: 387
Writting attributes to the project
« on: July 26, 2007, 11:14:27 pm »
Can I write new attributes to a project or would you consider this bad practice? Now that the cbEVT_COMPILER_STARTED is emitted I can use it to run a process needed by QtWorkbench (qmake) and do it transparent from the end user that until now had to select running that process from a menu entry. The main thing is that I have to flag somehow if the user is actually using QtWorkbench for his/her project and not run qmake *every* time the user tries to build something but only when the respective project is flagged/marked that it is using QtWorkbench and Makefiles. The only solutions for this are:
1. I write to the project file a new entry
2. Check if the user has actually created input files for qmake and conclude that he/she actually wants to invoke qmake before each build.
1. is preferred but I can live with 2.

As a sidenote now that we 're in the subject how would you propose running that process? I 'm using PipedProcess and catching the OnProcessTerminated event after "borrowing" code from the compiler plugin sometime ago :)

Life would be so much easier if we could just look at the source code.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Writting attributes to the project
« Reply #1 on: July 26, 2007, 11:32:05 pm »
Quote
Can I write new attributes to a project or would you consider this bad practice?

Have you checked projectloader_hooks.h?
It's how plugins that need it keep their configuration inside the project.
Be patient!
This bug will be fixed soon...