Jump to content
softtouch

Is there way to change the default options for a new project?

Recommended Posts

Every time I start a new project, I have to change many options for that project.

Is there any way/hack to change the default options, like default copyright, company, compiler output directories?

Share this post


Link to post

It's been a long time since I tried this, but it used to be that if you simply didn't have any project loaded in the IDE and then edited the Project Options, they would save as defaults.  Not sure if that is still the case nowadays.

 

Another approach would be to create Option Sets that contain your desired settings, and then you can apply those Sets to new projects as needed.

 

https://docwiki.embarcadero.com/RADStudio/en/Option_Sets_Overview

Edited by Remy Lebeau

Share this post


Link to post

Thank you, but setting project options without a project open is not possible because the project options are grayed out in that case.

I will take a look at the option sets you mentioned.

Share this post


Link to post

You could always just create a dummy project with the settings you want and save it into a folder (or zip file). Then for a new project, copy or unzip the folder into a new one, then go into the new folder, open the project, and proceed from there. It'll take you about 5 seconds.

 

Share this post


Link to post
7 minutes ago, David Schwartz said:

You could always just create a dummy project with the settings you want and save it into a folder (or zip file). Then for a new project, copy or unzip the folder into a new one, then go into the new folder, open the project, and proceed from there. It'll take you about 5 seconds.

 

And rename the new project, of course 😁

Share this post


Link to post

Alternatively create a new project and save it (best with decent file names). Then select Project - Add To Repository from the menu, select a proper place to add and type some nice names. After that you can select File - New - Customize to add the new entry to the favorites.

 

As a gimmick you are directly asked for a target folder after selecting your project from the repository.

 

Also, when all your VCL projects have a main TForm and a main TDatamodule and a separate TDatamodule with a TImageCollection, you can prepare that before adding the project to the repository (or create a separate entry for that) and you may save quite some more clicks and keystrokes.

  • Like 2

Share this post


Link to post
8 hours ago, Uwe Raabe said:

Then select Project - Add To Repository from the menu, select a proper place to add and type some nice names.

The repository is one of the many ancient but mostly unknown features of the IDE. Thanks for reminding me. It can also store frequently used preconfigured components (e.g. an Ok button) and even component groups (e.g. an Ok plus a Cancel button), that can then be easily accessed through the component palette.

 

Unfortunately I have so many different installations on various computers, that every time I remember using that feature, the template is on a different computer. But I guess that's rare.

Share this post


Link to post
3 hours ago, dummzeuch said:

Unfortunately I have so many different installations on various computers, that every time I remember using that feature, the template is on a different computer.

At least recent versions of Delphi allow adding repositories located at arbitrary places. So if various computers have access to a common network share, you can use that for your templates. Alternatively one can manage these repositories and its templates with version control as with any other sources like f.i. common library code.

  • Like 1

Share this post


Link to post
13 hours ago, Remy Lebeau said:

And rename the new project, of course 😁

as I said: "... and proceed from there"

 

It's in a new folder so there shouldn't be any initial conflict. But you always have to rename a new project and the initial unit(s), right?

 

 

 

Edited by David Schwartz

Share this post


Link to post
1 hour ago, Uwe Raabe said:

At least recent versions of Delphi allow adding repositories located at arbitrary places. So if various computers have access to a common network share, you can use that for your templates. Alternatively one can manage these repositories and its templates with version control as with any other sources like f.i. common library code.

Some of these computers have access to the same servers, but many don't, so a network share is out. Hm, yes, version control would probably work. Never thought of that.

Share this post


Link to post

I did that repository thing, but its not optimal. From where does the IDE get the projects options when a new project is created?

Share this post


Link to post
3 hours ago, softtouch said:

From where does the IDE get the projects options when a new project is created?

They are hard-coded.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×