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).
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/.
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).
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.
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.
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.
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.
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.
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.
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)
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.
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 :)
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.
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.
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.
* 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.
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.
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.
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.
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.
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!
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.
... 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.
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.
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.
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.
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.