220 Commits

Author SHA1 Message Date
Colomban Wendling
826f6516d3 Merge pull request #441 from zhekov/spawn
Add a spawn module for Geany

Thanks a lot for Dimitar's hard work, commitment and endless patience!

Closes #274, #441, and https://sourceforge.net/p/geany/bugs/943/
Should also fix https://sourceforge.net/p/geany/bugs/898/
2015-05-15 18:54:23 +02:00
Enrico Tröger
9fd566e040 Windows: don't link geany_private.rc to libgeany as it is not necessary 2015-04-25 12:19:28 +02:00
Dimitar Zhekov
d8ad369f8e Merge branch 'master' of https://github.com/geany/geany into spawn
Conflicts:
	src/build.c
	src/tools.c
2015-04-18 12:31:41 +03:00
Enrico Tröger
31ae06f7e5 Merge pull request #466 from techee/waf_build_tree
waf: explicitly set the location of signallist.i and geany.html in the b...
2015-04-14 20:01:45 +00:00
Jiří Techet
f6fbda768e waf: explicitly set the location of signallist.i and geany.html in the build tree
On OS X signallist.i is always rebuilt because waf looks for it in the build
tree but generates it inside the source tree for some reason so it's
always missing in the build tree. Set the target explicitly to the
build tree to fix the problem.

Similarly, set the target for geany.html to the build tree. Thanks to this
waf also creates the 'doc' directory in the build tree which is otherwise
missing and the cwd command fails for this reason (e.g. when the
_build_ directory is removed).

These two task generators are the only ones that don't use the 'features'
parameter - the features in the other task generators should already
handle the source/build tree problems for us (see the Waf Book section
6.3.3. Nodes, tasks, and task generators).
2015-04-13 23:00:43 +02:00
Colomban Wendling
d97709ff86 Merge pull request #462 from techee/waf_install
waf: Disable build/install phase interleaving
2015-04-13 17:59:54 +02:00
Matthew Brush
bdc082cb77 Bump min. version of GTK2 to 2.24 and GLib to 2.28
Note: This is mostly search and replace. I've only tested with my
GTK+ 2.24.20 and not at all the Waf build system.
2015-04-12 18:05:28 -07:00
Enrico Tröger
f032067443 Windows: Compile geany_private.rc into Geany.exe for version data and icon 2015-04-12 22:54:16 +02:00
Jiří Techet
ccfe8f23c1 waf: Disable build/install phase interleaving
When doing "./waf install" and some source files are modified
so they need to be rebuilt, the build and install phase can be
interleaved so one thread is still performing build while other
thread is already performing install tasks.

This appears to be a problem (at least on OS X) when some of
the Geany plugins are still being built and libgeany is already
being installed in parallel.

Create a separate group for the install phase to eliminate the
problem.
2015-04-12 20:57:17 +02:00
Colomban Wendling
f3078ebbc6 Merge branch 'kugel-/linkage-cleanup_rebase-for-merge'
This merges PR#429 with only small history cleanup (no code changes),
and ABI bump.

Closes #355, #358 and #429.
2015-04-10 16:54:30 +02:00
Colomban Wendling
07dacb66d2 waf: Improve passing of export and visibility flags 2015-04-10 16:16:19 +02:00
Colomban Wendling
7ac4bf3d24 waf: Don't abuse static libraries
Instead of abusing static libraries putting shared objects in them, and
manually setting the flags required to build shared objects, use sets
of objects and Waf's own cshlib/cxxshlib flags.

Also explicitly call the appropriate build context method instead of
only listing features in order to make it clear what is built.

Some references:
* http://docs.waf.googlecode.com/git/book_16/single.html#_predefined_task_generators
* http://docs.waf.googlecode.com/git/book_16/single.html#_local_libraries
* https://code.google.com/p/waf/issues/detail?id=1398
2015-04-10 16:16:19 +02:00
Thomas Martitz
e4ab28058d waf: set rpath for executable
Whether rpath is liked or not, it allows geany to Just Work and is consistent
with autotools
2015-04-10 16:16:19 +02:00
Thomas Martitz
7649a6921f waf: Fix core plugins on Linux
The -fvisibility=hidden flag for libgeany.so is also applied to plugins.
This is not desirable.
2015-04-10 16:16:19 +02:00
Thomas Martitz
a1f2d0b94a waf: Don't use temp variables 2015-04-10 16:16:19 +02:00
Thomas Martitz
a320609d5f waf: Fixes for libgeany
- libgeany install dir was wrong on win32
- comdlg32 is required
- more headers need to be installed
- -fPIC is required on some platforms
- LINKFLAGS_cprogram now have to be applied to libgeany.dll
2015-04-10 16:16:19 +02:00
Colomban Wendling
90b5e9b76f waf: Add rule to generate signallist.i
Based on previous work from Matthew Brush.
2015-04-10 16:16:19 +02:00
Enrico Tröger
43037b379b waf: Implement check whether compiler supports -fvisibility=hidden
This is a bit better than compiler == 'gcc'.
Tested with gcc 4.9 (success) and gcc 3.4.5 (not supported).
2015-04-10 16:16:05 +02:00
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
Colomban Wendling
ca02c593e7 Merge pull request #445 from bengtan/erlang-fishman-ctags
Implement Erlang ctags
2015-03-27 14:44:55 +01:00
Jiří Techet
243480b83d Regenerate png/ico icons from svg and add the 32x32 size
The 32x32 size can be created by downsampling the 48x48
icon by gtk at runtime but the result will be worse than
doing the same directly from the svg icon (48->32
conversion means downsampling by 1.5 which can introduce
some moire artifacts and loss of information). Since
32x32 are quite commonly used, it makes sense to ship
this icon size with Geany.

The png files have been optimized by pngoptim to remove
metadata and compress the icon better.
2015-03-16 01:49:16 +01:00
Beng Tan
b0c5d221a5 Implement Erlang ctags.
Using erlang.c from fishman/ctags.
2015-03-15 13:41:23 +08:00
Dimitar Zhekov
ce0fa6ffa1 Add a spawn module for Geany
g_spawn_async_with_pipes() under Windows has various drawbacks:

- There is no g_shell_parse_argv() for windows. It's not hard to write
  one, but the command line recreated by mscvrt may be wrong.
- GLib converts the argument vector to UNICODE. For non-UTF8 arguments,
  the result is often "Invalid string in argument vector at %d: %s:
  Invalid byte sequence in conversion input" (YMMV). Our tools (make,
  grep, gcc, ...) are "ANSI", so converting to UNICODE and then back
  only causes problems.
- For various reasons, GLib uses an intermediate program to start
  children (see gspawn-win32.c), with the side effect that the
  grandchildren output (such as make -> gcc) is not captured.
- With non-blocking pipes, the g_io_add_watch() callbacks are never
  invoked, while with blocking pipes, g_io_channel_read_line() blocks.
- Some smaller problems, explained in spawn.c as inline comments.

The spawn module tries to fix these problems, and to provide easier
APIs, which guarantee that the callbacks will synchronized as expected,
and g_io_channel_read_line() will not be required, since even under
Unix, it may buffer lines of unlimited length.

This initial commit only adds the module source and header files, and
includes it in the various build systems.

You can see PR 274 for a long discussion about the module.
2015-03-10 21:24:42 +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