Difference between revisions of "IDE Window: Configure Build file"

From Lazarus wiki
Jump to navigationJump to search
(Fix heading levels)
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
These settings are stored with the project (.lpi file). They are not global settings.
 
These settings are stored with the project (.lpi file). They are not global settings.
  
=Build / Run File=
+
==Build / Run File==
  
 
The IDE can build and run single files instead of the project. For example when pressing the ''Run'' button, the IDE checks if you enabled this feature for the current source file in the source editor. If yes, the IDE executes the Run File command instead. The information how to build or run a file is stored as IDE directives in the source file itself and can be setup via the dialog described on this page (Run / Configure Build+Run File).
 
The IDE can build and run single files instead of the project. For example when pressing the ''Run'' button, the IDE checks if you enabled this feature for the current source file in the source editor. If yes, the IDE executes the Run File command instead. The information how to build or run a file is stored as IDE directives in the source file itself and can be setup via the dialog described on this page (Run / Configure Build+Run File).
  
== Options ==
+
=== Options ===
  
 
When this file is active in the source editor ...
 
When this file is active in the source editor ...
Line 19: Line 19:
 
*On run project execute the Run File command instead
 
*On run project execute the Run File command instead
  
== Build ==
+
=== Build ===
  
=== Working directory ===
+
==== Working directory ====
  
 
Before building, change to this directory. Relative paths in the build command will then be relative to this directory.
 
Before building, change to this directory. Relative paths in the build command will then be relative to this directory.
  
=== Build Command ===
+
==== Build Command ====
  
 
Provide the command to call for building the file. The default is:  
 
Provide the command to call for building the file. The default is:  
 
   $(CompPath) $(EdFile)
 
   $(CompPath) $(EdFile)
  
=== Scan for FPC messages ===
+
==== Scan for FPC messages ====
  
 
Parse output for FPC errors and hints. The IDE will jump to errors.
 
Parse output for FPC errors and hints. The IDE will jump to errors.
  
=== Scan for Make messages ===
+
==== Scan for Make messages ====
  
 
Parse output for 'Make' errors and hints. The IDE will jump to errors.
 
Parse output for 'Make' errors and hints. The IDE will jump to errors.
  
=== Macros ===
+
==== Macros ====
  
 
[[IDE Macros in paths and filenames]]
 
[[IDE Macros in paths and filenames]]
  
== Run ==
+
=== Run ===
  
=== Always build before run ===
+
==== Always build before run ====
  
 
If checked, the Build File command is executed before running.
 
If checked, the Build File command is executed before running.
  
=== Working directory ===
+
==== Working directory ====
  
 
Before running, change to this directory. Relative paths in the run command will then be relative to this directory.
 
Before running, change to this directory. Relative paths in the run command will then be relative to this directory.
  
=== Run Command ===
+
==== Run Command ====
  
 
Provide the command to call to run file. The default is:  
 
Provide the command to call to run file. The default is:  
 
   $MakeExe($(EdFile))
 
   $MakeExe($(EdFile))
  
=== Macros ===
+
==== Macros ====
  
 
[[IDE Macros in paths and filenames]]
 
[[IDE Macros in paths and filenames]]
  
=IDE directives=
+
== IDE directives ==
  
 
*'''BuildCommand'''
 
*'''BuildCommand'''

Latest revision as of 10:42, 29 January 2021

English (en) français (fr)

Normally 'building' and 'running' menu items and shortcuts invokes building (running) the current project.

With this dialog you can override this behaviour for each file. This is useful, if you created a small test program or a sub project. Then you can compile them without changing the project. These settings are stored with the project (.lpi file). They are not global settings.

Build / Run File

The IDE can build and run single files instead of the project. For example when pressing the Run button, the IDE checks if you enabled this feature for the current source file in the source editor. If yes, the IDE executes the Run File command instead. The information how to build or run a file is stored as IDE directives in the source file itself and can be setup via the dialog described on this page (Run / Configure Build+Run File).

Options

When this file is active in the source editor ...

To override the behaviour for run and/or build by checking the appropriate checkbox.

  • On build project execute the Build File command instead
  • On run project execute the Run File command instead

Build

Working directory

Before building, change to this directory. Relative paths in the build command will then be relative to this directory.

Build Command

Provide the command to call for building the file. The default is:

 $(CompPath) $(EdFile)

Scan for FPC messages

Parse output for FPC errors and hints. The IDE will jump to errors.

Scan for Make messages

Parse output for 'Make' errors and hints. The IDE will jump to errors.

Macros

IDE Macros in paths and filenames

Run

Always build before run

If checked, the Build File command is executed before running.

Working directory

Before running, change to this directory. Relative paths in the run command will then be relative to this directory.

Run Command

Provide the command to call to run file. The default is:

 $MakeExe($(EdFile))

Macros

IDE Macros in paths and filenames

IDE directives

  • BuildCommand
  • BuildWorkingDir
  • BuildScan
  • RunCommand
  • RunWorkingDir
  • RunFlags

See IDE directives.