AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Delphi-PRAXiS - Lounge Delphi-News aus aller Welt Classic Tip: From Default Project Options to RAD Studio Option Sets
Thema durchsuchen
Ansicht
Themen-Optionen

Classic Tip: From Default Project Options to RAD Studio Option Sets

Ein Thema von DP News-Robot · begonnen am 2. Apr 2019
Antwort Antwort
Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
15.473 Beiträge
 
#1

Classic Tip: From Default Project Options to RAD Studio Option Sets

  Alt 2. Apr 2019, 18:20
In early versions of Delphi and RAD Studio, a user could change some of the current project options and (with a check box) save them as default, that is as the initial options for any future project. It was also possible to change this configuration by selecting the Project Options when no project was active. This feature is long gone (I think*it was dropped from XE2 or XE3).

What's the alternative? It is called option sets and it is way more powerful that the default project options. YOu can read about it in the RAD Studio*Doc Wiki at http://docwiki.embarcadero.com/RADSt..._Sets_Overview. Here are some notes from my "Delphi 2009 Handbook" adapted to 10.3 Rio and with new images.

In the Project Manager you can select a build configuration and export its settings to an “option set” file. This is like saving a configuration template or skeleton to an external file, and the configuration will be linked to the file. You can create a new option set starting from the Project Options dialog (save) or apply an existing set:



This makes it easy to move those same settings to a new or another existing project, as you can use the Project Manager (using the Apply Options Set local menu item while on a build configuration) or the Project Options dialog box (using the Apply Options button) to import a set of configuration options. In both cases Delphi opens up the Apply Option Set dialog box, in which you can pick a file and choose whether to keep the external configuration file linked (so that a change in the file will be reflected in the projects using it) or simply merge the current settings using some priority rules.

Once you have created an external option set on a file, you can edit it from any project referring to it, using the Edit local menu of the Project Manager pane:



This opens up the an editor containing a subset of the pages of the Project Options dialog box, as shown below:



The .OPTSET file is an XML file with a format similar to the .DPROJ format, again based on the MSBUILD XML format, and an OptionSet project type. This is a simple example of its contents:

* * * * * * false * * * * true * * * * PerMonitorV2 * * * * * * * * Delphi.Personality.12 * * * * OptionSet * * * * * * * * * * * * * * * * * * 12 * * While this is an old feature, I'm pretty sure a few of the RAD Studio and Delphi users might have missed it. Notice that having multiple proejcts with settings linked to the same option set allows you to edit the configuration of many projects at once, and still override the default in each individual project as needed.



Weiterlesen...
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz