Commit Graph

92 Commits

Author SHA1 Message Date
Jehan 0b75fbd91c tools: do not sanitize build tools. It's OK if they leak a bit.
Especially as our code does not actually leak as far as we can see. It looks
like librsvg might not play well with -fsanitize=address (possibly having real
leaks or false positives).
2023-02-22 10:57:36 +01:00
Jehan 9ff1358e0b Issue #8552: Failed to build using gimp-2.99.12-autotools.tar.bz2 tarball. 2022-08-31 00:46:29 +02:00
Jehan 1866b4c5f8 configure, tools: colorsvg2png must be built as native build executable. 2022-04-01 18:11:55 +02:00
Jehan ae6c58652e icons, tools: fix the CI when building icon resources with vector icons.
Ok that was a bit of a mess with the 4 build cases (combinations of
meson, autotools, vector and raster icons). I *think* this is now OK.

Basically we still need to build the colorsvg2png tool even when
installing vector icons, just for the purpose of the 2 icons
dialog-question and gimp-wilber-eek which we compile into GLib resources
from PNG images.

Also it looks like I completely forgot to add the subdir meson.build in
icons/Color/.
2022-01-31 22:33:30 +01:00
Jehan bc999325be icons, tools: new colorsvg2png tool to build PNG out of SVG.
Build-time tool, which basically just rasterize SVG images (it doesn't
do anything special like gtk-encode-symbolic-svg which creates special
PNG for GTK to recolor them).

It looks like I had this prepared since 2018 according to file header,
but I just never finished doing it! :P

Basically now PNG icons of the Color icon themes do not need anymore to
be committed in the repository. They will be generated from the SVG
icons.

Also adding a missing icon from the 16px list (the Playground icon for
Preferences dialog was needed in 16x16 as well, yet missing).
2022-01-31 14:52:42 +01:00
Jehan cb1f01a42b tools: update the build-only tool compute-svg-viewbox.
It now uses rsvg_handle_get_geometry_for_layer() instead of
rsvg_handle_get_(position|dimensions)_sub() which have been deprecated
in favor of the new function which returns accurate (double) positioning
and size.

Back when I first made this build tool, librsvg had several blocking
bugs to make icon extraction work properly. This seems to improve
nicely.

