diff options
-rw-r--r-- | client/windows/generate.bat | 3 | ||||
-rw-r--r-- | client/windows/redc.vcproj | 28 | ||||
-rw-r--r-- | common/marshaller.c | 2 | ||||
-rw-r--r-- | common/marshaller.h | 4 | ||||
-rw-r--r-- | python_modules/marshal.py | 1 |
5 files changed, 30 insertions, 8 deletions
diff --git a/client/windows/generate.bat b/client/windows/generate.bat new file mode 100644 index 00000000..3757bb0c --- /dev/null +++ b/client/windows/generate.bat @@ -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
diff --git a/client/windows/redc.vcproj b/client/windows/redc.vcproj index a178a33a..8f9e5092 100644 --- a/client/windows/redc.vcproj +++ b/client/windows/redc.vcproj @@ -220,10 +220,6 @@ >
</File>
<File
- RelativePath="..\generated_demarshallers.cpp"
- >
- </File>
- <File
RelativePath="..\display_channel.cpp"
>
</File>
@@ -236,6 +232,10 @@ >
</File>
<File
+ RelativePath="..\generated_demarshallers.cpp"
+ >
+ </File>
+ <File
RelativePath="..\glz_decoder.cpp"
>
</File>
@@ -500,6 +500,14 @@ >
</File>
<File
+ RelativePath="..\generated_marshallers.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\generated_marshallers.h"
+ >
+ </File>
+ <File
RelativePath="..\..\common\win\my_getopt-1.5\getopt.h"
>
</File>
@@ -544,6 +552,10 @@ >
</File>
<File
+ RelativePath="..\marshaller.cpp"
+ >
+ </File>
+ <File
RelativePath="..\menu.h"
>
</File>
@@ -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>
diff --git a/common/marshaller.c b/common/marshaller.c index 13385e59..5844b897 100644 --- a/common/marshaller.c +++ b/common/marshaller.c @@ -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) { diff --git a/common/marshaller.h b/common/marshaller.h index 3b159aa9..a60e97b4 100644 --- a/common/marshaller.h +++ b/common/marshaller.h @@ -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); diff --git a/python_modules/marshal.py b/python_modules/marshal.py index 23b029a3..4cbf942d 100644 --- a/python_modules/marshal.py +++ b/python_modules/marshal.py @@ -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() |