Difference between revisions of "IDE Window: Project Options"

From Lazarus wiki
Jump to navigationJump to search
Line 20: Line 20:
  
 
=== Use manifest file to enable themes (windows only) ===
 
=== Use manifest file to enable themes (windows only) ===
 +
 +
Enable to automatically create a manifest file for the project. A manifest file is needed for windows theme support (windows XP and higher).
  
 
=== Target file name ===
 
=== Target file name ===

Revision as of 18:14, 18 June 2010

Deutsch (de) English (en) suomi (fi) français (fr) 日本語 (ja) русский (ru)

Application

Title

Same as setting

 Application.Title:='some text';

The title is shown differently on the various platforms.

Use Application Bundle for running and debugging (darwin only)

By setting this option on, IDE runs or debugs Application Bundle instead of linked executable. This is needed for correct execution of Carbon applications.

Create Application Bundle

Pushing this button creates Application Bundle with symbolic link to executable for this project.

For further info about Application Bundles see Carbon Interface#Creating the Apple resource files.

Use manifest file to enable themes (windows only)

Enable to automatically create a manifest file for the project. A manifest file is needed for windows theme support (windows XP and higher).

Target file name

Set here the filename of the generated executable. If the file is relative it will be expanded with the project directory (.lpi file). If no file is given the executable is put into the unit output directory and has the name of the main source file name (usually the .lpr file) without the extension. If no extension is given, the default extension for the platform is added (e.g. .exe for MS Windows, none for others). When a new project was not yet saved and is built the IDE saves the files to the test directory. The relative files are then relative to this directory.

Forms

You can create forms on start of the project. This is the same as adding

 Application.CreateForm(FormX,TFormX); 

lines to the code.

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;'.

FPDoc editor

FPDoc files path

Contains 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).

For example: Set it to "docs". The IDE will then lookup and create fpdoc files in the sub folder "docs" of your project directory.

Session

Save editor info for closed files

The 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.

Save editor info only for project files

The 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.

Save session information in

Each 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:

  • Save in .lpi file - the file will change often.
  • Save the .lps file in the project directory - useful if the .lpi file is under version control (e.g. cvs, svn).
  • Save in IDE config directory - useful if the project directory is read only
  • Do not save any session info - useful for the paranoids.

Version Info

i18n

I18n stands for Internationalization. When enabled the IDE will automatically create and update translations files (.po files) for your resourcestring sections and lfm files.

For more details see here.

Enable i18n

Enable to create .po files for .rst files in the given output directory.

Create/update .po file when saving a lf file

When enabled the IDE adds the strings of type TTranslateString of the form/datamodule to a unitname.po file in the po output directory.

You can disable this creation for individual forms via the project inspector.

Miscellanous

Main unit is Pascal Source

The 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.

Main Unit has Uses Section containing all Units of project

If this is enabled, the IDE will update the uses section whenever a unit is added or removed from the project.

Main Unit has Application.CreateForm statements

If 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).

Main Unit has Application.Title statement

If 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).

Project is runnable

Project can be runned in the debugger.

Always build (even if nothing changed)

If 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.

Resource type of project

When you create a new form, data module or frame a lfm file is created. This options defines how the lfm file is added to the executable and how the project resources are stored. Since 0.9.29.

  • lrs include file - needs one include file per unit and an include directive {$I unit1.lrs} in the initialization section. Supported on all platforms. lrs files are automatically created/updated by the IDE.
  • FPC resources - this needs at least FPC 2.4.0 and a resource directive {$R *.lfm}. Loading speed and executable size does not change much. Main advantage is to have one source file less.

This project also affect storing of project resources. If lrs include file is chosen then IDE stores icon resource in the .lrs file and conditionally include .rc file only for windows platform. If fpc resources are chosen then IDE stores resources in rc file for all platforms. LCL automatically search project icon resource in the lrs resources first and if not found then searches in the fpc resources.