Difference between revisions of "IDE Window: Package Editor"

From Free Pascal wiki
(More)
m (More)
Line 42: Line 42:
 
** '''Unit''' - file is handled as normal unit. File extension must be .pas, .pp or .p.
 
** '''Unit''' - file is handled as normal unit. File extension must be .pas, .pp or .p.
 
** '''Virtual Unit''' - file is registered by this package, but its source and ppu file is in a source that can not have a package. For a unit in the FPC directories.  
 
** '''Virtual Unit''' - file is registered by this package, but its source and ppu file is in a source that can not have a package. For a unit in the FPC directories.  
** '''Main unit''' - The IDE will write the package registration code to this file instead of ''packagename''.pas. Only one unit can be a main unit. Use this file type if your package contains a unit with the name of the package. This file type exists since 0.9.29. See [[Lazarus_Packages#Adding_existing_components_to_a_Package|here]] for more information.
+
** '''Main unit''' - The IDE will write the package registration code to this file instead of ''packagename''.pas. Only one unit can be a main unit. Use this file type if your package contains a unit with the name of the package. This file type has existed since version 0.9.29. See [[Lazarus_Packages#Adding_existing_components_to_a_Package|here]] for more information.
 
** '''LFM''' - the file is a Lazarus form.
 
** '''LFM''' - the file is a Lazarus form.
 
** '''LRS''' - the file is a Lazarus resource include file.
 
** '''LRS''' - the file is a Lazarus resource include file.
 
** '''include''' - the file is an include file. It can have any extension.
 
** '''include''' - the file is an include file. It can have any extension.
 
** '''issues xml''' - the file is a Lazarus issues xml file.
 
** '''issues xml''' - the file is a Lazarus issues xml file.
** '''Text''' - the file is a text file, for example xml, html, script.
+
** '''Text''' - the file is a text file (for example xml, html, or a script).
** '''Binary''' - the file is a binary file. Use this for all other file types.
+
** '''Binary''' - the file is a binary file. Use this for all non-text file types.
 
* '''Add to project''' -  
 
* '''Add to project''' -  
* '''Install''' - Compiles the package and all dependencies, adds it to the list of install packages of the IDE and rebuilds the IDE.
+
* '''Install''' - Compiles the package and all its dependencies, adds it to the list of packages installed in the IDE, and rebuilds the IDE.
* '''Uninstall''' - Remove this package and all dependend packages from hte list of IDE install packages. It will ask to rebuild the IDE. To uninstall a static packages, the IDE must be rebuild and restarted. (At the moment all IDE packages are static).
+
* '''Uninstall''' - Remove this package and all dependent packages from the list of installed IDE packages. You will be asked if you want then to rebuild the IDE (which completes the removal). To uninstall a static packages, the IDE must be rebuilt and restarted. (At the moment - 2011 - all IDE packages are static).
 
* '''Save''' - Save changes to the .lpk file.
 
* '''Save''' - Save changes to the .lpk file.
* '''Save As''' - Opens a dialog and to choose a new filename for the .lpk file. The package will be renamed. The package files are not moved/renamed. If you save it in a new directory check the paths in the [[IDE Window: Compiler Options|compiler options]].
+
* '''Save As''' - Opens a dialog in which you can choose a new filename for the .lpk file. The package (.lpk) will be renamed. The files referenced by the package are not moved or renamed. If you save the renamed package (.lpk) in a new directory, check the paths in the [[IDE Window: Compiler Options|compiler options]].
* '''Revert''' - Discard changes and load the package (.lpk) from disk.
+
* '''Revert''' - Discard any changes you have made, and reload the original package (.lpk) from disk.
* '''Publish Package''' - Opens [[IDE Window: Publish Project Package|Publish Project / Package]] to copy the package and its files to another directory. This is useful to create a package without compiled, version files (svn, cvs, ...) and create a zip.
+
* '''Publish Package''' - Opens [[IDE Window: Publish Project Package|Publish Project / Package]] to copy the package and its files to another directory. This is useful for creating a package without compiled files or version files (svn, cvs, ...) as a preliminary to creating a zipped file of the package to send to another computer.
* '''Compile''' - Compile this package. If any required package needs compiling, they will be rebuilt first.
+
* '''Compile''' - Compile this package. If any required package needs compiling, that package will be rebuilt first.
* '''Recompile clean''' - Normally the compiler checks for each unit, if it needs to be rebuild. With this, the compiler does not check, but compiles every unit of the package. And if any required package needs compiling, they will be rebuilt first.
+
* '''Recompile clean''' - Normally the compiler checks each unit in case it needs to be rebuilt. This option prevents such compiler checks, causing it to compile every unit in the package. If any required package needs compiling, it will be rebuilt first.
* '''Recompile all required''' - Same as ''Recompile Clean'', but for this and any required package. Keep in mind that some base packages like the FCL and LCL are set to never compile automatically and thus are never recompiled by this call.
+
* '''Recompile all required''' - Same as ''Recompile Clean'', but all required packages are also recompiled. Keep in mind that some base packages like the FCL and LCL are set to never compile automatically and thus are never recompiled by this call.
* '''Create Makefile''' - Creates a Makefile.fpc and a Makefile for this package, which can be used to compile the package without the IDE. Beware, that the Makefile is simple and requires, that all needed packages are at the same places. That means, that copying this Makefile to another computer needs exactly the same paths of all packages, including lazarus, or you must adapt the Makefile yourself.
+
* '''Create Makefile''' - Creates a Makefile.fpc and a Makefile for this package, which can be used to compile the package without the IDE. Be aware that the Makefile is simple, and requires that all needed packages are at the same place. This means that if you copy the Makefile to another computer, it will need exactly the same paths for all packages (including Lazarus). So usually you will need to adapt such a copied Makefile yourself to allow it to run successfully on another computer (which is almost cettain to have different path configurations).
 
* '''Add''' - Opens [[IDE Window: Add to Package|Add to Package]] to add a new item (unit, file, dependency, ...) to the package.
 
* '''Add''' - Opens [[IDE Window: Add to Package|Add to Package]] to add a new item (unit, file, dependency, ...) to the package.
* '''Remove''' - Remove the currently selected item (e.g. file or dependency) from the package. A dialog will open to confirm.
+
* '''Remove''' - Remove the currently selected item (e.g. file or dependency) from the package. A dialog asks for confirmation before the removal is completed.
* '''General Options''' - Opens the dialog [[IDE Window: Package Options|Package Options]] to setup the Usage options, version information, author and other general information of the package.
+
* '''General Options''' - Opens the [[IDE Window: Package Options|Package Options]] dialog to enter details of Usage options, version information, author and other general information about the package.
 
* '''Compiler Options''' - Opens the [[IDE Window: Compiler Options|Compiler Options]] of the package.
 
* '''Compiler Options''' - Opens the [[IDE Window: Compiler Options|Compiler Options]] of the package.
* '''View Package Source''' - Opens the main source file of the package. This unit is automatically created by the IDE on each compile. So, do not edit it manually, as all your changes will be lost.
+
* '''View Package Source''' - Opens the main source file of the package. This unit is automatically created by the IDE on each compile. So don't waste time editing it manually, since all your changes will be lost.
* '''View ToDo List''' - Opens the todo list viewer, but only with items from inside this package.
+
* '''View ToDo List''' - Opens the ToDo list viewer, restricted just to ToDo items from inside this package.
  
 
== File properties ==
 
== File properties ==

Revision as of 12:44, 22 June 2011

Deutsch (de) English (en) suomi (fi) français (fr) 日本語 (ja) português (pt)

Save

Save changes to disk. (.lpk file)

Add

Opens the dialog Add to Package to add a new item (unit, file, dependency, ...) to the package.

Options

Opens the dialog Package Options to setup the Usage options, version information, author and other general information of the package.

Install

Compiles the package and all dependencies, adds it to the list of install packages of the IDE and rebuilds the IDE.

Help

Show this help.

Compile

Compiles the package and all dependencies.

Remove

Remove the currently selected item (e.g. file or dependency) from the package. A dialog will open to confirm.

Compiler Options

Opens the Compiler Options of the package.

More

  • Open file - open the selected file in the editor
  • Remove file - remove the file from the package. A dialog is shown asking for confirmation.
  • Move file up - move file one position up. This is only for aesthetic reasons.
  • Move file down - move file one position down. This is only for aesthetic reasons.
  • File type
    • Unit - file is handled as normal unit. File extension must be .pas, .pp or .p.
    • Virtual Unit - file is registered by this package, but its source and ppu file is in a source that can not have a package. For a unit in the FPC directories.
    • Main unit - The IDE will write the package registration code to this file instead of packagename.pas. Only one unit can be a main unit. Use this file type if your package contains a unit with the name of the package. This file type has existed since version 0.9.29. See here for more information.
    • LFM - the file is a Lazarus form.
    • LRS - the file is a Lazarus resource include file.
    • include - the file is an include file. It can have any extension.
    • issues xml - the file is a Lazarus issues xml file.
    • Text - the file is a text file (for example xml, html, or a script).
    • Binary - the file is a binary file. Use this for all non-text file types.
  • Add to project -
  • Install - Compiles the package and all its dependencies, adds it to the list of packages installed in the IDE, and rebuilds the IDE.
  • Uninstall - Remove this package and all dependent packages from the list of installed IDE packages. You will be asked if you want then to rebuild the IDE (which completes the removal). To uninstall a static packages, the IDE must be rebuilt and restarted. (At the moment - 2011 - all IDE packages are static).
  • Save - Save changes to the .lpk file.
  • Save As - Opens a dialog in which you can choose a new filename for the .lpk file. The package (.lpk) will be renamed. The files referenced by the package are not moved or renamed. If you save the renamed package (.lpk) in a new directory, check the paths in the compiler options.
  • Revert - Discard any changes you have made, and reload the original package (.lpk) from disk.
  • Publish Package - Opens Publish Project / Package to copy the package and its files to another directory. This is useful for creating a package without compiled files or version files (svn, cvs, ...) as a preliminary to creating a zipped file of the package to send to another computer.
  • Compile - Compile this package. If any required package needs compiling, that package will be rebuilt first.
  • Recompile clean - Normally the compiler checks each unit in case it needs to be rebuilt. This option prevents such compiler checks, causing it to compile every unit in the package. If any required package needs compiling, it will be rebuilt first.
  • Recompile all required - Same as Recompile Clean, but all required packages are also recompiled. Keep in mind that some base packages like the FCL and LCL are set to never compile automatically and thus are never recompiled by this call.
  • Create Makefile - Creates a Makefile.fpc and a Makefile for this package, which can be used to compile the package without the IDE. Be aware that the Makefile is simple, and requires that all needed packages are at the same place. This means that if you copy the Makefile to another computer, it will need exactly the same paths for all packages (including Lazarus). So usually you will need to adapt such a copied Makefile yourself to allow it to run successfully on another computer (which is almost cettain to have different path configurations).
  • Add - Opens Add to Package to add a new item (unit, file, dependency, ...) to the package.
  • Remove - Remove the currently selected item (e.g. file or dependency) from the package. A dialog asks for confirmation before the removal is completed.
  • General Options - Opens the Package Options dialog to enter details of Usage options, version information, author and other general information about the package.
  • Compiler Options - Opens the Compiler Options of the package.
  • View Package Source - Opens the main source file of the package. This unit is automatically created by the IDE on each compile. So don't waste time editing it manually, since all your changes will be lost.
  • View ToDo List - Opens the ToDo list viewer, restricted just to ToDo items from inside this package.

File properties

When selecting a file the groupbox below shows some properties for the selected file.

Register unit

Check this if the selected unit contains a procedure Register in the interface which should be called at designtime by the IDE. This is for example needed when the unit registers a new component for the IDE component palette.

Use unit

Check this if the selected unit should automatically be compiled when the package is compiled. This is enabled by default for pascal units and unchecked for all other. Uncheck this if the unit is only usable under some platforms.