Sign in Join
Wiki copytemporary

IDE Window: Project Options: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Navigation
22
33[[Main menu|Main Menu]] \> [[Main menu|Project]] \> [[IDE Window: Project Options|Project Options ...]] \> Project Options
44
55## Options for Project
66
7-<img src="IDE_Options_-_Project_Options.png" title="IDE_Options_-_Project_Options.png" width="600" />
7+![](/wiki-images/b/bc/IDE_Options_-_Project_Options.png)
88
99## Application
1010
1111![](/wiki-images/1/15/IDE_Options_-_Project_Options_-_Application_settings.png)
1212
1313### Title
1414
1515Same as setting:
1616
1717``` pascal
1818 Application.Title:='Some text';
1919```
2020
2121The title is shown differently on the various platforms.
2222
2323### Icon
2424
2525Several buttons allow to load icon from PNG file or to set default one.
2626
2727- Icon is always used on Windows.
2828- Icon is not used on Linux (e.g. on Ubuntu to assign an icon, you need to create PNG file in special folder and also create .desktop file).
2929- Icon is used on macOS, as initial icon for Application Bundle (but better to copy icon manually, and then specify it manually).
3030
3131For Windows
3232
3333### Use manifest file to enable themes (for Windows)
3434
3535Enable to automatically create "manifest" resource (embedded into .exe file, this is not app.exe.manifest file). This manifest is needed for themes support (Windows XP and higher).
3636
3737### DPI Awareness
3838
3939Control [[High DPI]] awareness. For Windows Vista+. Values:
4040
4141| Awareness | Description |
4242|----|----|
4343| False | Sets the application to not DPI-aware. |
4444| True | Sets the application to system DPI–aware. |
4545| Per-monitor | On Windows 8.1, sets the application to per monitor-DPI aware. On Windows Vista through Windows 8, sets the application to not DPI–aware. |
4646| True/PM | On Windows 8.1, sets the application to per monitor-DPI aware. On Windows Vista through Windows 8, sets the application to system-DPI aware. |
4747
4848### Execution Level
4949
5050You can select the level of elevation (Windows Vista+) that your program requires. Values:
5151
5252| Elevation | Description | Recommendations |
5353|----|----|----|
5454| asInvoker | The application runs with the same access token as the parent process | standard user applications. |
5555| highestAvailable | The application runs with the highest privileges the current user can obtain. | mixed-mode applications. |
5656| requireAdministrator | The application runs only for administrators and requires that the application be launched with the full access token of an administrator. | administrator only applications. Internal elevation points are not needed. The application is already running elevated. |
5757
5858### UI Access
5959
6060MS documentation: "Applications that are not providing accessibility should set this flag to false. Applications that are required to drive input to other windows on the desktop (on-screen keyboard, for example) should set this value to true."
6161
6262### Text fields
6363
6464Button allows to change string properties of manifest. Currently these are: project name, project description. Some of these values are used by OS in crash report dialog (and maybe in Event Log).
6565
6666### Use Application Bundle for running and debugging (for Darwin)
6767
6868This is needed for correct execution of macOS applications. By setting this option on, IDE runs/debugs Application Bundle (folder with extension .app) instead of real executable.
6969
7070MacOS (Darwin)
7171
7272### Create Application Bundle
7373
7474Pushing this button creates Application Bundle, with symbolic link to executable for this project.
7575
7676For further info about Application Bundles see [[Carbon Interface|Carbon Interface#Creating the Apple resource files]].
7777
7878## Forms
7979
8080![](/wiki-images/1/1e/Project_Options_-_Forms.png)
8181
8282You can create forms on start of the project. This is the same as adding
8383
8484` Application.CreateForm(FormX,TFormX); `
8585
8686lines to the code.
8787
8888**Note**: The forms are automatically created, not automatically shown. They are shown if their 'Visible' property is set to true. For instance the form variable is set, so you can write 'Form1.Caption:='Some text';'. To show such a form add a line 'Form1.Show;' or 'Form1.ShowModal;'.
8989
9090## FPDoc editor
9191
9292![](/wiki-images/1/1b/Project_Options_-_FPDoc_Editor.png)
9393
9494### FPDoc files path
9595
9696Contains paths to FPDoc files with documentation for the project. The FPDoc files are simple *.xml files and created by the built-in FPDoc editor or the standalone application lazarus documentation editor (it comes with lazarus in doceditor/lazde.lpi).
9797
9898For example: Set it to "docs". The IDE will then lookup and create fpdoc files in the sub folder "docs" of your project directory.
9999
100100## Session
101101
102102![](/wiki-images/6/6f/Project_Options_-_Session.png)
103103
104104### Save editor info for closed files
105105
106106The IDE saves the editor settings (caret position, top line, page index, bookmarks, jump history) even for closed files and will restore it, when the file is opened again. Default: enabled.
107107
108108### Save editor info only for project files
109109
110110The IDE saves various settings for each file, like editor settings, run file settings, resource names. Normally the IDE will save this information together with the project sesssion information (.lpi or .lps file). Enable this to not store such values on disk. Default: true.
111111
112112### Save session information in
113113
114114Each project has a session. A session contains all meta information about open files in the source editor, the bookmarks, jump history and run file information. You can setup, where to store this information for the current project:
115115
116116- Save in .lpi file - the file will change often.
117117- Save the .lps file in the project directory - useful if the .lpi file is under version control (e.g. cvs, svn).
118118- Save in IDE config directory - useful if the project directory is read only
119119- Do not save any session info - useful for the paranoids.
120120
121121## Version Info
122122
123-<img src="Project_Options_-_Version_Info.png" title="Project_Options_-_Version_Info.png" width="500" />
123+![](/wiki-images/9/9a/Project_Options_-_Version_Info.png)
124124
125-<img src="popt.png" title="popt.png" width="700" />
125+![](/wiki-images/3/30/Popt.png)
126126
127127Dialog with Test button always available for use.
128128
129129You can choose to include file version information in the executable/library. On Windows, this will show in the properties of the file.
130130
131131## Resources
132132
133133The dialog shows a list of files that will be included in the application as resources.
134134
135135You can use the *Add* and *Delete* buttons to add or delete a resource.
136136
137137The *Delete all* button will remove all resources.
138138
139139When you click *add*, the IDE will prompt you for a filename. Each filename will be added to the resources of the application, and is added to the list below the toolbar. by default, the filename (without path or extension) is used as the name of the resource.
140140
141141If you select one of the resources, you can rename it in the edit box at the right. You can then also change the type: RCDATA is the default type, because it can be used for any kind of binary data.
142142
143143When you select one of the resources and click *delete*, the resource is removed.
144144
145-<img src="Project_Options_-_Resources.png" title="Project_Options_-_Resources.png" width="700" />
145+![](/wiki-images/7/71/Project_Options_-_Resources.png)
146146
147147The list of resources (the filename, type and resource name) is saved in the project file (.lpi).
148148
149149Note that this means that the files you select must remain available, they are not copied: The resource file - which is linked into the binary when compiling - will be regenerated depending on the actions taken in the IDE. Whenever the resource file is regenerated, the files indicated here must be available.
150150
151151It is therefor a good idea to add the files that are indicated here to the project file as well.
152152
153153### See also
154154
155155- [[fcl-res|FCL resource units]]
156156- [[Lazarus Resources|Description of using FPC and Lazarus resources]]
157157- [[lazres|Lazarus Resource compiler]] (deprecated)
158158
159159## i18n
160160
161161![](/wiki-images/6/6d/Project_Options_-_i18n.png)
162162
163163**I18n** stands for [[Internationalization]]. When enabled the IDE will automatically create and update translations files (.po files) for your resourcestring sections and lfm files.
164164
165165For more details see [[Getting translation strings right|here]].
166166
167167### Enable i18n
168168
169169Enable to create .po files for .rst files in the given output directory.
170170
171171### Create/update .po file when saving a lfm file
172172
173173When enabled the IDE adds the strings of type TTranslateString of the form/datamodule to a *unitname.po* file in the po output directory.
174174
175175You can disable this creation for individual forms via the project inspector.
176176
177177### Excluded: Identifiers and Originals
178178
179179Starting with Lazarus 1.8 the i18n frame contains two boxes "Identifiers" and "Originals" to exclude specific strings from the generated po files. For example, suppose the caption of a button is assigned to a specifically declared resource string. In this case the caption seen in the object inspector is obsolete and can be excluded by entering its text in the column "Originals"; alternatively the string `tform1.button1.caption` can be entered in the list "Identifiers" (this assumes that the button is named `Button1` and sits on an instance of `TForm1`). (In v1.8 series the excluded entries are not removed from the po files automatically. You must perform a *Clean up and Build* to recreate the required files. In v2 series the the excluded entries are removed on the next compile.)
180180
181181## Resources
182182
183183![](/wiki-images/7/71/Project_Options_-_Resources.png)
184184
185185## Miscellaneous
186186
187187![](/wiki-images/d/d0/Project_Options_-_Miscellaneous.png)
188188
189189### Main unit is Pascal Source
190190
191191The main source is the root unit of a project. Typically this is the .lpr file. Set to true, if the main source is a pascal source. Set to false to avoid the IDE trying to parse it.
192192
193193### Main Unit has Uses Section containing all Units of project
194194
195195If this is enabled, the IDE will update the uses section whenever a unit is added or removed from the project.
196196
197197### Update Application.CreateForm statements in main unit
198198
199199If this is enabled the IDE will add/remove *Application.CreateForm(FormX, TFormX);* statements for forms. If it is disabled, it will ignore these statements (no delete, no add, no change).
200200
201201### Update Application.Title statement in main unit
202202
203203If this is enabled the IDE will add/remove *Application.Title:='Some Text';* statements. If the Title contains a value it will add a line, if the Title is empty it will remove it. If the Title changes it will add/remove/change the statement. If it is disabled, it will ignore these statements (no delete, no add, no change).
204204
205205### Update Application.Scaled statement in main unit
206206
207207If this is enabled the IDE will add/update the *Application.Scaled:=true\|false;* statement. See "Project Options" -\> "Application" -\> "Use LCL scaling -\> (Hi-DPI)"
208208
209209### Project is runnable
210210
211211The Project can be run in the debugger.
212212
213213### Use design time packages
214214
215215Normally design time packages are not added to the unit path of the compiler. Enable this if your project uses a design time package at runtime.
216216
217217### Always build (even if nothing changed)
218218
219219If disabled, the IDE checks before running for changes and if nothing changed will skip the compile step. Lazarus checks the compiler parameters, the compiler executable (filedate and filename) as listed in the projectname.compiled file and it checks the file dates of files listed in the project inspector. It does not check the fpc.cfg and not all the files in the project directories (only those listed in the project inspector) and it does not check all used units. So it will ignore changes in used units not listed in the project inspector, even if it is used by the project and opened in the source editor.
220220
221221### Maximize compatibility of project (LPI and LPS)
222222
223223Sometimes the IDE gets new features, which changes some information in the lpi file, breaking compatibility with older Lazarus versions. Some of these features support storing some simpler values in the old format as well, so an old IDE can load it.
224224
225225For example in Lazarus 2.0 the format of the unit list was changed from *unit\<number\>* to just *unit*, to avoid big git/svn diffs when an unit was removed from the project.
226226
227227Keep in mind that when an old IDE saves a lpi it stores only things it knows, loosing all values of the newer IDE version.
228228
229229### Save .lrs file in the output directory
230230
231231Only applicable if the project's resource type is ".lrs". Enable this option to generate the lrs file in the project's unit output directory.
232232
233233### Resource type of project
234234
235235When you create a new form, data module, or frame a .lfm file is created. This option defines how the .lfm file is added to the executable, and determines how the project resources are stored. Since version 0.9.29 the two options are:
236236
237237- lrs include file - This option needs one include file per unit and a corresponding include directive {\$I unit1.lrs} in the unit's initialization section. This option is supported on all platforms, and the IDE creates and updates the needed .lrs file automatically.
238238- FPC resources - This option needs at least FPC version 2.4.0 (or higher) and a resource directive {\$R *.lfm} in each unit which requires resources. Loading speed and executable size is similar to the .lrs option. The main advantage of FPC resources is that there is one less source file (since no .lrs files are generated).
239239
240240This project setting affects how project resources are stored, as well as which is the appropriate source code directive to use (although the directives are inserted into the unit source for you). If you choose the "lrs include file" option, then the IDE stores icon resources in the .lrs file (and - only on the Windows platform - includes .rc files, if any). If you choose "FPC resources" then the IDE stores resources in .rc files on all platforms. The IDE automatically searches for a project icon resource in any .lrs resource first. If no icon resource is found there, or if there is no .lrs file, then it searches in the project's fpc resources.
241241
242242# Compiler Options
243243
244244---
245245*From the Free Pascal wiki, page "IDE Window: Project Options", as it stood on 2023-06-27 after a change by Mattias2, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history