mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 18:34:19 +00:00
Make generated marshallers build on win32
This commit is contained in:
parent
0f2e037834
commit
ae4436215c
3
client/windows/generate.bat
Normal file
3
client/windows/generate.bat
Normal file
@ -0,0 +1,3 @@
|
||||
python ..\..\spice_codegen.py -d -c -i common.h -i messages.h ..\..\spice.proto ..\generated_demarshallers.cpp
|
||||
python ..\..\spice_codegen.py --generate-marshallers --include messages.h --client ..\..\spice.proto ..\generated_marshallers.cpp
|
||||
python ..\..\spice_codegen.py --generate-marshallers --client -H ..\..\spice.proto ..\generated_marshallers.h
|
||||
@ -219,10 +219,6 @@
|
||||
RelativePath="..\cursor_channel.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\generated_demarshallers.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\display_channel.cpp"
|
||||
>
|
||||
@ -235,6 +231,10 @@
|
||||
RelativePath="..\gdi_canvas.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\generated_demarshallers.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\glz_decoder.cpp"
|
||||
>
|
||||
@ -499,6 +499,14 @@
|
||||
RelativePath="..\..\common\gdi_canvas.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\generated_marshallers.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\generated_marshallers.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\common\win\my_getopt-1.5\getopt.h"
|
||||
>
|
||||
@ -543,6 +551,10 @@
|
||||
RelativePath="..\jpeg_decoder.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\marshaller.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\menu.h"
|
||||
>
|
||||
@ -695,9 +707,9 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating demarshaller"
|
||||
CommandLine="python $(ProjectDir)\..\..\spice_codegen.py -d -c -i common.h $(ProjectDir)\..\..\spice.proto $(ProjectDir)\..\generated_demarshallers.cpp
"
|
||||
CommandLine="generate.bat"
|
||||
AdditionalDependencies=""
|
||||
Outputs="$(ProjectDir)/../generated_demarshallers.cpp"
|
||||
Outputs="$(ProjectDir)/../generated_demarshallers.cpp;$(ProjectDir)/../generated_marshallers.h;$(ProjectDir)/../generated_marshallers.cpp"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
@ -706,8 +718,8 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating demarshaller"
|
||||
CommandLine="python $(ProjectDir)\..\..\spice_codegen.py -d -c -i common.h $(ProjectDir)\..\..\spice.proto $(ProjectDir)\..\generated_demarshallers.cpp"
|
||||
Outputs="$(ProjectDir)/../generated_demarshallers.cpp"
|
||||
CommandLine="generate.bat"
|
||||
Outputs="$(ProjectDir)/../generated_demarshallers.cpp;$(ProjectDir)/../generated_marshallers.h;$(ProjectDir)/../generated_marshallers.cpp"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
|
||||
@ -491,6 +491,7 @@ void spice_marshaller_flush(SpiceMarshaller *m)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
int spice_marshaller_fill_iovec(SpiceMarshaller *m, struct iovec *vec,
|
||||
int n_vec, size_t skip_bytes)
|
||||
{
|
||||
@ -522,6 +523,7 @@ int spice_marshaller_fill_iovec(SpiceMarshaller *m, struct iovec *vec,
|
||||
|
||||
return v;
|
||||
}
|
||||
#endif
|
||||
|
||||
void spice_marshaller_add_uint64(SpiceMarshaller *m, uint64_t v)
|
||||
{
|
||||
|
||||
@ -20,7 +20,9 @@
|
||||
#define _H_MARSHALLER
|
||||
|
||||
#include <spice/types.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
typedef struct SpiceMarshaller SpiceMarshaller;
|
||||
typedef void (*spice_marshaller_item_free_func)(uint8_t *data, void *opaque);
|
||||
@ -44,8 +46,10 @@ size_t spice_marshaller_get_size(SpiceMarshaller *m);
|
||||
size_t spice_marshaller_get_total_size(SpiceMarshaller *m);
|
||||
SpiceMarshaller *spice_marshaller_get_submarshaller(SpiceMarshaller *m);
|
||||
SpiceMarshaller *spice_marshaller_get_ptr_submarshaller(SpiceMarshaller *m, int is_64bit);
|
||||
#ifndef WIN32
|
||||
int spice_marshaller_fill_iovec(SpiceMarshaller *m, struct iovec *vec,
|
||||
int n_vec, size_t skip_bytes);
|
||||
#endif
|
||||
void spice_marshaller_add_uint64(SpiceMarshaller *m, uint64_t v);
|
||||
void spice_marshaller_add_int64(SpiceMarshaller *m, int64_t v);
|
||||
void spice_marshaller_add_uint32(SpiceMarshaller *m, uint32_t v);
|
||||
|
||||
@ -18,6 +18,7 @@ def write_includes(writer):
|
||||
writer.newline()
|
||||
writer.writeln("#ifdef _MSC_VER")
|
||||
writer.writeln("#pragma warning(disable:4101)")
|
||||
writer.writeln("#pragma warning(disable:4018)")
|
||||
writer.writeln("#endif")
|
||||
writer.newline()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user