NO

Author Topic: Create new Mode by copying existing  (Read 1756 times)

Offline John Z

  • Member
  • *
  • Posts: 790
Create new Mode by copying existing
« on: October 05, 2022, 11:06:38 AM »
This is an Add-In that allows the creation of new project modes by copying a selected existing mode.  Once the copy is done the new mode, which will replicate all of the settings in the copied mode, can be edited as usual under the Pelles IDE to change whichever parameter(s) is/are required for the new mode.  No need to worry that some parameter was overlooked when creating a mode from scratch.

The Add-in when copied to AddIns64 directory, and enabled, adds a Menu item under "Project" with an obvious name, and just above the "Project Options" menu item.

The Add-in is overloaded with error checking, and it creates a ppj backup file as part of the first task.  Successive uses create sequentially numbered backups.  The Add-in will not delete these.... highest number,or newest date, is most recent backup.
If nervous  :o create your own backup of the ppj file first  ;D

John Z

Project code, reasonably commented, is included as is a readme.txt with more information. The CopyMode.dll is ready to be copied into the AddIns64 subdirectory.

Update:  New code release to address setting mode issue

Update 3/30/2023: Code pulled as this is now an intrinsic feature of Pelles C V12
« Last Edit: March 30, 2023, 03:11:32 PM by John Z »

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 57
Re: Create new Mode by copying existing
« Reply #1 on: October 26, 2022, 12:32:27 AM »
What do you mean by Mode? Release, Debug, etc like what is listed in the photo?

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Create new Mode by copying existing
« Reply #2 on: October 26, 2022, 10:47:11 AM »
Yes.  When creating the exe one chooses a 'Mode' from the toolbar.  These are defined under the main menu 'Project' and submenu 'Project Modes'.  Two default modes are Release and Debug.  For testing and other purposes you might want to create a custom mode.  This could be done with the ADD button provided by the Pelles UI but that just adds a default then you have to select the new  mode on the toolbar then select to edit it under Project-Project options,  and change everything to get to back your base configuration, then make the added changes for the new mode.

The Add-in is a shortcut with the added benefit that instead of a default mode which might need significant editing the copy is from any an already existing, perhaps already customized, mode.  Then it can be edited for just the new change needed rather than all the changes made in the source mode.

The original feature and discussion request link is :
https://forum.pellesc.de/index.php?PHPSESSID=81dieftm7u9b7b85mot1vilo80&topic=10212.0

John Z

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Create new Mode by copying existing
« Reply #3 on: November 03, 2022, 01:57:14 PM »
It suits to parameters and command lines quite well.
May the source be with you

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Create new Mode by copying existing
« Reply #4 on: November 04, 2022, 01:12:01 PM »
 :) :D

John Z