Commit Graph

142 Commits

Author SHA1 Message Date
Aric Stewart
b87ef5170d update visual studio project file
Note, there may be line-ending issues here is we are not careful.  This file is a msdos formatted file.

There was some inconsistencies in those line-ending that I have normalized.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
2012-04-18 16:01:27 +03:00
Alon Levy
42758228fc client/windows/redc.vcproj: switch to unix EOL (dos2unix) 2012-04-18 16:00:17 +03:00
Aric Stewart
962f239159 Update win32 generate(1).bat files to match modern usage
This involves:
 generating .c instead of .cpp files
 Not including "common.h"
 Standardizing some parameters

Signed-off-by: Aric Stewart <aric@codeweavers.com>
2012-04-18 14:06:04 +03:00
Aric Stewart
4aca52309c we do not need afxres.h included in redc.rc
It is not an MFC project so simply including windef.h is better and
allows for compiling with the Express editions of Visual Studio.
2012-04-18 14:05:50 +03:00
Aric Stewart
197620e43a Copy getopt.h from old common/win/my_getopt-1.5/my_getopt
This patch completes the copy from
4d8f39020a which missed this file.
2012-04-17 10:27:17 +03:00
Aric Stewart
3cd2f843b5 update windows client generate.bat and generate1.bat
the python script is now in spice-common and client_marshallers.h needs
to be included instead of marshallers.h
2012-04-17 10:24:19 +03:00
Marc-André Lureau
4d8f39020a Copy common/win/my_getopt-1.5/my_getopt client/windows 2012-03-25 19:00:00 +02:00
Christophe Fergeau
32cd24be0a mingw: fix signed/unsigned comparison warnings 2012-03-04 10:50:38 +02:00
Arnon Gilboa
f605e2774d client/windows: fix SetClipboardViewer error handling rhbz#786554
MSDN says the following about SetClipboardViewer(): "If an error occurs or there
are no other windows in the clipboard viewer chain, the return value is NULL".
Seems like the buggy case was "no other windows in the clipboard viewer chain",
which explains the 3rd party clipboard manager workaround detailed in the bug
description.

It also seems like SetClipboardViewer() does not clear the error state on
succcess. Calling SetLastError(0) before SetClipboardViewer() seems to solves
this issue.

