Commit Graph

29 Commits

Author SHA1 Message Date
tinytrebuchet
300670dad4 Update dependencies for CPDB print backend
Require cpdb-frontend 2.x for building CPDB print backend.
2023-02-14 23:39:13 +05:30
Matthias Clasen
dd22e2aea9 printing: Drop the lpr backend
We want to consolidate and get to fewer print
backends (ideally only one), and the future is cpdb.
2023-02-12 10:10:06 -05:00
tinytrebuchet
41b60bbd6c New CPDB print backend for GTK Print Dialog
The Common Print Dialog Backends (CPDB) concept has GUI-toolkit-independent
backends for each print technology (CUPS, Print to File, cloud printing
services, ...) and each print dialog (GTK, Qt, Chromium, ...) is supposed
to use this backend, so that changes in print technologies can be centrally
and quickly covered by changing the backends and everything new gets available
in all print dialogs.

This commit provides a GTK print dialog backend to add support for the CPDB
concept. It communicates with all installed CPDB backends and so gives support
for all these print technologies to the GTK print dialog.

To make use of CPDB the GTK print dialog is supposed to be installed with this
backend and the 'Print To File' backend, and not any others to prevent printer
duplication.
2023-02-11 01:13:48 +05:30
Matthias Clasen
0a6f3944a0 Revert "modules: Fix build on Visual Studio"
This reverts commit acd9c12667.

This commit breaks the build with GLib main on all platforms,
and defining _GLIB_EXTERN arguably invades the GLib namespace.

A different fix for msvc will have to be found.
2022-10-31 20:20:32 -04:00
Patrick Griffis
af15f5d004 Remove Google Cloud Print backend
This service was shut down at the start of 2021.

This helpfully removes any dependency on json-glib, librest (and libsoup).
2021-07-05 10:54:16 -05:00
Xavier Claessens
629e70f89d Meson: Use gnome.post_install()
See https://github.com/mesonbuild/meson/pull/8272 and
https://github.com/mesonbuild/meson/issues/8268.
2021-03-08 21:19:09 -05:00
David Lechner
b509809f34 meson: use correct module file extension on macOS
GModule requires the .so file extension on macOS for historic reasons.
However Meson defaults to .dylib for modules, so we need to override
it to get the correct extension.

Fixes #3645.
2021-02-05 16:54:28 -06:00
Matthias Clasen
93d795e7c0 printing: Remove cairo header checks
cc.has_header doesn't work with subprojects, and all this
check does is to make the build fail, so we can just...
let the build fail instead.
2021-01-03 21:34:04 -05:00
Matthias Clasen
20289ad8e1 Fix the value for the print-backends setting
This was broken in the meson conversion, causing
us to default to "" instead of the built print
backends.

Fixes: #3486
2020-12-21 14:10:03 -05:00
Emmanuele Bassi
99e0929d6c build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00
Xavier Claessens
1b7a99cb24 Apply 1 suggestion(s) to 1 file(s) 2020-10-22 00:36:23 +00:00
Xavier Claessens
a4aa6d79ad meson: Use feature options for media and print backends
This gracefully disable ffmpeg, gstreamer, cups and cloudprint optional
dependencies when they are not available, while still giving full
control to distributors using -Dauto_features=enabled.
2020-10-17 09:54:47 -04:00
Matthias Clasen
c4d350c260 build: Start using meson feature options
Use feature options for things that are optional features,
update the docs.

Visible changes here is that the 'print-backends' option
got renamed to 'print' to go better with 'media', and the
'tracker3' option got renamed to 'tracker'.

For options that have been changed into features, the
syntax now is -Dfeature=enabled or -Dfeature=disabled
or -Dfeature=auto.
2020-08-23 16:45:15 -04:00
Chun-wei Fan
acd9c12667 modules: Fix build on Visual Studio
Visual Studio does not allow decorating functions with '__declspec (dllexport)'
if a prototype exists and is not decorated with '__declspec (dllexport)' as
well, so we cannot just decorate g_io_module_[load|unload|query] in the various
module sources with G_MODULE_EXPORT because the prototypes of these functions
have been marked with _GLIB_EXTERN, which equates to 'extern' unless overridden

