Author Topic: CB Out of Source CB project file, possible?  (Read 291 times)

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 56
CB Out of Source CB project file, possible?
« on: July 07, 2017, 06:55:11 pm »
[Ubuntu 16.04, CB 16.01 Binaries]

Hi,
When I create a new consol project, the dialog wants to put the CB project files inside the project folder.  This is inconvenient given the build system we have in our lab.  I would like to place the cbp project files into the parent folder of the project, while retaining all the code inside the project folder.

I tried creating a custom wizard but I don't seem to have access to certain necessary parts of the creation process.  Also, it seems that the 'Execution Directory' (only active when a custom Makefile is specified) is also the 'root Project File Folder'.

In the past, I have been selecting the project folder when adding a new file, but it would be nice if the New -> Empty File dialog opened in the desired location.
 
Is this possible to achieve?  Maybe using some post project creation script and tricking CB to put files into the right place? Or altering the Project's Environment Variables?  Another option would be to modify the source package to do this and build CB as I had done with v13.12, (for this I would appreciate a hint as to which source file I would need to look into)?

Cheers,
Nap

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1414
Re: CB Out of Source CB project file, possible?
« Reply #1 on: July 09, 2017, 09:52:26 pm »
I think you can try to modify the path to the project as follow (just a concept, not working code)

In the OnGetNextPage_ProjectPathPage function you can get/set the text of the control of the page with the function
Code: [Select]
Wizard.SetTextControlValue(_T("ID_TEXTCTRL1"), _T("New Value"))
ID_TEXTCTRL1 is the name of the control:
Code: [Select]
    Project title   --> txtPrjTitle  --> ID_TEXTCTRL3
    Project Path --> txtPrjPath  --> ID_TEXTCTRL1

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: CB Out of Source CB project file, possible?
« Reply #2 on: July 12, 2017, 06:31:49 pm »
AWESOME!!! Thanks!   8)

I looked into the 'projectpathpanel.h & cpp files to find more info.  This solves the problem I posted about in the other question.

Is it possible to execute a script when the user clicks 'Add Files' so that the folder that the dialog opens in is not the same folder as where the project is at?

Cheers,
Nap
« Last Edit: July 12, 2017, 06:47:14 pm by Napoleon »

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1414
Re: CB Out of Source CB project file, possible?
« Reply #3 on: July 13, 2017, 09:38:48 pm »
Is it possible to execute a script when the user clicks 'Add Files' so that the folder that the dialog opens in is not the same folder as where the project is at?
No this is not possible. You can open a future request on sf...