[Spice-devel] [PATCH] spicec: add #ifdef SUPPORT_GUI for gui code

Hans de Goede hdegoede at redhat.com
Wed Oct 20 10:54:26 PDT 2010


Nack,

The proper solution here would be to remove these files from the
list of files to build in the project file for the x64 target,

IE like this in client/x11/Makefile.am:

if SUPPORT_GUI
RED_GUI_SRCS =                                          \
         $(CLIENT_DIR)/gui/softrenderer.h                \
         $(CLIENT_DIR)/gui/softrenderer.cpp              \
         $(CLIENT_DIR)/gui/softtexture.h                 \
         $(CLIENT_DIR)/gui/softtexture.cpp               \
         $(CLIENT_DIR)/gui/resource_provider.h           \
         $(CLIENT_DIR)/gui/resource_provider.cpp         \
         $(CLIENT_DIR)/gui/gui.h                         \
         $(CLIENT_DIR)/gui/gui.cpp                       \
         $(NULL)
else
RED_GUI_SRCS =
endif

Rather then these ugly defines in the code.
Also even better would be to just get cegui built for
win64 too. Esp as the cegui gui has been enabled in
Fedora's spice packages too.

Regards,

Hans


On 10/20/2010 06:16 PM, Arnon Gilboa wrote:
> hack for disabling CEGUI on win x64 client, until fixed
> ---
>   client/gui/gui.cpp               |    3 ++-
>   client/gui/gui.h                 |    3 ++-
>   client/gui/resource_provider.cpp |    3 ++-
>   client/gui/resource_provider.h   |    3 ++-
>   client/gui/softrenderer.cpp      |    2 ++
>   client/gui/softrenderer.h        |    3 ++-
>   client/gui/softtexture.cpp       |    3 ++-
>   client/gui/softtexture.h         |    4 ++--
>   8 files changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/client/gui/gui.cpp b/client/gui/gui.cpp
> index f1ca13d..a518d12 100644
> --- a/client/gui/gui.cpp
> +++ b/client/gui/gui.cpp
> @@ -1,5 +1,5 @@
>   #include "common.h"
> -
> +#ifdef SUPPORT_GUI
>   #include<limits.h>
>   #include<stdlib.h>
>
> @@ -1385,3 +1385,4 @@ bool GUI::message_box(MessageType type, const char *text, const ButtonsList&  but
>       return _dialog->message_box(type, text, buttons, _response_handler);
>   }
>
> +#endif
> \ No newline at end of file
> diff --git a/client/gui/gui.h b/client/gui/gui.h
> index 3b76b68..09f7a42 100644
> --- a/client/gui/gui.h
> +++ b/client/gui/gui.h
> @@ -1,3 +1,4 @@
> +#ifdef SUPPORT_GUI
>   #ifndef _H_GUI
>   #define _H_GUI
>
> @@ -124,4 +125,4 @@ private:
>   };
>
>   #endif
> -
> +#endif
> diff --git a/client/gui/resource_provider.cpp b/client/gui/resource_provider.cpp
> index 52e3381..0f94706 100644
> --- a/client/gui/resource_provider.cpp
> +++ b/client/gui/resource_provider.cpp
> @@ -1,5 +1,5 @@
>   #include "common.h"
> -
> +#ifdef SUPPORT_GUI
>   #include "resource_provider.h"
>   #include "debug.h"
>   #include "utils.h"
> @@ -126,3 +126,4 @@ const char* res_get_string(int id)
>       return NULL;
>   }
>
> +#endif
> \ No newline at end of file
> diff --git a/client/gui/resource_provider.h b/client/gui/resource_provider.h
> index 1443abe..7381ac6 100644
> --- a/client/gui/resource_provider.h
> +++ b/client/gui/resource_provider.h
> @@ -1,3 +1,4 @@
> +#ifdef SUPPORT_GUI
>   #ifndef _H_RESOURCE_PROVIDER
>   #define _H_RESOURCE_PROVIDER
>
> @@ -37,4 +38,4 @@ enum {
>   const char* res_get_string(int id);
>
>   #endif
> -
> +#endif
> diff --git a/client/gui/softrenderer.cpp b/client/gui/softrenderer.cpp
> index 87fffb8..ae0ea41 100644
> --- a/client/gui/softrenderer.cpp
> +++ b/client/gui/softrenderer.cpp
> @@ -1,4 +1,5 @@
>   #include "common.h"
> +#ifdef SUPPORT_GUI
>   #ifdef HAVE_CONFIG_H
>   #include "config.h"
>   #endif
> @@ -371,3 +372,4 @@ uint SoftRenderer::getVertScreenDPI() const
>
>   }
>
> +#endif
> diff --git a/client/gui/softrenderer.h b/client/gui/softrenderer.h
> index 9fc1a29..b4921c9 100644
> --- a/client/gui/softrenderer.h
> +++ b/client/gui/softrenderer.h
> @@ -1,3 +1,4 @@
> +#ifdef SUPPORT_GUI
>   #ifndef _directfbrenderer_h_
>   #define _directfbrenderer_h_
>
> @@ -127,4 +128,4 @@ namespace CEGUI
>   }
>
>   #endif
> -
> +#endif
> diff --git a/client/gui/softtexture.cpp b/client/gui/softtexture.cpp
> index 562edea..2f3e7bb 100644
> --- a/client/gui/softtexture.cpp
> +++ b/client/gui/softtexture.cpp
> @@ -1,5 +1,5 @@
>   #include "common.h"
> -
> +#ifdef SUPPORT_GUI
>   #ifdef HAVE_CONFIG_H
>   #include "config.h"
>   #endif
> @@ -122,3 +122,4 @@ void SoftTexture::loadFromMemory(const void* buffPtr, uint buffWidth,
>
>   }
>
> +#endif
> \ No newline at end of file
> diff --git a/client/gui/softtexture.h b/client/gui/softtexture.h
> index 37617f2..32a3898 100644
> --- a/client/gui/softtexture.h
> +++ b/client/gui/softtexture.h
> @@ -1,4 +1,4 @@
> -
> +#ifdef SUPPORT_GUI
>   #ifndef _softtexture_h_
>   #define _softtexture_h_
>
> @@ -37,4 +37,4 @@ namespace CEGUI
>   }
>
>   #endif
> -
> +#endif


More information about the Spice-devel mailing list