Commit Graph

18 Commits

Author SHA1 Message Date
Eduardo Lima (Etrunko)
7a87356bd2 Add support for building with meson/ninja
In a comparison with current autotools build system, meson/ninja
provides a huge improvement in build speed, while keeping the same
functionalities currently available and being considered more user
friendly.

The new system coexists within the same repository with the current one,
so we can do more extensive testing of its functionality before deciding
if the old system can be removed, or for some reason, has to stay for
good.

- Meson: https://mesonbuild.com

  This is the equivalent of autogen/configure step in autotools. It
  generates the files that will be used by ninja to actually build the
  source code.

  The project has received lots of traction recently, with many GNOME
  projects willing to move to this new build system. The following wiki
  page has more details of the status of the many projects being ported:

    https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

  Meson has a python-like syntax, easy to read, and the documentation
  on the project is very complete, with a dedicated page on how to port
  from autotools, explaining how most common use cases can be
  implemented using meson.

    http://mesonbuild.com/Porting-from-autotools.html

  Other important sources of information:

    http://mesonbuild.com/howtox.html
    http://mesonbuild.com/Syntax.html
    http://mesonbuild.com/Reference-manual.html

- Ninja: https://ninja-build.org

  Ninja is the equivalent of make in an autotools setup, which actually
  builds the source code. It has being used by large and complex
  projects such as Google Chrome, Android and LLVM. There is not much to
  say about ninja (other than it is much faster than make) because we
  won't interact directly with it as much, as meson does the middle man
  job here. The reasoning for creating ninja in the first place is
  explained on the following post:

    http://neugierig.org/software/chromium/notes/2011/02/ninja.html

  Also its manual provides more in-depth information about the design
  principles:

    https://ninja-build.org/manual.html

- Basic workflow:

  Meson package is available for most if not all distros, so, taking
  Fedora as an example, we only need to run:

    # dnf -y install meson ninja-build.

  With Meson, building in-tree is not possible at all, so we need to
  pass a directory as argument to meson where we want the build to be
  done. This has the advantage of creating builds with different options
  under the same parent directory, e.g.:

    $ meson ./build --prefix=/usr
    $ meson ./build-extra -Dextra-checks=true -Dalignment-checks=true

  After configuration is done, we call ninja to actually do the build.

    $ ninja -C ./build
    $ ninja -C ./build install

  Ninja defaults to parallel builds, and this can be changed with the -j
  flag.

    $ ninja -j 10 -C ./build

- Hacking:

  * meson.build: Mandatory for the project root and usually found under
                 each directory you want something to be built.

  * meson_options.txt: Options that can interfere with the result of the
                       build.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-08-30 11:13:00 -03:00
Victor Toso
741ef98fe9 Remove simicolon from G_DEFINE_TYPE_ macros
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-08-02 15:53:01 +02:00
Christophe de Dinechin
0381e62141 spicy: Add call of gst_deinit at program exit
This is useful for some instrumentation, e.g. the leaks tracer,
that perform some of their operations within gst_deinit.

Without this patch, if you run spicy with
	GST_DEBUG="GST_TRACER:7" GST_TRACERS="leaks" spicy ...
the leak tracer does not show any output, because it runs in gst_deinit.

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-10-20 16:17:20 +01:00
Matthew Francis
284c1f2d7e MainChannel: Fix introspection method bindings
Signed-off-by: Matthew Francis <mjay.francis@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1505831641-28134-6-git-send-email-mjay.francis@gmail.com>
2017-09-25 12:36:02 +02:00
Matthew Francis
d593569f21 DisplayChannel: Fix introspection method bindings
Signed-off-by: Matthew Francis <mjay.francis@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1505831641-28134-3-git-send-email-mjay.francis@gmail.com>
2017-09-25 12:35:48 +02:00
Matthew Francis
00c4ab5eb6 PortChannel: Fix introspection method bindings
Signed-off-by: Matthew Francis <mjay.francis@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1505831641-28134-2-git-send-email-mjay.francis@gmail.com>
2017-09-25 12:35:40 +02:00
Marc-André Lureau
fdba1a9bc5 Use g_free() appropriately
g_free() should be used in pair with g_malloc/new().

