Commit Graph

51 Commits

Author SHA1 Message Date
Frediano Ziglio
d61abf6106 Enable some security options on output executables
Enable NX (prevent data to be executable) and ASLR (address
randomisation).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2020-10-25 19:18:36 +00:00
Jakub Janků
630da73bf8 clipboard: enable copying files from client using webdav
When the user wants to copy files, new spice-gtk can share those
files using the existing phodav server. In that case, it advertises
the VD_AGENT_CLIPBOARD_FILE_LIST type in the clipboard grab message.

Upon request of the clipboard data in the mentioned type, spice-gtk
provides a list of absolute paths in the phodav server - these are
the files that are supposed to be copied/moved.

The role of the vdagent is to adjust this data given the drive
letter of the mapped webdav share.

Files can be both copied and moved, although move was tested
only with Windows' File Explorer.

Copying files from the vdagnet side to the client is not
supported yet.

Signed-off-by: Jakub Janků <jjanku@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-07-31 12:48:28 +01:00
Frediano Ziglio
3cad1e7570 Compile in agent utilities from spice-common
Allows these utilities to be used in the code.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-24 10:33:34 +01:00
Frediano Ziglio
5ed23e95ec spice-protocol: Update to get new message definitions
The EXTRA_DIST part in Makefile.am is needed as spice-protocol
removed support for Autoconf.
We don't need anymore "ignore=untracked" in the submodule as
we are not going to add or modify files anymore.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-01 12:30:38 +01:00
Frediano Ziglio
f00eb1f7b3 build: Add missing file to distribution
test-shell script is needed for "make check".

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2020-03-19 16:48:29 +00:00
Uri Lublin
3dfcc04435 MSI: Make SourceDir the path to executables
Make it possible to not put the executables under bin/

Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-19 16:41:21 +00:00
Frediano Ziglio
e03d347850 build: Remove unneeded library from linking
GetFileVersion* functions are not used.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-12-16 10:22:13 +00:00
Frediano Ziglio
725141836a Remove Visual Studio project files
These project files were not correctly tested and updated for a
while.
Now that CMake is present it can be used to generate proper
updated Visual Studio projects instead.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-12-11 10:03:42 +00:00
Frediano Ziglio
981b5f0dd1 build: Do not generate CMake config.h in source directory
Allows to build out-of-tree and have a clean working directory.
Autoconf used to work with out-of-tree and "config.h" in the
build directory as a "common" directory in the build directory
was created, so including "../config.h" in version.rc and having
"-I $(top_builddir)/common" used to work.
CMake does not create "common" under the build directory so the
"../config.h" inclusion fails.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-12-06 09:42:52 +00:00
Frediano Ziglio
3995a87476 build: Base CMake support
Although for other projects we started moving to Meson instead of
Autoconf add support for CMake for Windows agent.
Windows has more support for CMake than for Meson, there are
many tools (like Visual Studio, NuGet and vcpkg) and libraries
(like libz and libpng that we use here) that support CMake instead
of Meson.
This will also make easier to add automatic builds using Microsoft
tools.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-12-06 09:42:52 +00:00
Frediano Ziglio
1dd3f3586a Add a test for filter_url function
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-18 10:30:14 +00:00
Frediano Ziglio
9207d821d2 file_xfer: Open Download directory after a file transfer is finished
Have the same behaviour of Linux machines.
The directory is not opened again and again, only is not already
opened.
This is done checking the directory opened in explorer.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-18 10:30:14 +00:00
Frediano Ziglio
8064ae397a file_xfer: Save files in Downloads directory
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-07 16:13:52 +00:00
Frediano Ziglio
7a7c3b22e2 display_configuration: Define WINVER to avoid some declaration
Some declarations are available in MingW only defining a more recent
version of WINVER. Set WINVER to 0x0601 (Windows 7) to enable these
definitions.
This allows to clean some files.
The definition were already available in Fedora 22.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2019-11-06 09:24:30 +00:00
Yuri Benditovich
d8894046f8 win32/vd_agent: Customize MSI product name and install location
Customize these properties of WIX script during build under
WIXL or Windows.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-10-18 14:56:00 +01:00
Frediano Ziglio
d4a4fb28ea msi: Do not generate deps.txt
There's no reason to tell the package installed on the build system
used.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-05-28 14:45:08 +01:00
Frediano Ziglio
25ef04cc9a Revert "Enable some security options on output executables"
This reverts commit 5d5a268d94.