Nevertheless I still don't build this tool because after testing, more
bugs remain and icon extraction is still not right. Just updating the
code to undeprecate it but leave the build commented out for now. ;-(

See librsvg#134, librsvg#128 and librsvg#250 for bug reports following
these issues.
2020-08-28 20:25:40 +02:00
Ell 76f9e5feaf tools: add performance-log-progressive-coalesce.py; use in performance-log-viewer
Add a new performance-log-progressive-coalesce.py tool, which
coalesces partial address maps in progressive performacne logs into
a single global address map, suitable for processing by the rest of
the tools.

Use the new tool as part of the pipeline in performance-log-viewer.
2020-07-30 01:04:40 +03:00
Ell e5fe1ef152 tools: add performance-log-close-tags.py, use in performance-log-viewer
Add a new performance-log-close-tags.py tool, which closes unclosed
tags in incomplete performance logs, allowing the rest of the
perofmance-log tools to process them.  This is necessary for
unfinished progressive logs.

Use the new tool as part of the pipeline in performance-log-viewer.
2020-07-30 01:03:38 +03:00
Ell f0a8a5b67b tools: add mnemonic-clashes to EXTRA_DIST 2019-09-12 18:16:37 +03:00
Salamandar fc657184a0 Undo some (unnecessary) changes. 2019-01-25 19:08:28 +00:00
Félix Piédallu fc8303dd0a (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)
2019-01-25 19:08:28 +00:00
Ell c61138f8f0 tools: add performance-log-coalesce.py to EXTRA_DIST 2018-11-09 02:23:13 -05:00
Ell 3601c9189b tools: add performance-log-viewer.py and driver
performance-log-viewer.py is a viewer for GIMP performance logs.
The viewer is made up of two parts: a sample-selection area at the
top, and an information area at the bottom.

The sample-selection area visualizes the sampled variables and
markers using a simultaneous set of plots, and displays the
currently selected samples.  Samples can be selected directly
through the sample-selection area, or by other means, such as
searching for all samples satisfying a certain condition, or
containing a certain function.

The information area shows global information stored in the log, as
well as information specific to the currently selected samples,
including variable listing and statistics, full backtrace, and
profile/call-graph information.

Note that performance-log-viewer.py takes its input from STDIN,
like the rest of the performance-log tools, and is therefore
suitable for use as part of a pipeline.  For standalone use, the
performance-log-viewer driver is also included, which takes the log
file as a command-line argument, and processes it through an
appropriate pipeline before feeding it to the viewer.
2018-09-16 12:03:57 -04:00
Ell 7e186f3e5d tools: add performance-log-deduce.py
... which statistically deduces the correct thread states based on
backtrace address frequency, fixing local inaccuracies.
2018-09-16 11:58:38 -04:00
Ell d7c74a615b tools: add performance-log-related tools
performance-log-expand.py decodes a delta-encoded performance log
by expanding the deltas, producing a log where each sample (and
other relevant elements) contain complete information.  Note that
the structure of expanded logs is identical to that of delta-
encoded logs, the expanded log simply has no deltas.

performance-log-resolve.py resolves symbol information in
backtraces.  The logs produced by GIMP only specify the program
counter at each stack frame, providing an address-map to map
program-counter addresses to actual symbols separately.  This tool
looks up each program-counter address in the address map,
incorporating the relevant symbol information directly into the
backtrace.

Both tools read their input from STDIN, and write their output to
STDOUT, and can be chained in a pipeline (with
gimp-performance-log-expand.py appearing first).

Note that these tools require Python 3.
2018-09-02 03:12:09 -04:00
Jehan 49fc5e3034 tools: invert-svg build tool no longer necessary.
This tool has been outdated for some time now as we don't generate an
"inverted icons" theme anymore. This is all done through CSS from a
single symbolic icon theme.
2018-08-20 17:52:22 +02:00
Jehan 1461496999 tools: fix linking error.
Though no error was raised during a native build, a cross-build was
choking on this missing link to libgimpbase and failing.
The error returned by the linker though was a bit amiss.

Fixes:
> gimp-test-clipboard.o: In function `test_clipboard_copy_callback':
> tools/gimp-test-clipboard.c:419: undefined reference to `g_file_get_contents'
> collect2: error: ld returned 1 exit status

(cherry picked from commit 0865e9db1f)
2018-08-12 22:46:44 +02:00
Michael Natterer bd9d85e60b tools: rename test-keyboard.c and install it as gimp-test-clipboard
Clibpard bugs are so common, it will be useful to have on users'
machines.
2018-06-04 22:35:18 +02:00
Tobias Ellinghaus c50449670b
Fix build with vector icons enabled
The invert-svg tool was never built so generating the Symbolic-Inverted
icons failed. Thanks Ell for the hint how to fix this.
2018-04-15 16:10:04 +02:00
Ell 6ebc3f1b09 Makefiles: don't use -xobjective-c when linking files on Mac
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files.  Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.

Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
2018-04-08 04:03:55 -04:00
Ell 06950be7f0 Makefiles: don't use -xobjective-c when compiling C++ files on Mac
On Mac, pass -xobjective-c to the compiler through AM_CFLAGS, not
AM_CPPFLAGS, so that it's only used for C sources, and not C++
sources.  In the latter case, it clashes with the -std=... flag,
spewing an error.  Thanks, Partha :)
2018-04-07 16:57:52 -04:00
Ell 5893d2dc73 tools, app-tools: move gimp-debug-tool from tools/ to app-tools/
Move gimp-debug-tools.c from tools/ to a new app-tools/ subdir,
which should contain external tools needed by app/, and which is
built *after* app/ (unlinke tools/).  This allows gimp-debug-tool
to depend on libapp and libappwidgets, instead of on actual source
files from app/.  Building sources from app/ in another subdir
screws with the distclean rules, and breaks distcheck.
2018-03-10 17:56:56 -05:00
Partha d0ede35379 Bug 793169 - Current Makefile.am not working on Mac. 2018-02-04 18:50:37 +01:00
Michael Natterer 614b81ffb4 app, tools: rename "gimpdebug" to "gimp-debug-tool"
and use GIMP_TOOL_VERSION instead of hardcoding "2.0" in both
tools/Makefile.am and app/errors.c
2018-02-04 14:09:22 +01:00
Michael Natterer 9ec11eece9 tools: formatting fixes in Makefile.am 2018-01-29 20:13:27 +01:00
Jehan 1b4efd2d5a app, tools: rename app/version.[ch] to app/gimp-version.[ch].
Since commit 9fdf35550b, I removed the GIMP_APP_GLUE_COMPILATION check
because we need to have the whole versioning info from the new debug
widget. It just makes sense to go further and just make this a proper
internal API to get version information.
2018-01-29 01:48:30 +01:00
Jehan b318694bb2 app, tools: install the debug tools in libexec when appropriate.
AFAIK this means on all platforms but Win32 and macOS which would rather
need relative path and therefore cannot make use of build-time
LIBEXECDIR. Anyway on these platforms, leaving the binary in BINDIR is
not likely to "pollute" too much as it would on Linux or BSD where
people often use terminal.
2018-01-28 15:43:07 +01:00
Jehan a3a4df9528 app, tools: various fixes for Win32 build.
* Type pid_t is not cross-platform. Just use int instead, and convert it
  to respective type on each platform.
