198 Commits

Author SHA1 Message Date
Enrico Tröger
3d0bdbd6da waf: The GEANY_*_SYMBOL flags also need to be defined for C++
In Waf, we need to add the new flags to CFLAGS *and* CXXFLAGS otherwise
the Scintilla build would break.
To keep it more reabable, we first populate a temporary list
geany_symbol_flags which is then added to CFLAGS and CXXFLAGS.

Concerning the quote FIXME: no further qoting is necessary here.
2015-04-10 16:15:58 +02:00
Enrico Tröger
abc5f3239b waf: Adjust to build and use libgeany 2015-04-10 16:15:45 +02:00
Colomban Wendling
9644fb0ae2 Define GEANY_{EXPORT,API}_SYMBOL from the build system
This makes it easier to define it consistently to what the compiler
and platform supports, and avoids having to include a special header
everywhere, which is some kind of a problem for separate libraries
like TagManager and especially Scintilla.

As we only use these macros from the source and not the headers, it
is fine for it to be defined to a configure-time check from the build
system.

Warning: Although Waf and Windows makefiles are updated they are not
         tested an will probably required tuning.
2015-04-10 16:08:08 +02:00
Jiří Techet
ada4595264 Use global menubar on OS X
We have to disable quartz accelerator handling because otherwise
accelerators are performed also from other windows than the main
Geany editor (e.g. Ctrl+V with find dialog open performs the keybinding
Ctrl+V and inserts the text to the editor).

OS X applications have an extra menu entry to the left of the File menu -
an "application menu". This menu usually contains About, Preferences,
Quit. Many users, however, may be used to Geany from other platforms
and expect Preferences to be under the Edit menu so leave them there.
Quit and About are rarely used and the application menu is the place where
they are supposed to be - move these entries from other Geany menus there
and hide them in the affected menus (the quit entry is inserted automatically,
we just need to hide it from File).

Also tell OS X the Help menu is dedicated to help (we get search in
menu entries by name for free thanks to this).

The global menu should refresh automatically based on user actions.
Unfortunately this is not the case when gtk_menu_reorder_child()
is used because it does not emit any signals so the gtk-mac-integration
library doesn't see this call. Refresh the menu manually after calling
this function.
2015-03-04 12:40:36 +01:00
Jiří Techet
18d517bd95 Use gtk-mac-integration so app bundle can be created on OS X
This patch adds the gtk-mac-integration library and uses it to
adjust various paths in Geany to point it inside the app bundle
if Geany runs from inside the bundle.

It adds the utils_resource_dir() utility function to return
correct directories for various kinds of resources for all supported
operating systems. Using this function the patch adjusts all Geany
resource, plugin, icon, doc, and locale paths.
2015-03-04 12:40:27 +01:00
Colomban Wendling
2ff1386d96 Add new parser for JSON 2015-01-31 22:14:50 +01:00
Jiří Techet
df03bcace0 waf: Don't relink scintilla and geany on every build
The ant_glob() function doesn't return a list of strings but rather
a list of waflib.Node.Nod3 objects. These print as paths so build
works but apparently confuse waf which thinks the files have
changed every time the waf command is performed.

Relinking scintilla and geany on every waf invocation is especially
problemmatic during "sudo waf install" where scintilla and geany
binaries get owned by the root user. This isn't a big problem on Linux
but on OS X this prevents subsequent waf calls to update the
binaries and the build fails.

To fix the issue, just convert the waflib.Node.Nod3 objects
to relative (string) paths.
2015-01-09 01:35:43 +01:00
Colomban Wendling
94aa892c81 Merge pull request #373 from techee/go_ctags
Add a Go ctags parser.
2014-11-30 02:03:00 +01:00
Jiří Techet
ccb15a31be Add the go ctags parser
Make go one of the builtin filetypes, add the parser and update the related
source and config files. While there, remove Rust from [Groups] in
filetype_extensions.conf because it's already a builtin filetype as well.

The parser itself is stolen from the fishman/ctags repo.
2014-11-30 01:35:00 +01:00
Colomban Wendling
1dc09597b2 Fix check for fnmatch and remove strict dependency on it for Windows
Strict dependency on fnmatch was removed in 52076d19e8fe7ab41ebc92928e.

We still have an optional dependency on it from CTags, but I don't
think we use this code, and anyways the checks we had for the optional
path to be taken were incorrect, so it was never actually used.

