Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:configurebuildmenu [2011/06/04 02:06] – Add Build Menu Image elextrhowtos:configurebuildmenu [2023/01/21 02:15] (current) – Correct build_menu to build-menu elextr
Line 10: Line 10:
 command needs to be run.  Some of the commands used are: command needs to be run.  Some of the commands used are:
  
-  * Simply running the program using an interpreter, eg Python code, or viewing HTML, where the command depends on the language being used.+  * Simply running the program using an interpreter, e.g. Python code, or viewing HTML, where the command depends on the language being used.
   * Compiling a source file and running the result, or building a document, where again the command depends on the language in use.   * Compiling a source file and running the result, or building a document, where again the command depends on the language in use.
   * Compiling and linking several source files and running/viewing the result   * Compiling and linking several source files and running/viewing the result
-  * Complex processes involving multiple source files, installation etc.+  * Complex processes involving multiple source files, installationetc.
  
 Where multiple files are involved it is usual to use some sort of build tool,  Where multiple files are involved it is usual to use some sort of build tool, 
-make, Cmake, JHbuild, BJam, Ant, Scons, WAF, Fabricate etc.  These tools +make, CMake, JHbuild, BJam, Ant, SCons, WAF, Fabricateetc.  These tools 
 usually have their own configuration and the commands to activate them do not  usually have their own configuration and the commands to activate them do not 
 depend on the language the source files use. depend on the language the source files use.
  
-It is also rare that a programmer works on only one thing at a time, most of +It is also rare that a programmer works on only one thing at a time. Most of 
 us have several projects (using the word in its normal English meaning) on the  us have several projects (using the word in its normal English meaning) on the 
 go at one time.  These may need different tool sets, even for the same  go at one time.  These may need different tool sets, even for the same 
Line 36: Line 36:
 The approach of limiting the tool sets is appropriate for development  The approach of limiting the tool sets is appropriate for development 
 environments which concentrate on limited languages, the original model of  environments which concentrate on limited languages, the original model of 
-IDEs like Eclipse and Netbeans which heavily integrated the Java workflow.+IDEs like Eclipse and NetBeans which heavily integrated the Java workflow.
  
-However Geany supports a wide range of platforms and programming and  +HoweverGeany supports a wide range of platformsprogrammingand  
-documentation languages so it is more appropriate that it takes the approach +documentation languagesso it is more appropriate that it takes the approach 
 of providing flexibility. of providing flexibility.
  
Line 48: Line 48:
 ===== Using the Build System, the Build Menu ===== ===== Using the Build System, the Build Menu =====
  
-Geany supports a wide range of user experience, from beginners to experts, +Geany supports a wide range of user experiences, from beginners to experts, and 
 from occasional users to continuous users.  So it is important that its  from occasional users to continuous users.  So it is important that its 
 flexibility is presented to the user in a simple, intuitive manner.  This is  flexibility is presented to the user in a simple, intuitive manner.  This is 
 provided by the Build menu. provided by the Build menu.
  
-{{images:Build%20Menu.png |Build Menu}}+{{:howtos:images:build-menu.png?direct&300|Build Menu}}
  
 The menu is broken into sections that roughly follow the usual workflow for  The menu is broken into sections that roughly follow the usual workflow for 
 software/document development. software/document development.
  
-  - The top section generally provides menu items for working with the file you are currently working on, eg to compile it.  These commands naturally depend on the language the file uses, and the menu items change as you change files.  This section may even disappear entirely if Geany doesn't know what to do with a particular filetype (specifically filetype None). +  - The top section generally provides menu items for working with the file you are currently working on, e.g. to compile it.  These commands naturally depend on the language the file uses, and the menu items change as you change files.  This section may even disappear entirely if Geany doesn't know what to do with a particular filetype (specifically filetype None). 
-  - The second section generally provides menu items that do not depend on the specific file, usually they are for working on groups of files, eg running a builder program.+  - The second section generally provides menu items that do not depend on the specific file, usually they are for working on groups of files, e.g., running a builder program.
   - The third section helps with navigation to the places that the tools found errors in your source so you can correct them.   - The third section helps with navigation to the places that the tools found errors in your source so you can correct them.
   - The fourth section provides methods of executing the program that results from a successful compile/build, or of viewing resulting documents.  These commands may depend on the type of the source file or may not.   - The fourth section provides methods of executing the program that results from a successful compile/build, or of viewing resulting documents.  These commands may depend on the type of the source file or may not.
Line 86: Line 86:
 specific settings override less specific ones.  Examples of this approach that you  specific settings override less specific ones.  Examples of this approach that you 
 may be familiar with include, object oriented languages where functions  may be familiar with include, object oriented languages where functions 
-redefined on derived (ie more specific) types override the same function of +redefined on derived (i.e. more specific) types override the same function of 
 the (more general) base type, or cascading style sheets for HTML where more  the (more general) base type, or cascading style sheets for HTML where more 
 specific and later settings override a less specific/earlier one. specific and later settings override a less specific/earlier one.
Line 104: Line 104:
   - settings for a specific filetype for the type of file selected in the editor which come from the open project file    - settings for a specific filetype for the type of file selected in the editor which come from the open project file 
  
-Remember the setting from the source lowest in the list "wins", ie that is +Remember the setting from the source lowest in the list "wins", i.e. that is 
 what is used in the particular menu item, and each menu item is determined  what is used in the particular menu item, and each menu item is determined 
 individually.   individually.  
