161 Commits

Author SHA1 Message Date
Jiří Techet
4753344ce8 Add script for pretty-printing geany tags files
This script reads  Geany binary tags files from stdin and writes
to stdout a file where each of the tags is followed by a line where
the tag is printed in the following human-readable form:

tag_type:   return_value scope :: tag_name(arglist)   additional_stuff

Especially the tag_type is currently hard to understand when looking at
unit tests and easy to miss if there's a problem.
2022-06-13 00:31:16 +02:00
Enrico Tröger
6c0b48c809
Merge pull request #2924 from eht16/update_python_identifiers_py3_only
Generate Python identifiers only for Python 3
2022-05-22 14:40:12 +00:00
Thomas Martitz
5e22dfae22 Prepare for meson build system
Autotools-based builds will be supported for some time. This patch makes
some modifications to the Autotools build system necessary to to co-exist
with meson.

- LOCALEDIR and DATADIR won't be defined, replace with GEANY_* where necessary
- VERSION won't be defined, use PACKAGE_VERSION and PACKAGE_STRING instead
- Doxyfile cannot be generated by configure, which wouldn't run in a meson
  build. Generate both Doxyfile and Doxyfile-gi manually using sed
- actual shell script to generate signallist.i (inline shell not a thing in meson)
- path of signallist.i will change, exclude callbacks.c from doxygen
  to make it happy
- geany icon for 24x24 size such that one exists for all sizes
- install license file for Lexilla
- change how tests are run a bit so that runner.sh will also work for meson
- check for dirent.h, required by ctags
2022-03-14 22:08:47 +01:00
Thomas Martitz
9642f17d83
Merge pull request #3059 from techee/anon4
There are several problems with how we handle anonymous tags which this pull request tries to resolve:

