[Geany-Users] ConfigureCustomBuildMenu

Geoff Kaniuk geoff at xxxxx
Tue Oct 9 21:13:01 UTC 2018


Thank you Lex,

There might have been some confusion in the statement of my problem.

 > Unless you are doing something really special you should use the GUI
 > not edit the config files directly.

I agree with this as a general principle. However I would like all my 
projects to have the same build menu.  I of course create new projects 
via the Project->new GUI, but at the moment only the standard build menu 
is produced. There is no [build-settings] section in the newly created 
newproject.geany file.

I am not sure how special I am being. My C++ commands all use a fairly 
large makefile to compile, build and clean source for debugging.

 >> I have added a [build-menu] section to the files
 >> ~/.config/geany/filedefs/filetypes.EXT
 >
 > EXT has to be a built in **filetype** name not an extension, thats why
 > the files are called "filetypes.xxx" :)

Maybe my notation was confusing. In filetypes.cpp I have a [build-menu] 
section which starts with  filetypes=C;C++;Make; with detailed settings 
on the following lines.

At the moment I have a template containing the entire [build-menu]. 
After creating the new project I add the [build-menu] section to the 
newproject.geany file.  Thereafter all the menus shown in the 'Build' 
menu on the menu bar show as I expect for the various filetypes.  I do 
most of my development via the menu bar.

All works well. It just would be convenient to not have to edit the 
newproject.geany file for each new project.


Geoff

On 08/10/2018 22:27, Lex Trotman wrote:
> On Tue, 9 Oct 2018 at 01:18, Geoff Kaniuk <geoff at kaniuk.co.uk> wrote:
>>
>> I would like to configure a custom build menu for all my projects.
>>
>> According to my reading of the Build menu configuration section in the
>> Geany manual:
>>
>> https://www.geany.org/manual/current/index.html#id154,
> 
> See also https://wiki.geany.org/howtos/configurebuildmenu
> 
>>
>> I should add a [build-menu] section to all the filetypes files for my
>> projects.  The relevant files are EXT = { .h, .c, .cpp, .makefile }, so
>> I have added a [build-menu] section to the files
>> ~/.config/geany/filedefs/filetypes.EXT
> 
> EXT has to be a built in **filetype** name not an extension, thats why
> the files are called "filetypes.xxx" :)
> 
> The mapping from extension to filetype is in
> "filetype_extensions.conf" and it maps .c to C, and .h and .cpp to
> C++.
> 
> But for project specific settings see the wiki above.
> 
>>
>> However the build menu produced is the default.
>>
>> I have also tried adding a [build-menu] section to geany.conf without
>> success.
> 
> Unless you are doing something really special you should use the GUI
> not edit the config files directly.
> 
>> I have so far avoided editing the files in  usr/share/geany/filedefs
> 
> Correct.
> 
> Cheers
> Lex
> 
>>
>> Am I missing some settings?
>>


More information about the Users mailing list