Line 132: Line 132:
  
   - one for editing user preference settings, activated by the "Set Build Commands" menu item, and   - one for editing user preference settings, activated by the "Set Build Commands" menu item, and
-  - one for editing project preferences settings, it is tab in the ''Project->Properties'' dialog and is only available when a project is open.+  - one for editing project preferences settings, it is the build tab in the ''Project->Properties'' dialog and is only available when a project is open.
  
 Both dialogs are arranged the same: Both dialogs are arranged the same:
  
-image of dialog here+{{:howtos:images:set-build-commands.png?direct&500|Set Build Commands Dialog}} 
 + 
 +{{:howtos:images:project-properties.png?direct&500|Project properties Dialog Build Tab}}
  
 This dialogs show the three configurable sections of the build menu and the  This dialogs show the three configurable sections of the build menu and the 
Line 196: Line 198:
  
 Each of the first two sections has a regular expression that can  Each of the first two sections has a regular expression that can 
-customise the parse.  This is a GNU-style extended regular expression where  +customise the parse.  This is a Perl-compatible regular expression (PCRE) where  
-the first two match groups provide the filename and the line number.  These +the first two match groups provide the filename (either absolute or relative) and the line number.  These 
 can occur in any order, a match group containing only digits is taken as the  can occur in any order, a match group containing only digits is taken as the 
 line number and the other is taken as the filename.  If no regular  line number and the other is taken as the filename.  If no regular 
Line 204: Line 206:
 menu items in that section. menu items in that section.
  
-Changes to these dialogs are not saved until you click ok.+Changes to these dialogs are not saved until you click OK.
  
 Remember that these commands can be set in the project preferences where they  Remember that these commands can be set in the project preferences where they 
Line 216: Line 218:
  
 When there is a setting that can be overridden by editing it in this dialog  When there is a setting that can be overridden by editing it in this dialog 
-(eg user by project or default by user), it will be shown in a lighter text +(e.g. user by project or default by user), it will be shown in a lighter text 
 colour.  When you start to edit anything in the row, all the values from the  colour.  When you start to edit anything in the row, all the values from the 
 settings being overridden are copied to the dialog and so will become normal  settings being overridden are copied to the dialog and so will become normal 
Line 240: Line 242:
   - the project file **project_name**.geany which can be stored in the project tree or outside it as you chose.   - the project file **project_name**.geany which can be stored in the project tree or outside it as you chose.
  
-Within these files only the contents of the [build_menu] section will be +Within these files only the contents of the [build-menu] section will be 
 discussed, but first a mention of the [build_settings] section.   discussed, but first a mention of the [build_settings] section.  
  
Line 252: Line 254:
 configurations, the settings in the [build_settings] section are loaded  configurations, the settings in the [build_settings] section are loaded 
 it the menu item they are defining is not already defined by a  it the menu item they are defining is not already defined by a 
-[build_menu] section entry in the same file. This has worked so well +[build-menu] section entry in the same file. This has worked so well 
 that at the time of writing almost no system filetypes files have been  that at the time of writing almost no system filetypes files have been 
 converted. converted.
  
 Geany 0.19 and later will only write changes made in the build GUI to the  Geany 0.19 and later will only write changes made in the build GUI to the 
-[build_menu] section and will not touch the [build_settings] section.  +[build-menu] section and will not touch the [build_settings] section.  
 Because of the restricted changes that can be made in the GUI this should  Because of the restricted changes that can be made in the GUI this should 
 work.  But the semantics of the two sections are different, so when you are  work.  But the semantics of the two sections are different, so when you are 
 hand editing you probably should not have both sections in the same file. hand editing you probably should not have both sections in the same file.
  
-==== [build_menu] ====+==== [build-menu] ====
  
 As noted before, filetype dependent settings are only considered if the file  As noted before, filetype dependent settings are only considered if the file 
Line 301: Line 303:
 users, so don't do it. users, so don't do it.
  
-Entries in the [build_menu] section of configuration files all have the +Entries in the [build-menu] section of configuration files all have the 
 same format: same format:
  
Line 333: Line 335:
  
 To allow entries for multiple filetypes to be stored in the one project  To allow entries for multiple filetypes to be stored in the one project 
-file, the entries are prefixed by the filetype name, eg+file, the entries are prefixed by the filetype name, e.g.
  
   CFT_01_LB = Compile   CFT_01_LB = Compile
Line 350: Line 352:
 There is no reason that you cannot have multiple project files for the one  There is no reason that you cannot have multiple project files for the one 
 source tree, allowing commands for differing uses to be stored, but not mixed.  source tree, allowing commands for differing uses to be stored, but not mixed. 
-An example would be to have "secret-project-x-linux.geany" that used gcc and +An example would be to have "secret-project-x-linux.geany" that used GCC and 
 friends to compile the project and "secret-project-x-windows.geany" that  friends to compile the project and "secret-project-x-windows.geany" that 
 contained the commands to compile with the windows tools.  contained the commands to compile with the windows tools. 
Line 367: Line 369:
 commands, either in the project or your own user preferences if you haven' commands, either in the project or your own user preferences if you haven'
 used a project. used a project.
- 
-The following image shows the project configuration dialog with some likely  
-option sets. 
- 
-include image here 
  
 When doing this remember that the second filetype independent command pops up a dialog and appends text the user enters to the command. When doing this remember that the second filetype independent command pops up a dialog and appends text the user enters to the command.
Print/export