1. Anonymous tags are currently determined based on how these tags are named by ctags which may not be completely reliable and unnecessary. ctags now has XTAG_ANONYMOUS flag we can query and determine whether a tag is anonymous or not based on that. Our fortran parser didn't report XTAG_ANONYMOUS so it has been updated to do so.
2. In order to store the information about anonymous tags, this pull request renames the unused `pointerOrder` member of TMTag (see the corresponding commit about more details  to `flags` and uses one bit to indicate whether a tag is anonymous. This is technically a API change but since pointerOrder always contained 0 and was unused (or maybe used by some super-old parser 15 years back), it doesn't really matter (no g-p plugin uses this field).
3. With the introduction of the new cxx parser, anonymous tags are reported as `__anonNUM` - before they were reported as e.g `anon_struct_NUM` - i.e. they contained information about the type in their name which made them easier to identify in the symbol tree. This pull request adds back this naming.
4. In addition to (3), the NUM in the previous parser was global for all types - i.e. tags were named as `anon_enum_1`, `anon_struct_2`, `anon_enum_3` which is a bit strange as it suggests there are 3 enums but there are 2 instead. This pull request makes these numbers per-type so the above becomes `anon_enum_1`, `anon_struct_1`, `anon_enum_2`.
5. This pull request sets the name of anonymous tag if it's followed by the corresponding typedef tag and the typedef tag is removed. For instance, for `typedef struct{int a} Foo;` you would previously get an anonymous tag for the struct under which `a` would be shown and then separately tag `Foo` as a typedef. After this patch, you get a tag `Foo` for the struct with `a` as its member and the anonymous name is dropped which makes things much clearer in the sidebar.

And finally, thanks to the fact that we do renaming of anonymous tags ourselves now, the last diff against ctags main can be dropped so we can use the upstream version without any modifications and the patch file isn't necessary any more. Hurray!!!
2022-02-12 22:38:16 +01:00
elextr
1b38513976
Switch to Python 3 for GTK doc header generation (#2903)
Use python3 whenever possible. Python 2 is EOL and the python binary might not be installed.

This obsoletes a Debian patch applied to their package.

Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
2022-02-06 22:05:47 +01:00
Enrico Tröger
ee0df54d93 Windows: Bundle xz in installer
Xz is needed for librsvg.
2022-01-10 23:22:37 +01:00
Jiří Techet
dbd0ebc914 Consistently rename anonymous tags and drop the last ctags diff
Check all the collected tags once a file is parsed (i.e. when
we have all tags, including those from subparsers) and renamea
them in the form

anon_enum_1
anon_struct_1
anon_enum_2
anon_struct_2

where the second component is a ctags kind and the number is
per-kind.

In addition, scopes of the nested tags have to be updated if the parent
tag is an anonymous tag.

Finally, for anonymous tags of the form typedef struct Foo{int a;};
we can use the name of the typedef instead of generating the
anonymous name. In this case we can drop the typedef tag once
the anonymous tag is updated with its name.

More details can be found in comments.
2022-01-10 23:10:44 +01:00
Thomas Martitz
a04f361ef3
Merge pull request #3046 from kugel-/scintilla5-trad
Update to Scintilla 5.1.5 and Lexilla 5.1.4
2022-01-09 23:50:41 +01:00
Enrico Tröger
0601c73f7a
Windows: Bundle librsvg in installer (#3082)
While not strictly needed to run Geany, librsvg enables SVG support
which might used by GTK themes.

See also #3063 for GTK theme discussion.
2022-01-04 23:34:06 +01:00
Jiří Techet
5ea3e3ec77
Use cxx parser from uctags (#3032)
* Add "l" prefix to functions in lcpp.c/h

This is to avoid clash with cpreprocessor.c/h used by the new cxx parser.
Merging lcpp.c/h with cpreprocessor.c/h would be difficult (at least for
now) because of the differences in c.c so keep them separate for now.

* Rename C/C++ parsers to "Old"

As a result, when we copy the new cxx parser, we don't have clashes of
these symbols from the two different parsers.

* Add the new cxx parser

This patch only makes the parser compile, it doesn't enable
it yet.

* Enable the new cxx parser

There are several things needed for this:

1. The new preprocessor has to be defined as a separate parser.

2. Tags from the new c/c++ parsers and the preprocessor parser have to
be mapped to Geany types. We still need to keep the old mappings because
some parsers like Ferite or GLSL still use the old C parser.

3. Anonymous tags have a different name so we have to reflect this in
tm_tag_is_anon().

* Update C/C++ unit tests

The changes are mostly these:

1. Spaces in function argument list

(int var1, int var2, ...) - before
(int var1,int var2,...) - now

2. Anonymous tags

anon_struct_1
anon_union_2
anon_typedef_3

vs

__anon1
__anon2
__anon3

3. Improved parsing of the new parser

* Eliminate console warning for cxx 'using' tags

Fix from

fb305d8814

* Update update-ctags.py to also update the cxx parser

* Pass our ignore.tags file with ignored symbols to cxx preprocessor

The syntax is slightly different from the previous syntax and is
described here:

https://docs.ctags.io/en/latest/parser-cxx.html

Basic usage should be the same, uctags just doesn't support Geany's
wildcard ignores like G_GNUC_*. On the other hand the new parser is
much more resilient to macros so there shouldn't be so much need
for manual ignores.

The original code is still kept for parsers from c.c that still use the
old preprocessor.

* Update documentation regarding ignore.tags
2021-12-19 10:04:54 +10:00
Thomas Martitz
c603bbfad5 Update to Scintilla 5.1.5 and Lexilla 5.1.4
Scintilla:
- SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE behaviorial changes
- Autocompletion on Wayland (see #3009)

Lexilla:
- New parsers: gdscript (see #3012) and asciidoc (see #2986) but not imported yet
2021-12-07 07:37:16 +01:00
Jiří Techet
31d2375ae4 Update update-ctags.py to copy some files from the dsl directory
The main part of ctags now uses some functions from files defined in
the dsl directory. Copy these when updating ctags.
2021-11-25 11:02:52 +00:00
Thomas Martitz
dda15b4748 Bugfix update-scintilla.sh, now copies Lex*.cpp too. 2021-10-11 13:36:14 +02:00
Thomas Martitz
7d4815cd72 Install SciLexer.h that got lost during the lexilla transition
Also update some place where its old path was mentioned.
2021-10-11 13:10:52 +02:00
Enrico Tröger
36f7511173 Generate Python identifiers only for Python 3
Python 2 is EOL since almost two years now, so remove Python2 keywords
and simplify the script to generate them.
2021-10-10 16:42:15 +02:00
Enrico Tröger
b90059829a Fix target filename for updating Python identifiers in filetype definition 2021-10-10 16:38:15 +02:00
Thomas Martitz
7694aa5acb
Update to Scintilla5 (#2867)
* Update Scintilla to version 5.1.1

A few notes:
- C++17 is required
  Not exactly new since we already imported the latest julia lexer.
- upstream split out lexers into a lexilla library
  We do "comply" by building a separate static library. So in effect, all
  lexers are built-in like before. In the future it may be possible to add
  lexer plugins at runtime.
- Lexer IDs are deprecated in favor of names
  For now we use LexerNameFromID() to map IDs to names but we should
  transition to names soon.
  That being said, the upstream transition seems also not complete.
  There is no name-based version of SCI_GETLEXER, so we're stuck with IDs
  there.

Closes #2824

* Update scintilla_changes.patch

The "which lexers" part is now a separate function that should be less
of a pain when updating to scintilla version that adds lexers.

* Update update-scintilla.sh

You need to extract lexilla sources too now and pass it to the script.
Also the script calls dos2unix for the files, kill that CRLF!
2021-10-10 09:46:37 +10:00
Enrico Tröger
ad4f474783 Windows: Update indirect dependencies for bundle creation 2021-10-09 12:05:59 +02:00
Enrico Tröger
0f856a4a0e Windows: Compile and include GSettings schemas on bundle creation
Without these schemas, Geany crashes when the file open dialog is shown.
2021-10-09 12:05:59 +02:00
Enrico Tröger
8395267fc9 Windows: Ignore Pacman cache on bundle creation
Also use long command line arguments for curl to fix a typo in -L.
2021-10-09 12:05:59 +02:00
Enrico Tröger
999e918b6c Windows: Ignore package signatures on bundle creation 2021-10-09 12:05:59 +02:00
Enrico Tröger
b15aa208fa Windows: Replace GTK2 by (upcoming) GTK4 in bundle script 2021-10-09 12:05:59 +02:00
Enrico Tröger
d452994a75 Windows: Create GTK bundle for x86_64 and suppt non-native execution
Changes in the bundle creation script:
- the GTK (and other dependencies) bundle is now created for the x86_64
platform
- the new parameter "-x" allows to run script on a Linux system using
Wine, therefore it is necessary to run the post-install scripts after
all packages have been extracted.
- use "-Sdd" for Pacman to ignore dependencies as we resolve them
manually
- do not use "tar -x --xz" as Pacman nowadays also downloads .zst
packages, instead just download the file and let tar choose the format
automatically based on the filename
- install grep with Pacman as the build and target platform are now
identical
- update GTK dependencies to match current packages
2021-10-09 12:05:59 +02:00
Enrico Tröger
6d9e24e78d Use "encoding" keyword argument for lxml's tostring()
Newer versions of libxml2 (used by lxml) crash in tostring() when no
encoding argument is present. Passing "unicode" as encoding makes
tostring() returning already a Python unicode string, so we don't
need to decode it anymore.
2021-09-04 00:25:00 +02:00
Thomas Martitz
b524a58e12 Merge branch 'gh-codebrainz/remove-gtk2' into master
This merge removes GTK2 support entirely only GTK3 is left.

Closes #2602
2021-05-29 14:17:42 +02:00
Jiří Techet
3f0bb8ed4c Add a script performing update of Geany ctags from universal ctags
The script:
1. Copies all parsers from universal ctags not starting with geany_
2. Copies all files from universal ctags main
3. Prints files which were added/removed to/from main so the corresponding
changes can be done manually in Makefile.am
4. Patches main with the provided patch
2020-11-21 13:43:20 -08:00
Colomban Wendling
9c2b7da3f5 Remove some more GTK2 occurrences and adjust a few comments 2020-11-02 14:45:44 +01:00
Enrico Tröger
9f79f801f4 Windows: Update indirect dependencies for bundle creation 2020-10-24 11:33:24 +02:00
Matthew Brush
1238356206 Remove GTK2 from cross-build-mingw.sh script 2020-10-04 06:04:31 -07:00
Matthew Brush
8184f91a8f Make GTK3 build default, and GTK2 build optional
* Replace `--enable-gtk3` with `--enable-gtk2`
* Update Travis CI builds
* Change `cross-build-mingw.sh` default to GTK3 and cleanup a little

After this commit it will be required to pass `--enable-gtk2` to
the Autoconf script in order to build with GTK+2, otherwise GTK+3
will be required.
2020-10-04 05:22:06 -07:00
Enrico Tröger
ea649d8024 Windows: bundle the GLib GSpawn helper binaries with the installer
We do not need those anymore in Geany directly. But there are still some
plugins using this API instead of Geany's spawn API.
So to support those plugins, provide the GLib helper binaries.
2020-04-29 23:48:18 +02:00
Enrico Tröger
3820a4fb6e Update functions and variables for the NSIS filetype
And add a script to make this task easier in the future.
2019-07-06 15:23:23 +02:00
Enrico Tröger
1526af4068 Update all copyright notices to mention only the first publish year
And so remove the current year to ease maintenance and since it is not
strictly necessary.
Also remove individual copyright holders (where appropriate) and replace
the name with "The Geany contributors". The detailed authorship
information is still available in the GIT history.

Also remove copyright notice and author names from READMEs.
2019-04-07 11:43:58 +02:00
Enrico Tröger
70ebfbd529 Fix regex to resolve confusion on the removed double space
Also fix a typo in the variable name for the output.
2019-03-19 11:05:16 +01:00
Enrico Tröger
f40859332b Update link to GTK+2 bundle for test builds to self-hosted version
Make us more independent from ftp.gnome.org and
host the, probably never ever changing, bundle ourselves.
2018-12-16 14:54:55 +01:00
Enrico Tröger
ffc47cbcbd Windows: Add new Pango dependencies to bundle creation script 2018-12-16 10:35:18 +01:00
Thomas Martitz
3512f6cc74 gtkdoc: add support for array annotions
We can now use @array and @arraylen{param} annotations for arrays that
will make it to the generated gtkdoc header.

g-ir-scanner cannot properly parse 'gchar **' parameters without this.
2018-12-03 21:51:01 +01:00
Colomban Wendling
c415d1d19d Merge pull request #1931 from eht16/issue1930_fix_gtk3_bundle_download
Update link to GTK+3 bundle for test builds to self-hosted version
2018-09-21 11:16:26 +02:00
Colomban Wendling
0b75601ac8 Merge pull request #1914 from b4n/scintilla/update-3-10-0
Update Scintilla to version 3.10.0

Fixes #1421.
2018-09-19 22:22:24 +02:00
Enrico Tröger
a098fa847b Update link to GTK+3 bundle for test builds to self-hosted version
The host win32builder.gnome.org seems dead and so host the GTK+3 bundle
we use to test builds for Windows cross-compilation on our own.
2018-08-26 09:52:42 +02:00
Enrico Tröger
60621434c9 Windows: Update indirect dependencies for bundle creation
Pango now requires fribidi, so we need to install it.
Update the download URL for UnxUtils.
Remove unnecessary cmake files after installation.
2018-08-19 23:32:02 +02:00
Colomban Wendling
958deb55fe Add a few extra hints in the Scintilla update script 2018-08-01 14:41:00 +02:00
Colomban Wendling
18360460ab Update Scintilla to version 3.7.5 (#1503)
* Update Scintilla to version 3.7.5

This now requires a C++11-capable compiler.

Closes #1308.

* Test using newer dist on Travis

Since Scintilla needs C++11

* Add debugging code for when configure fails

* Workaround a pkg-config-corsswrapper bug on Ubuntu 14.04

See https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242
2017-07-25 09:24:05 +10:00
Colomban Wendling
46812c47fb Fix scripts/set-release-date when LC_TIME is set
We actually need to override LC_TIME if it is set, so use LC_ALL which
overrides everything rather than LANG that is used as a fallback.
2017-03-19 18:20:53 +01:00
Colomban Wendling
1aa82c3e6e Add a script to fixup copyright years translations 2017-03-18 20:02:45 +01:00
Colomban Wendling
1724bab3b8 scripts/github-news: Fix issues link
Closes #1360.
2017-01-11 14:32:37 +01:00
Enrico Tröger
16ea1d35a6 Fix file names of generated tags files for C, PHP and Python 2016-12-28 23:20:47 +01:00
Enrico Tröger
59f080d058 Update tags and filedefs path references in scripts
This is a follow-up of #485.
2016-12-28 22:59:46 +01:00
Colomban Wendling
26c0d6266e Add a script to set the release date 2016-11-13 19:04:37 +01:00
Colomban Wendling
a4990e9da5 Add a script to make the version bump 2016-11-13 19:04:18 +01:00