Author Topic: saving and reusing project settings  (Read 1896 times)

Offline maxcy

  • Multiple posting newcomer
  • *
  • Posts: 20
saving and reusing project settings
« on: July 18, 2023, 10:58:46 pm »
I did a lot of work installing a new version minGW compiler. In the project I was working with I made a lot of changes: new version of compiler installed, reset some environment variables, pointed to the installed gdb.exe file for the debugger to work, set up a new watch window and so forth.  I would like to save all this setup so I can reuse this setup when I make other new projects. Or, since I have many older projects that I made, can I find a way to switch to the new perspective that I just used in the current project?  Does anyone know how to do this or, at least, point me to the documentation I need to read to do this task?  Also I noticed that in other IDEs, there is a different perspective that is displayed when one is making a new release and a different one when one is working in the debug perspective! Is it even possible to do the same thing in CB?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: saving and reusing project settings
« Reply #1 on: July 19, 2023, 07:11:51 am »
All options and perspectives are saved by using personalities.
Options for a new install, for example, are saved under the "default" personality. The current personality is shown at the bottom right of the status bar.

You can create a perspective by using the /p <personality> command option and then exiting CB . Eg. "Codeblocks.exe /p cbDevel322" or copying an older one to a new config file (.conf) . Personalities are save when CB exits.

The .conf files for CB are saved in:
C:\Users\<your user name>\AppData\Roaming\CodeBlocks\

When you want to use another set of options, just create another personality.

Another way to save only project settings is to save the project as a template. MainMenu>File>Save project as template. To create a new project with that template, use MainMenu>File>new>From Template.

The below shows that CB is currently using the options from personality file: "cbDevel322.conf".
« Last Edit: July 19, 2023, 07:29:40 am by Pecan »

Offline maxcy

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: saving and reusing project settings
« Reply #2 on: July 19, 2023, 06:09:10 pm »
That info is exactly what I needed!!! Being a newby to this forum, I would normally mark this post as "completed" but I don't see any such item in this forum.
maxcy / wt1v