Fix this by overriding _GLIB_EXTERN with the appropriate visibility flag, as we
have used to define _GDK_EXTERN.  Unfortunately, we can't just use _GDK_EXTERN
G_MODULE_EXPORT as they may have not been defined yet for our use

Do this across the board for all modules, even if they are not buildable on
Visual Studio nor Windows, for consistency's sake.
2020-06-05 11:16:45 +08:00
Timm Bäder
3bf4c5687c Pass common_cflags to print backends 2020-05-19 08:32:33 +02:00
Christoph Reiter
72814c54a8 meson: cups: use cups-config for looking up cups
We were looking for the cups headers and the cups lib in the default locations
which for example breaks with OpenBSD where the cups headers are under /usr/local/include/

Instead just use the "cups" dependency type from meson which internally uses cups-config.

See #1967

Ported to master from !963
2019-07-01 21:52:06 +02:00
Christoph Reiter
4d4e02c9d0 build/cups: remove checks for httpGetAuthString and http_t.authstring
httpGetAuthString() was added with cups 1.3 and we depend on a newer version
now. The direct field access was a fallback in case httpGetAuthString()
was missing, so this can also be dropped.

Ported to master from !938
2019-07-01 21:34:44 +02:00
Emmanuele Bassi
3377133d19 Require CUPS >= 2.0
Drop support for versions of CUPS < 2.0, to simplify the backend code
and drop a lot of conditional blocks.
2019-05-07 18:30:47 +02:00
Emmanuele Bassi
feddf5a694 Detect CUPS ≥ 1.7
We support CUPS ≥ 1.2, but we use API that was introduced and deprecated
at a later point.
2019-05-07 18:30:47 +02:00
Emmanuele Bassi
1b6734346c modules: Drop the plus
Use 'GTK' consistently.
2019-02-05 10:30:33 +01:00
Benjamin Otte
87fa7ff314 build: Fix printbackends
There's no "auto" option anymore, so remove checks for that option.
2018-03-18 19:08:28 +01:00
Emmanuele Bassi
a0d2d1f44b Use the same arguments for print backends
All the print backend shared modules should use the same C preprocessor
symbols.
2018-03-13 16:00:55 +00:00
Matthias Clasen
a78e9f2261 Consolidate print backends into one directory
This will let us use GTK_PATH to load them uninstalled, which
is useful for in-tree tests.
2018-03-11 12:38:35 -04:00
Emmanuele Bassi
809603c16c build: Fix checks on enabled print backends
The enabled print backends are a boolean, not a 'yes/no' string.
2018-02-19 02:06:11 +00:00
Matthias Clasen
e61e6a864b Drop unmaintained print backends
The papi and test printbackends have not seen any
maintenance in a long time.
2018-02-15 22:49:31 -05:00
Emmanuele Bassi
1440db1570 build: Coalesce print backends options into one
Instead of having separate options for each print backend, we can use
the same approach as the input method modules: a single option, with a
comma-separated list of print backends.
2018-02-14 14:14:22 +00:00
Tim-Philipp Müller
88900814cd meson: simplify cups version check in printbackends
Using cc.compute_int() instead of cc.get_define() for now
as there seems to be some issue with get_define() (#1726).
2017-05-03 18:40:56 +01:00
Tim-Philipp Müller
d38db4dcdd meson: gtk: set GTK_PRINT_BACKENDS define properly 2017-05-03 15:10:55 +01:00
Tim-Philipp Müller
a35e5f3135 meson: modules: add printbackends
The cups checks might not work properly everywhere yet,
since they don't use cups-config and parse the output yet.
2017-05-03 15:10:55 +01:00