Author Topic: Can I replace Hello world boilerplate code with my own boilerplate?  (Read 3836 times)

Offline Steven Friedrich

  • Single posting newcomer
  • *
  • Posts: 7
When I create a new project, CB automagicallly includes a main.c with Hello world.
Is this specified in Settings somewhere?  I can't find it.  I would like to configure CB to use my own template.c, template.h, or template++.cpp, template++.h.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2803
Re: Can I replace Hello world boilerplate code with my own boilerplate?
« Reply #1 on: March 04, 2022, 01:56:09 am »
You can right-click on any file in the project tree and chose "Remove file from project".

Then you can right-click on the project and choose "Add files" to add what files you like to the project.

Offline Steven Friedrich

  • Single posting newcomer
  • *
  • Posts: 7
Re: Can I replace Hello world boilerplate code with my own boilerplate?
« Reply #2 on: March 04, 2022, 02:17:48 am »
Thanks for your reply.  I have done that, but I would really like to make it automagic.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2803
Re: Can I replace Hello world boilerplate code with my own boilerplate?
« Reply #3 on: March 04, 2022, 06:44:29 am »
Once you have added the files you like, you can save the project as a template. Menu->File->Save project as template.

Then when you want to create your new project, choose your template instead of one of the CB basic projects from the Menu->File->New->From template.
« Last Edit: March 04, 2022, 06:48:08 am by Pecan »

Offline Steven Friedrich

  • Single posting newcomer
  • *
  • Posts: 7
Thanks.  That works exactly as I hoped.