Since we could not reproduce the bug on our env, the customer has verified on
several of their systems that a private build resolved the issue.
2012-03-01 14:16:49 +02:00
Daniel P. Berrange
68c2897e5b Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
Daniel P. Berrange
02d56750bd Remove trailing blank lines
Remove any blank lines at the end of all source files
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
64f4826b6d Death to all TABs
Source files should all use spaces instead of tabs for
indentation. Update the few files not already in
compliance
2012-01-13 18:11:58 +02:00
Alon Levy
a9bf749779 client/windows: fix several assigned but not used errors 2012-01-13 17:42:23 +02:00
Alon Levy
96c292a0b4 client/windows: arraysize(inf.bmiColors) == 1 in mingw32 2012-01-13 17:42:23 +02:00
Alon Levy
fe61197643 client/windows: fix typo, make error messages unique 2012-01-13 17:42:23 +02:00
Alon Levy
54a7b36a57 client/windows/main: mingw32 provides PACKAGE_VERSION 2012-01-13 17:42:23 +02:00
Uri Lublin
24d5852611 client: menu: make RedWindow::set_menu() return an error-code (#758260)
RedWindow::set_menu() can fail (on Windows when in fullscreen mode).
For Windows spice-client, when in fullscreen mode, the system-menu
is NULL.

Returns 0 upon success, non-0 (currently only -1) upon failure.
2011-12-20 18:43:53 +02:00
Marc-André Lureau
5b042031b0 spelling: s/cupture/capture 2011-12-14 00:27:17 +01:00
Gal Hammer
9ffa2e9990 client: handle the redundant right ctrl windows' message send when a alt-gr is pressed bz#709074
Hello,

The second patch check to see if Windows is sending a fake VK_CONTROL
message when the user pressed Alt-Gr when using a non-US keyboard layout
(German, Czech, etc...).

If the function is_fake_ctrl return true and key event is translated to
a REDKEY_INVALID and the event is discarded.

     Gal.
2011-11-24 18:30:13 +02:00
Gal Hammer
33be8633f5 client: handle the redundant right ctrl windows' message send when a alt-gr is pressed bz#709074
Hello,

I first updated the translate_key function. It now requires the windows
message as parameter (will be used later). It also use the raw wparam
and lparam parameters in order to remove the code duplication when
calling the function.

     Gal.
2011-11-24 18:29:55 +02:00
Liang Guo
a2433172c8 Fix typo: seperator -> separator 2011-08-02 11:13:49 +02:00
Yonit Halperin
8131249d6c client: fix for redundant shift+f11 RHBZ #674532
After shift+F11, both in Windows 7 and xp clients, WM_KEYUP events were missing for
SHIFT and F11. For F11 it was less important since unpress_all was preformed for all keys.
However, we perform sync for all the keyboard modifiers and the GetKeyboardState returns "down" for shift.
In windows7 client, we sometimes received afterwards a F11 KEYDOWN event repetition, and this caused SHIFT+F11 to be called again.
Not performing hiding of the windows while changing client resolutions, solved the problem of missing events, and I don't see any difference
in how spice looks while toggling to full screen.
Using GetAsyncKeyState, returns "UP" for shift in windows 7, and helps avoid performing shift+f11 again, if there is an F11 repetition
before we receive the KEYUP event for shift.
2011-06-14 10:15:41 +03:00
Arnon Gilboa
d1a1a1b4c7 client/windows: enable image randomization (ASLR) rhbz#701111
Enable image randomized base address, hindering some types of
security attacks by making it more difficult for an attacker
to predict target addresses.
2011-05-30 10:02:19 +03:00
Arnon Gilboa
ec56898570 client/windows: remove slash from x64 build dir
otherwise x64 is built in root if REDC_BUILD_DIR is not defined
2011-05-30 10:02:12 +03:00
Arnon Gilboa
a973e87a05 client/windows: remove precompiled header for common.h (fix broken windows debug build)
-Release currently doesn't use precompiled headers at all
-Debug is broken since common/*.c files don't include common.h
-PCH can be enabled for all but specifically-chosen c-files
2011-05-22 14:59:55 +03:00
Arnon Gilboa
8776562115 client/windows: undef SIZE_MAX in stdint.h
eliminating redefinition warning
2011-05-12 15:21:07 +03:00
Arnon Gilboa
ccddcdb82a client/windows: add common\ssl_verify.c/h to project
disable WarnAsError, due to c/c++ warnings
2011-05-12 15:13:40 +03:00
Arnon Gilboa
4ea4d4dc35 client/windows: inc version to 0,9,0,0 2011-05-12 15:13:39 +03:00
Arnon Gilboa
d3577b2772 client/windows: init PACKAGE_VERSION
in windows, we set PACKAGE_VERSION to the binary version
since we don't have config.h as generated by linux configure
2011-05-12 15:13:39 +03:00
Marc-André Lureau
27f771566d common: add windows.h where required, make gdi_handlers static
This patch has not been verified with VS/brew. It should be safe
hopefully. Compilation is fine with mingw32/spice-gtk.
2011-05-03 16:49:56 +02:00
Christophe Fergeau
4a989d6c7a win32: remove obsolete preprocessor #defines
SW_CANVAS_NO_CHUNKS isn't used anywhere but in this file.
SW_CANVAS_CACHE is now defined directly in the files where it's
needed so we no longer need it in the .vcproj file.
2011-05-03 14:44:11 +02:00
Christophe Fergeau
e0c20725c8 s/USE_OGL/USE_OPENGL
This is more explicit about what it does, and not much longer
2011-05-03 14:44:11 +02:00
Christophe Fergeau
78c1465ed3 add #include <config.h> to all source files
When using config.h, it must be the very first include in all source
files since it contains #define that may change the compilation process
(eg libc structure layout changes when it's used to enable large file
support on 32 bit x86 archs). This commit adds it at the beginning
of all .c and .cpp files
2011-05-03 14:44:10 +02:00
Christophe Fergeau
2db7212175 autotools: correctly build canvas-related code
spice client and spice server shares code from
common/{gdi,gl,sw}_canvas.[ch]. However, while most of the code is
shared, the server code wants a canvas compiled with
SW_CANVAS_IMAGE_CACHE defined while the client code wants a canvas
compiled with SW_CANVAS_CACHE.

The initial autotools refactoring didn't take that into account,
this is now fixed by this commit. After this commit, the canvas
files from common/ are no longer compiled as part of the
libspice-common.la convenience library. Instead, there are "proxy"
canvas source files in client/ and server/ which #include the
appropriate C files after defining the relevant #define for the
binary that is being built.

To prevent misuse of the canvas c files and headers in common/,
SPICE_CANVAS_INTERNAL must be set when including the canvas headers
from common/ or when building the c files from common/ otherwise
the build will error out.
2011-05-03 14:44:10 +02:00
Christophe Fergeau
2a4614ea94 autotools: refactor the whole build machinery
spice Makefile.am setup is a bit confusing, with source file
names being listed several times in different Makefile.am
(generally, once in EXTRA_DIST and another time in another
Makefile.am in _SOURCES). The client binaries are built
by client/x11/Makefile.am, which means recursing into client,
then into x11 to finally build spicec. This Makefile.am is
also referencing files from common/ and client/, which is
a bit unusual with autotools.

This patch attempts to simplify the build process to get
something more usual from an autotools point of view.
The source from common/ are compiled into a libtool convenience
library, which the server and the client links against which avoids
referencing source files from common/ when building the server and
the client. The client is built in client/Makefile.am and directly
builds files from x11/ windows/ and gui/ if needed (without
recursing in these subdirectories).

This makes the build simpler to understand, and also makes it
possible to list source files once, which avoids potential
make distcheck breakage when adding new files.

There is a regression in this patch with respect to
sw_canvas/gl_canvas/gdi_canvas. They should be built with
different preprocessor #defines resulting in different behaviour
of the canvas for the client and the server. However, this is not
currently the case, both the client and the server will use the same
code for now (which probably means one of them is broken). This will
be fixed in a subsequent commit.

make distcheck passes, but compilation on windows using the
autotools build system hasn't been tested, which means it's likely
to be broken. It shouldn't be too hard ot fix it though, just let
me know of any issues with this.
2011-05-03 14:44:10 +02:00
Christophe Fergeau
04780d6996 client: remove c++ wrappers
client/ contains several .cpp file which only #include a .c file
of the same name. This is unusual and seems to only be done to
get C++ name mangling on the symbols defined in the C file.
Now that all headers files in common/ use extern "C", these
wrappers are no longer useful.
2011-05-02 11:24:44 +02:00
Christophe Fergeau
8a3f1e8e7a configure.ac: fix make dist 2011-05-02 11:24:43 +02:00
Arnon Gilboa
1a648fb397 client/windows: cleanup vcproj based on updated libs
using updated windows libraries:
http://www.spice-space.org/download/stable/wspice-x86_08032011.zip
http://www.spice-space.org/download/stable/wspice-x64_08032011.zip

-remove IgnoreDefaultLibraryNames="MSVCRT.lib", since pixman is now compiled
using MT threading model similar to other libraries. It used to be mistakenly
compiled with MD.

-downgrade freetype lib to 2.3.11-7, which is the one used/tested with
CEGUI 0.6.2

-pthread lib patched (InterlockedCompareExchange), so x64 client will no
longer crash on SelectClipRgn, BitBlt etc.
2011-03-08 13:00:01 +02:00
Arnon Gilboa
a76fce5514 client/windows: use SPICE_PROTOCOL_DIR in project include dirs
instead of ..\..\..\spice-protocol. Relative path to another git tree is a bit
ugly, since it requires spice-protocol to be in a specific location.

SPICE_PROTOCOL_DIR should also be used in windows qxl and vdagent instead of
SPICE_COMMON_DIR, which is an old and confusing name, due to the common
directory in spice git repo.
2011-02-13 12:23:47 +02:00
Hans de Goede
81f0f04ddc Drop static_title.bmp from windows/Makefile.am 2011-02-11 15:36:43 +01:00
Alon Levy
42f83d18b5 client/windows: don't allocate console unless required 2011-01-27 17:19:07 +02:00
Hans de Goede
392ed65dda spicec: Remove spice-client watermark (rhbz#662450)
This patch stops us from drawing the spice client watermark at the top of
the virtual machine view. We have had requests through several channels to
remove this as it has little added value, and is seen as annoying by some.
Given that we now also have a bugzilla for this I think it is time we really
remove it.
2010-12-16 14:54:46 +01:00
Alon Levy
1bb1bcb9a0 mingw32 build: check for CXImage, disable if not found (only on mingw32)
v2:
 + simplify (Hans)
 + also report presence of cximage for mingw32 target
2010-12-08 17:13:52 +02:00
Alon Levy
916863202a mingw32 build: various fixes 2010-12-08 17:13:08 +02:00
Alon Levy
ff3fb423ed mingw32 build: fix two functions 2010-12-08 17:13:02 +02:00
Alon Levy
8bea5d6b5a mingw32 build: add missing switch flags (nop) 2010-12-08 17:12:56 +02:00
Alon Levy
a19080980d mingw32 build: eol fixes 2010-12-08 17:12:48 +02:00
Alon Levy
78f81ec61c mingw32 build: windows/Makefile.am: double NULL definition 2010-12-08 17:12:43 +02:00
Alon Levy
5aba28df73 mingw32 build: missing linked files for spicec.exe 2010-12-08 17:12:36 +02:00
Alon Levy
9728ea7f5c mingw32 build: remove unused, initialize uninitialized, reorder constructor initializers 2010-12-08 17:11:45 +02:00