* Get rid of several useless include which should have been removed a
  few commits ago, when I reimplemented the backtrace function.
* Better handle the various macros in gimp_eek() (between G_OS_WIN32,
  HAVE_EXCHNDL and GIMP_CONSOLE_COMPILATION, but also no_interface and
  generate_backtrace options, that was a bit messy).
* Make gimpdebug now always built, whatever the platform.
2018-01-28 15:43:07 +01:00
Jehan ae3cd00fbd app, tools: add support for ExcHndl/DrMinGW for Win32 debugging.
The feature already exists in our code and produces backtraces upon a
crash into a file. The only difference is that we are now getting the
file contents and showing it in our new debug dialog, so that it works
similarly on all platform (and therefore making the debug info visible
to people, otherwise they would never report, even though the data is
generated).
The difference with gdb/lldb is that it doesn't allow backtraces at
random points (for debugging non-fatal yet bad errors). Also the API has
just 2 functions and in particular an ExcHndlInit() but no way to unload
the feature. So we don't need the debugging page in Preferences because
the switch option would not work. On Windows, the feature will be
decided at build time only.

Last point: the code is untested on Windows so far. I assume it would
work, but there is at least one point I am unsure of: will ExcHndl have
already generated the backtrace file when gimpdebug runs? If not, I will
have to let gimp die first to be able to get the backtrace.
2018-01-28 15:43:07 +01:00
Jehan eab961c9bb app: test G_OS_WIN32 rather than G_OS_UNIX for new backtrace feature.
This is just a bit more consistent with existing code. Also build the
gimpdebug tool only when GIMP_CONSOLE_COMPILATION is not set and run
when --no-interface CLI option is not set since it is a GUI tool.
2018-01-28 15:43:07 +01:00
Jehan beede1718a app, tools: add backtrace GUI for crashes as well.
This was a bit harder since even though we handle fatal signals,
allowing us to do any last action before GIMP crashes, it seems more
memory allocation is not allowed at this time. So creating a dialog or
simply getting the return output of gdb into the main process is not
allowed. What I do instead is running a separate program (gimpdebug)
which will take care of creating the new dialog and running a debugger.
I still use GimpCriticalDialog code from this separate binary, while I
continue to use this widget also within GIMP for non-fatal errors. The
reason why we still want to use it within GIMP is that we can bundle
several non-fatal errors and backtrace this way (fatal errors don't
return anyway) and it's easier to do so when created from the main
process.
2018-01-28 15:43:07 +01:00
Michael Natterer b05cfc6050 pdb: (try 3) move PDB generation and sources to toplevel/pdb
It never belonged inside "tools". Also rename its "pdb" subdirectory
to "groups". This had to happen before 2.10 so cherry-picking between
branches doesn't become a nightmare in the future.
2017-12-17 14:16:08 -05:00
Jehan 9ba2a6724c Bug 783629 - invert-svg build failure
Fedora hardens its packages by default since Fedora 23 and the home-made
CC call to build invert-svg needs position-independent code. The flag
-fPIC is apparently harmless in basic cases since it still builds when
non-hardened and the doc implies that it would just be ignored if not
supported by the target machine. As far as I could search, adding it
should not break other people's builds.
So what the heck. That's just a temporary build tool, let's add this
flag and see if others complain!
2017-06-13 17:18:15 +02:00
Jehan 0de259682e configure: default CPPFLAGS_FOR_BUILD to CPPFLAGS on native builds.
Similarly to what I did for CFLAGS and LDFLAGS in commit 20fdb8d, the
preprocessor flags for build tools should also be correctly defaulted
and used when building invert-svg.
2017-06-09 00:55:52 +02:00
Jehan 20fdb8dfa3 Bug 783482 - Fail to link invert-svg in jhbuild prefix on FreeBSD...
... because LDFLAGS is ignored.
Firstly let's make sure that invert-svg build uses LDFLAGS_FOR_BUILD and
CFLAGS_FOR_BUILD; secondly, default these to LDFLAGS and CFLAGS
respectively when not-cross-compiling, unless values are explicitly set.
2017-06-07 11:16:37 +02:00
Jehan 5b135406fd Bug 781098 - only build invert-svg with --enable-vector-icons.
This is a regression introduced in commit 84439a8 (partially reverted
in commit 9a2da53 but some pieces were missing!).
2017-04-10 01:41:27 +02:00
Jehan b8a04c5a08 tools: add invert-svg in the DISTCLEANFILES.
Since the build executable is not compiled the usual *_PROGRAMS way,
automake does not know to delete it. Add it specifically.
2017-03-29 19:59:10 +02:00
Jehan c8068d9e7e tools: add invert-svg.c in the distribution.
Otherwise the file won't be included in the tarball (another consequence
is that `make distcheck` will fail) since this binary is not made the
common automake way on purpose.
2017-03-24 03:17:35 +01:00
Jehan 9a2da53802 tools: invert-svg is to be built natively for the build OS.
Partially reverts commit 84439a8748.
The fact that tools/invert-svg was kind of manually compiled was on
purpose. Using the automake syntax with any of the *_PROGRAMS compiles
for the host OS, but this tool is only for compile-time.
This fixes cross-compilation.