So, drop the dependency on libibrety for Windows builds, and fix the
remaining checks for an optional fnmatch so if it is found it can
actually be used.
2014-11-09 17:40:03 +01:00
Colomban Wendling
8c77accfd0 Merge PR#356 from 'b4n/techee/tm'
Huge TagManager improvements
2014-11-08 19:37:20 +01:00
Enrico Tröger
a7a893a22f Set -O2 compiler flag by default for gcc
But only if no other optimization flags could be found.
2014-10-26 23:44:19 +01:00
Jiří Techet
52076d19e8 Remove unused tm_file_entry.[ch] 2014-10-18 21:40:10 +02:00
Jiří Techet
26587454b0 Remove TmWorkObject and all the OO related stuff
In addition, rename all functions, parameters, comments etc. mentioning
work_object and remove unnecessary parameters of various functions.
Delete dead code paths.

Also move common functions like tm_get_real_path() from tm_work_object to
tm_source_file.
2014-10-18 21:40:10 +02:00
Colomban Wendling
d42837f021 Merge pull request #351 from techee/guards
Protect private definitions by the GEANY_PRIVATE macro in headers
2014-10-18 18:13:45 +02:00
Enrico Tröger
5a243fd224 Explicitly define Windows version for older Mingw environments 2014-10-15 17:33:57 +02:00
Jiří Techet
10a28b4191 Protect private definitions by the GEANY_PRIVATE macro in headers
In addition, this patch defines the GEANY_PRIVATE macro for the tag
manager library where it wasn't defined before, removes 2 tag manager
headers from distribution as they are not needed by plugins and
in the tag manager changes the docstrings to ordinary comments for
private definitions.
2014-10-09 20:51:32 +02:00
Jiří Techet
ce46f8f0b4 Remove unused tm_tagmanager.c 2014-10-05 22:40:15 +02:00
Jiří Techet
4646323878 Remove unused tm_symbol 2014-10-05 22:40:15 +02:00
Jiří Techet
b512aa0368 Remove unused tm_project and all its references in docstrings 2014-10-05 22:40:15 +02:00
Enrico Tröger
f219ea1b38 Cleanup apidoc and hackingdoc commands to use ctx.top_dir and ctx.out_dir
This should be cleaner and safer than using '../' mixed with os.chdir().
2014-08-29 16:12:40 +02:00
Enrico Tröger
5bd878cb7c Reuse ConfigurationContext when searching for programs if we have one
This enables proper logging when checking for rst2html during configuration.
2014-08-29 15:46:44 +02:00
Enrico Tröger
9307a6877c Explicitly specify extensions when searching for rst2html
This is cleaner than searching for rst2html and rst2html.py since Waf
offers the API for this and this change enables Windows support.
While at it, add binary name 'rst2html2' for ArchLinux support.
2014-08-29 15:40:47 +02:00
Enrico Tröger
6ecf750759 The missing bits for HTML docs: only on GIT build and support in-tree geany.html 2014-08-29 14:39:26 +02:00
Enrico Tröger
8961f0b6e9 Add option --disable-html-docs 2014-08-29 14:27:12 +02:00
Enrico Tröger
985cd9146f Add "hackingdoc" as proper action and remove non-working --hackingdoc option 2014-08-29 14:13:57 +02:00
Enrico Tröger
8d5e666d9e Build HTML documentation automatically during the build process
This is an improvement as requested in #322 to update the HTML docs
after geany.txt or geany.css have changed.
Also, with this change the resulting HTML will be generated in the outdir,
not in srcdir/doc anymore.
2014-08-29 14:10:56 +02:00
Colomban Wendling
64910a4ea1 Fix Waf build after HTML documentation untracking 2014-08-27 19:02:24 +02:00
Enrico Tröger
881ca4fa02 Fix typo in generated geany.pc 2014-06-22 14:09:04 +02:00
Enrico Tröger
01cf9a9fdc Do not use backward slashes in geany.pc on Windows
And explicitly convert backward slashes in the global
prefix to forward slashes as tools like pkg-config or
gcc could interpret the backward slashes as escape
sequences.
2014-05-29 17:47:37 +02:00
Enrico Tröger
1bacf869e0 Extend use of os.path.join() to construct platform compliant paths 2014-05-24 11:32:45 +02:00
Matthew Brush
4efcbab332 Include what you use
This is a mega-commit - because most of it had to be done in one go
otherwise some commits would fail to compile - that attempts to fix a
few problems with Geany's includes as well as various other related
cleanups. After this change it's easier to use includes and there's
little worry about which order things are included in or who includes
what.

Overview of changes:

* Include config.h at the start of each source file if HAVE_CONFIG_H
  is defined (and never in headers).