Committed by mistake
2018-05-25 14:06:00 +01:00
Frediano Ziglio
5d5a268d94 Enable some security options on output executables
Enable NX (prevent data to be executable) and ASLR (address
randomisation).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2018-05-25 14:05:23 +01:00
Frediano Ziglio
42ac031b24 Ignore auxiliary build files
This allows git.mk to include some missing files to ignore.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-27 11:03:56 +01:00
Frediano Ziglio
d827d0ab51 Add a test for logging functions
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-26 16:16:16 +01:00
Frediano Ziglio
12a4f367d8 Avoid using LTO by default during compilation
LTO option allows to have smaller executable stripping
unneeded part of code.
These options were added by a095f4806e ("build-sys: statically
build agent").
The gain of using these options currently are quite small,
from a small test:

$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 506880 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 198656 Jul 26 11:26 vdservice.exe

$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 509952 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 200192 Jul 26 11:26 vdservice.exe

Considering that there are some bug in some recent MinGW distributions
like https://bugzilla.redhat.com/show_bug.cgi?id=1475237 and
the small gain I would disable these options.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-26 12:01:57 +01:00
Frediano Ziglio
fd4ea9fa36 Add test for PNG files
Test various image and formats.
The idea is to decode and encode again an image and
check for differences. ImageMagick is used to create
some test image and compare results.
Wine is used to execute a test helper.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-26 10:51:15 +01:00
Frediano Ziglio
3dedcaa44e Write code to decode PNG format
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-26 10:51:06 +01:00
Frediano Ziglio
95f603bdb0 Initial rewrite of image conversion code
Remove CxImage linking.
Support Windows BMP format.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-26 08:52:15 +01:00
Frediano Ziglio
0fd4882477 Move image handling to a separate file
This will make easier to change code that handle images.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-07-26 08:52:15 +01:00
Frediano Ziglio
a814ff95c1 build: Automatically update version/copyright in version.rc
The versions/copyright in version.rc are very outdated.
Updating them automatically at configure time should ensure they are
updated more often.
Looks a bit weird to distribute config.h file however in this
case it contain only version information and the file is
useful to compile under Windows.

This patch is inspired by a work of Christophe Fergeau

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-17 13:17:20 +00:00
Frediano Ziglio
4fbd7b485e Move common resource code to a common file
Allows to reuse code. Differences between the two
version information are managed using additional defines
in the top rc files.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-17 13:17:18 +00:00
Sameeh Jubran
588a7134df Introducing Windows CCD API
The Connecting and Configuring Displays (CCD) Win32 APIs
provide more control over the desktop display setup. The CCD APIs
move away from using Windows Graphics Device Interface (GDI)
concepts like view name and toward Windows Display Driver Model
(WDDM) concepts like adapter, source, and target identifiers.
More info on the CCD API can be found here:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff539590(v=vs.85).aspx

This patch introduces partial functionality from the CCD API
needed by vdagent. It is needed by vdagent in order to support
multiple monitors and arbitrary resolution on Windows 10.

Based on a patch by Sandy Stutsman <sstutsma@redhat.com>

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-08-16 11:19:00 +01:00
Christophe Fergeau
773b6b2bde build-sys: Ship mingw-spice-vdagent.spec in tarballs
Having this file pregenerated is useful if one wants to use it to
generate a package from tarball with:
tar xf vdagent-win-$version.tar.xz mingw-virt-viewer.spec
rpmbuild mingw-virt-viewer.spec

This is more convenient than extracting the whole tarball, and configuring
it in order to generate mingw-virt-viewer.spec
2015-04-20 13:50:01 +02:00
Marc-André Lureau
8588daa1e0 Learn to build spice-vdagent MSI installer 2014-06-19 15:27:31 +02:00
Uri Lublin
efea0d654b Makefile.am: add INCLUDES to AM_CPPFLAGS
Fixes the following autoreconf (automake) warning:
Makefile.am:6: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2013-11-13 10:40:17 +02:00
Uri Lublin
0a90473848 Makefile.am: tabify 2013-11-13 10:40:09 +02:00
Uri Lublin
750a8bab40 vdagent: add as_user to run tasks with user privileges
The class calls Impersonate upon begin(), and Revert
upon end() or destruction.

The user is the current user that is logged in.

 create mode 100644 vdagent/as_user.cpp
 create mode 100644 vdagent/as_user.h
2013-11-13 10:24:59 +02:00
Arnon Gilboa
c751e8fda0 vdagent: add support for client -> guest file transfers
rhbz#956146
2013-06-27 14:23:49 +03:00
Marc-André Lureau
4ca71770f2 build-sys: fix mingw build 2013-04-24 14:21:50 +02:00
Arnon Gilboa
9a0b939de1 build-sys: remove *vdi_port* from Makefile.am 2012-12-09 11:40:34 +02:00
Christophe Fergeau
50d9542671 Fix mingw compilation
This got broken with the recent code moves from vdservice to vdagent.
2012-11-15 12:28:11 +01:00
Christophe Fergeau
23c87a26b1 build-sys: Use git-version-gen
This gives much better version numbers when using git snapshots.
2012-10-31 10:11:47 +01:00
Christophe Fergeau
301f697de0 build-sys: Add missing file to EXTRA_DIST
vdservice/resource.h was missing from generated tarballs, which
later broke the build.
2012-10-01 19:20:33 +02:00
Christophe Fergeau
5cde9acb53 build-sys: Include spice-protocol in tarballs 2012-10-01 19:20:28 +02:00
Marc-André Lureau
0bb7ed9363 Add configure --enable-debug 2012-06-21 11:31:45 +02:00
Marc-André Lureau
a095f4806e build-sys: statically build agent
Fix build by default when using mingw (when more compiler are
supported we could do case by case)

Since we are statically building, strip resulting binary (we
also use lto, whole-program but that doesn't seem to change
much..)
2012-06-08 13:13:23 +02:00
Marc-André Lureau
7d75ac51cc build-sys: move back vdservice to console
So we can use it from command line properly..
Sigh.. I wish they wouldn't make this useless distinction..
2012-05-24 19:04:13 +02:00
Marc-André Lureau
f2c2a136e2 Use spice-protocol submodule 2012-05-24 13:55:31 +02:00
Marc-André Lureau
1aa23d698a mingw: compile a non-console binary
Otherwise, a console dialog pops up
2012-05-24 13:55:31 +02:00
Marc-André Lureau
0c1658b1c2 mingw: link with RC file to provide needed version information 2012-05-24 13:55:31 +02:00
Marc-André Lureau
55cf72c2a8 Revert "Revert "mingw: make sure unicode support is enabled""
This reverts commit dec8f9d049.
2012-05-24 13:55:31 +02:00
Christophe Fergeau
dec8f9d049 Revert "mingw: make sure unicode support is enabled"
This patch wasn't sent for review, and wasn't meant to be pushed
as part of the mingw series

This reverts commit 04e53efb31.
2012-03-01 16:57:36 +01:00
Christophe Fergeau
04e53efb31 mingw: make sure unicode support is enabled
UNICODE and _UNICODE must be defined before including any mingw
header for proper unicode support.
2012-03-01 12:59:05 +01:00
Christophe Fergeau
8da556a6c1 mingw: add Visual C++ files to EXTRA_DIST 2012-03-01 12:59:05 +01:00