There is only free() calls remaining for usbredir rules now.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-08-10 15:32:13 +02:00
Victor Toso
a3dd27e0ef spicy: add gstreamer options to command line
So we can see all available options with spicy --help-gst and set them
as command line argument.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-05-23 15:36:53 +02:00
Victor Toso
a12a815127 Revert "spicy: improve status label with stream information"
This reverts commit 9a7ae78aa9.

As we are going to revert 00f56647a9 "channel-display: new
stream-video-codec-type property"

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Marc-André Lureau <mlureau@redhat.com>
2017-03-13 13:33:27 +01:00
Victor Toso
9a7ae78aa9 spicy: improve status label with stream information
By using stream-video-codec-type property, we can display which
video-codec is being used.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-03-13 11:33:34 +01:00
Victor Toso
d4fb0faf1b spicy: keep status of mouse/agent on server mode
So we can still check the agent status even in server mode.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-03-13 11:33:29 +01:00
Victor Toso
ecb4de2705 spicy: use gboolean for GtkSettings properties
As gboolean is 4 bytes long while bool is 1 byte, valgrind will complain
about it.

Invalid write of size 4
   at 0xAE9F4FB: value_lcopy_boolean (gvaluetypes.c:78)
   by 0xAE7CFD3: g_object_get_valist (gobject.c:2236)
   by 0xAE7D40B: g_object_get (gobject.c:2324)
   by 0x40758F: keyboard_grab_cb (spicy.c:566)
   by 0xAE753E4: g_closure_invoke (gclosure.c:804)
   by 0xAE87431: signal_emit_unlocked_R (gsignal.c:3635)
   by 0xAE9005E: g_signal_emit_valist (gsignal.c:3391)
   by 0xAE9043E: g_signal_emit (gsignal.c:3447)
   by 0x4E4A6FB: try_keyboard_grab (spice-widget.c:889)
   by 0x4E4CAB1: focus_in_event (spice-widget.c:1834)
   by 0x9325E70: _gtk_marshal_BOOLEAN__BOXEDv (gtkmarshalers.c:131)
   by 0xAE75561: _g_closure_invoke_va (gclosure.c:867)

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-03-06 17:12:15 +01:00
Pavel Grunt
9c133dcde4 spicy: Add dialog for precise resizing
It helps when testing whether the guest resizes to requested resolution

Acked-by: Victor Toso <victortoso@redhat.com>
2017-03-06 09:49:30 +01:00
Francois Gouget
fa73ff2783 spicy: Spicy uses GTK+ and must link with it
This avoids having the linker complain that gtk_toggle_action_get_type()
or some other GTK+ API is undefined.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-02-27 09:33:41 +01:00
Francois Gouget
0c6a871b08 spicy-stats: spicy-stats uses libgobject so link with it
This avoids having the linker complain that g_signal_connect_data() or
some other GObject API is undefined.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-02-27 09:33:41 +01:00
Jonathon Jongsma
4d3e78993c Spicy: cancel file transfer when dialog is closed
Clicking the 'X' to close the file transfer dialog did not actually
cancel the ongoing file transfer, and resulted in a bunch of critical
warnings on the terminal. Make the delete-event explicitly cancel all
ongoing file transfers.
2017-02-08 09:25:51 -06:00
Victor Toso
44f195206f spicy: implement preferred video codec type
Similar to preferred video compression, a radio button showing mjpeg,
vp8, vp9 and h264 in case server has the proper [0] capability

[0] SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-02-08 11:46:20 +01:00
Victor Toso
47e37e7c9d Move spicy tools to its own folder
So we can have the tools and the libraries in different folders.

In the src/Makefile.am I've only removed the lines related to the
tools but not all lines were copied into tools/Makefile.am as we
don't really need them. Other lines were adjusted to have the paths
correctly;

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-01-23 09:30:47 +01:00