News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

saving and reusing project settings

Started by maxcy, July 18, 2023, 10:58:46 PM

Previous topic - Next topic

maxcy

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?

Pecan

#1
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".

maxcy

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