As for compute_svg_viewbox, let's not build it for now because its
purpose was to help proper extraction of SVG icons from a single SVG
file. Unfortunately librsvg was not providing acceptable results anyway
so right now all SVG icons are manually exported. We keep the code for
future use when the library will improve.
2017-03-24 02:45:43 +01:00
Jehan 0652cd016b tools: invert-svg needs glib and GIO dependencies. 2016-08-15 15:06:35 +02:00
Massimo Valentini 52b6eaa11a tools: 2 typos
one prevented a successfull make distcheck
on my platform
2016-08-13 11:30:13 +02:00
Michael Natterer 84439a8748 tools: build the SVG tools unconditionally, and clean up the Makefile a bit 2016-07-21 12:20:59 +02:00
Jehan 8159aa04a9 tools: compute-svg-viewbox is not to be built for the time being.
librsvg has too many bugs and is not reliable for vectorial icon
extraction. I keep the code around for when it changes, but right now,
it is dead code.
2016-06-12 14:10:15 +02:00
Jehan 18b0468cc9 tools: invert-svg is a build-only tool.
It must be built with a native compiler and native libs only.
2016-06-12 04:25:53 +02:00
Jehan b0af146ea3 tools: scripts to extract a single SVG icon from a source file.
SVG sources contains many icons and each icon is extracted by its id.
2016-02-15 01:53:19 +01:00
Jehan 1427b2c795 tools: "invert-svg", new tool to invert grey colors in vectorial icons. 2016-02-15 01:53:01 +01:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 37d4f656d4 Bug 678925 - Debugging plugins with windows
Apply patch from Hartmut Kuhse that enables plug-in debugging on
Windows by stopping the process using Windows API, and providing a
small executable "gimp-plugin-resume.exe" to resume the stopped
plug-in.
2013-02-23 16:25:58 +01:00
Jehan 0f75ea4127 Bug 694201 - gimptool: update to follow new user directory scheme. 2013-02-20 04:01:02 +09:00
Michael Natterer 2356aad3da Remove gimp-remote for good, it has been disabled since 2008 2011-07-30 18:59:39 +02:00