* Go through each source file and make the includes section generally
  like this:
  - Always config.h first as above
  - Then if the file has a header with the same name, include that
  - Then include in alphabetical order each other internal/geany header.
  - Then include standard headers
  - Then include non-standard system headers
  - Then include GLib/GTK+ related stuff
* Doing as above makes it easier to find implicit header include
  dependencies and it exposed quite a few weird problems with includes
  or forward declarations, fix those.
* Make geany.h contain not much besides some defines.
  - Add a little header file "app.h" for GeanyApp and move it there
  - Move "app" global to new "app.h" file
  - Move "ignore_callback" global to "callbacks.h"
  - Move "geany_object" global to "geanyobject.h"
* Add an include in "geany.h" for "app.h" since GeanyApp used to be
  defined there and some plugins included this header to access
  GeanyApp.
* Include "gtkcompat.h" everywhere instead of gtk/gtk.h so that
  everywhere sees the same definitions (not a problem in practice AFAIK
  so this could be changed back if better that way.
* Remove forward declarations from previous commits as some people
  apparently consider this bad style, despite that it reduces inter-
  header dependencies.

TODO:
* As always, to test on win32
* As always, to test with not Autotools
* Test plugins better, both builtin and geany-plugins, likely API/ABI bump
* Test with various defines/flags that may change what is included
* win32.[ch] not really touched since I couldn't test
2014-05-21 15:37:19 -07:00
Colomban Wendling
09b2cf1592 Fix Waf build for recent Doxyfile changes
Recent changes to Doxyfile.in added new placeholders the build system
has to replace, and Waf recognized them but failed, not knowing what to
replace them with.
2014-05-02 21:41:02 +02:00
Colomban Wendling
d58c344585 Waf: correctly link libm as required 2014-04-29 02:03:06 +02:00
Colomban Wendling
24f2363fb7 Post release version bump
Say hello to Geany 1.25 "Veed"!
2014-04-13 19:33:23 +02:00
Enrico Tröger
e5eb69b20c Add linker flags -static-libgcc and -static-libstdc++ on Windows
This seems necessary with newer gcc versions to not
require libgcc*.dll libraries on runtime.
2014-04-13 11:00:56 +02:00
Enrico Tröger
9f294c25c3 Add --no-scm configure option to bypass SCM detection 2014-04-13 10:43:55 +02:00
Enrico Tröger
82842b230b Install header files and geany.pc also on Windows 2014-04-11 00:06:29 +02:00
Colomban Wendling
6a85a50d21 Replace bare CTags parser ID numbers with an enumeration
Avoid using magic numbers in the source for better readability and
easier maintenance.
2014-01-29 01:34:26 +01:00
SiegeLord
3d7ade4e02 Integrate the Rust lexer with the rest of Geany's functionality 2014-01-14 12:50:38 -05:00
Colomban Wendling
82f82ed372 Use GLib's portable version gethostname(): g_get_host_name()
Drop our own portability layer and use GLib's one instead (which
actually does exactly the same as our own).

Thanks to Matthew for spotting this.
2013-08-18 00:52:48 +02:00
Dimitar Zhekov
b7fbb78ca7 import cxx_compiler to enable C++ compiler detection change 2013-06-08 13:43:37 +02:00
Dimitar Zhekov
42c00f2f50 sync C++ compiler detection under Windows with the C compiler detection 2013-06-07 06:57:41 +02:00
Enrico Troeger
9edd4f4a90 For now disable detecion of MSVC on Windows 2013-04-24 22:05:56 +02:00
Igor Shaula
666f471c78 Update waf to version 1.7.10 and fix wscript to fit new API 2013-04-14 15:02:36 +03:00
Enrico Tröger
0c5442b625 More GTK3 Waf build system adjustments
Install the src/gtkcompat.h header and install data/geany.css if necessary.
2013-03-11 19:54:28 +01:00
Enrico Tröger
84176f2e8a Add --enable-gtk3 configure flag to the Waf build system 2013-03-10 18:21:05 +01:00
Colomban Wendling
7e3a235436 Post release version bump
Say welcome to Geany 1.24 "Sakai"!
2013-03-10 17:00:01 +01:00
Baptiste Pierrat
d4e61bf093 Add support for Abaqus files
Support for Abaqus (.inp) files, including scintilla lexer and tag
parser.

Signed-off-by: Baptiste Pierrat <baptiste.pierrat@gmail.com>
2013-02-12 14:56:38 +01:00
Lex
8294ea2c2e Add Asciidoc filetype
Add a filetype for Asciidoc with symbol parser, but not styling.
2013-01-17 15:43:24 +11:00