* [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
@ 2022-04-17 14:50 Helge Konetzka
2022-04-17 15:40 ` Konstantin Kostiuk
2022-04-18 8:15 ` Marc-André Lureau
0 siblings, 2 replies; 7+ messages in thread
From: Helge Konetzka @ 2022-04-17 14:50 UTC (permalink / raw)
To: qemu-devel; +Cc: Konstantin Kostiuk, Marc-André Lureau, Michael Roth
Generation with widl needs to be triggered explicitly and requires
library and include directories containing referenced *.idl and *.tlb
as parameters.
Signed-off-by: Helge Konetzka <hk@zapateado.de>
---
For tested Msys2 build all referenced resources reside in /<usr>/include.
Msys2 provides its flavours in different /<usr> bases.
This patch derives the missing include directory path from widl path.
Assuming the given widl path is /<usr>/bin/widl, it determines /<usr>
as base and appends /<usr>/include as include and library directories
to widl command. This way the directory is correct for any Msys2
flavour.
It makes sure, only existing directories are appended as parameter.
---
qga/vss-win32/meson.build | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
index 71c50d0866..51539a582c 100644
--- a/qga/vss-win32/meson.build
+++ b/qga/vss-win32/meson.build
@@ -30,9 +30,16 @@ if midl.found()
input: 'qga-vss.idl',
output: 'qga-vss.tlb',
command: [midl, '@INPUT@', '/tlb', '@OUTPUT@'])
-else
+elif widl.found()
+ widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
+ usr_include = fs.parent(fs.parent(widl.full_path()))/'include'
+ if fs.is_dir(usr_include)
+ widl_cmd += ['-L', usr_include]
+ widl_cmd += ['-I', usr_include]
+ endif
gen_tlb = custom_target('gen-tlb',
input: 'qga-vss.idl',
output: 'qga-vss.tlb',
- command: [widl, '-t', '@INPUT@', '-o',
'@OUTPUT@'])
+ build_by_default: true,
+ command: widl_cmd)
endif
--
2.30.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
2022-04-17 14:50 [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl Helge Konetzka
@ 2022-04-17 15:40 ` Konstantin Kostiuk
2022-04-17 16:34 ` Helge Konetzka
2022-04-18 8:15 ` Marc-André Lureau
1 sibling, 1 reply; 7+ messages in thread
From: Konstantin Kostiuk @ 2022-04-17 15:40 UTC (permalink / raw)
To: Helge Konetzka; +Cc: Michael Roth, qemu-devel, Marc-André Lureau
[-- Attachment #1: Type: text/plain, Size: 2175 bytes --]
Hi Helge,
In general, the patch looks good but I want to make sure
that we will not break other compilation environments.
What version of MSYS2 do you use?
In my case, I can compile GA without this patch.
Best Regards,
Konstantin Kostiuk.
On Sun, Apr 17, 2022 at 5:50 PM Helge Konetzka <hk@zapateado.de> wrote:
> Generation with widl needs to be triggered explicitly and requires
> library and include directories containing referenced *.idl and *.tlb
> as parameters.
>
> Signed-off-by: Helge Konetzka <hk@zapateado.de>
> ---
>
> For tested Msys2 build all referenced resources reside in /<usr>/include.
> Msys2 provides its flavours in different /<usr> bases.
>
> This patch derives the missing include directory path from widl path.
> Assuming the given widl path is /<usr>/bin/widl, it determines /<usr>
> as base and appends /<usr>/include as include and library directories
> to widl command. This way the directory is correct for any Msys2
> flavour.
> It makes sure, only existing directories are appended as parameter.
>
> ---
> qga/vss-win32/meson.build | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
> index 71c50d0866..51539a582c 100644
> --- a/qga/vss-win32/meson.build
> +++ b/qga/vss-win32/meson.build
> @@ -30,9 +30,16 @@ if midl.found()
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> command: [midl, '@INPUT@', '/tlb', '@OUTPUT@
> '])
> -else
> +elif widl.found()
> + widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
> + usr_include = fs.parent(fs.parent(widl.full_path()))/'include'
> + if fs.is_dir(usr_include)
> + widl_cmd += ['-L', usr_include]
> + widl_cmd += ['-I', usr_include]
> + endif
> gen_tlb = custom_target('gen-tlb',
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> - command: [widl, '-t', '@INPUT@', '-o',
> '@OUTPUT@'])
> + build_by_default: true,
> + command: widl_cmd)
> endif
> --
> 2.30.2
>
>
[-- Attachment #2: Type: text/html, Size: 3225 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
2022-04-17 15:40 ` Konstantin Kostiuk
@ 2022-04-17 16:34 ` Helge Konetzka
0 siblings, 0 replies; 7+ messages in thread
From: Helge Konetzka @ 2022-04-17 16:34 UTC (permalink / raw)
To: Konstantin Kostiuk; +Cc: Michael Roth, qemu-devel, Marc-André Lureau
Hi Konstantin,
sorry not being clear about QEMU versions.
On building the RCs of QEMU 7.0.0:
qemu-ga.exe is produced
qga-vss.dll is produced
qga-vss.tlb is not created
In RCs of QEMU 7.0.0 qga-vss.tlb is no part of the tarball anymore.
The git history of qga/vss-win32/meson.build suggests that qga-vss.tlb
was part of the tarball in 6.2.0.
Now, to create qga-vss.tlb either
MINGW_PREFIX=/mingw64 # or any of /mingw32 /ucrt64 /clang32 /clang64
cd qga/vss-win32
widl -I${MINGW_PREFIX}/include -L${MINGW_PREFIX}/include \
-t "${srcdir}"/${_tarname}/qga/vss-win32/qga-vss.idl -o qga-vss.tlb
needs to be executed or the patch may be applied.
I am not sure what to answer about MSYS2 version. I am talking about
https://msys2.org with packaging code hosted on
https://github.com/msys2/MINGW-packages. MSYS2 is a rolling release
distribution.
Happy Easter,
Helge Konetzka.
Am 17.04.22 um 17:40 schrieb Konstantin Kostiuk:
> Hi Helge,
>
> In general, the patch looks good but I want to make sure
> that we will not break other compilation environments.
>
> What version of MSYS2 do you use?
> In my case, I can compile GA without this patch.
>
>
> Best Regards,
> Konstantin Kostiuk.
>
>
> On Sun, Apr 17, 2022 at 5:50 PM Helge Konetzka <hk@zapateado.de
> <mailto:hk@zapateado.de>> wrote:
>
> Generation with widl needs to be triggered explicitly and requires
> library and include directories containing referenced *.idl and *.tlb
> as parameters.
>
> Signed-off-by: Helge Konetzka <hk@zapateado.de <mailto:hk@zapateado.de>>
> ---
>
> For tested Msys2 build all referenced resources reside in
> /<usr>/include.
> Msys2 provides its flavours in different /<usr> bases.
>
> This patch derives the missing include directory path from widl path.
> Assuming the given widl path is /<usr>/bin/widl, it determines /<usr>
> as base and appends /<usr>/include as include and library directories
> to widl command. This way the directory is correct for any Msys2
> flavour.
> It makes sure, only existing directories are appended as parameter.
>
> ---
> qga/vss-win32/meson.build | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
> index 71c50d0866..51539a582c 100644
> --- a/qga/vss-win32/meson.build
> +++ b/qga/vss-win32/meson.build
> @@ -30,9 +30,16 @@ if midl.found()
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> command: [midl, '@INPUT@', '/tlb',
> '@OUTPUT@'])
> -else
> +elif widl.found()
> + widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
> + usr_include = fs.parent(fs.parent(widl.full_path()))/'include'
> + if fs.is_dir(usr_include)
> + widl_cmd += ['-L', usr_include]
> + widl_cmd += ['-I', usr_include]
> + endif
> gen_tlb = custom_target('gen-tlb',
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> - command: [widl, '-t', '@INPUT@', '-o',
> '@OUTPUT@'])
> + build_by_default: true,
> + command: widl_cmd)
> endif
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
2022-04-17 14:50 [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl Helge Konetzka
2022-04-17 15:40 ` Konstantin Kostiuk
@ 2022-04-18 8:15 ` Marc-André Lureau
2022-04-20 11:17 ` Konstantin Kostiuk
1 sibling, 1 reply; 7+ messages in thread
From: Marc-André Lureau @ 2022-04-18 8:15 UTC (permalink / raw)
To: Helge Konetzka; +Cc: Konstantin Kostiuk, QEMU, Michael Roth
[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]
Hi Helge
On Sun, Apr 17, 2022 at 6:51 PM Helge Konetzka <hk@zapateado.de> wrote:
> Generation with widl needs to be triggered explicitly and requires
> library and include directories containing referenced *.idl and *.tlb
> as parameters.
>
Ok, that's different issues, it would help to split the patch.
>
> Signed-off-by: Helge Konetzka <hk@zapateado.de>
> ---
>
> For tested Msys2 build all referenced resources reside in /<usr>/include.
> Msys2 provides its flavours in different /<usr> bases.
>
> This patch derives the missing include directory path from widl path.
> Assuming the given widl path is /<usr>/bin/widl, it determines /<usr>
> as base and appends /<usr>/include as include and library directories
> to widl command. This way the directory is correct for any Msys2
> flavour.
> It makes sure, only existing directories are appended as parameter.
>
I would file a bug to msys2 instead for widl to use the default include
directory. Otherwise, every widl user out there needs to be adjusted.
(I think it would need a special --with-widl-includedir=DIR, given how
msys2 remaps directory)
> ---
> qga/vss-win32/meson.build | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
> index 71c50d0866..51539a582c 100644
> --- a/qga/vss-win32/meson.build
> +++ b/qga/vss-win32/meson.build
> @@ -30,9 +30,16 @@ if midl.found()
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> command: [midl, '@INPUT@', '/tlb', '@OUTPUT@
> '])
> -else
> +elif widl.found()
> + widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
> + usr_include = fs.parent(fs.parent(widl.full_path()))/'include'
> + if fs.is_dir(usr_include)
> + widl_cmd += ['-L', usr_include]
> + widl_cmd += ['-I', usr_include]
> + endif
> gen_tlb = custom_target('gen-tlb',
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> - command: [widl, '-t', '@INPUT@', '-o',
> '@OUTPUT@'])
> + build_by_default: true,
>
I would make qga_vss depend on gen_tlb instead (so the tlb is always built
with the dll)
thanks
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 3543 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
2022-04-18 8:15 ` Marc-André Lureau
@ 2022-04-20 11:17 ` Konstantin Kostiuk
2022-04-20 12:27 ` Marc-André Lureau
0 siblings, 1 reply; 7+ messages in thread
From: Konstantin Kostiuk @ 2022-04-20 11:17 UTC (permalink / raw)
To: Helge Konetzka, Marc-André Lureau; +Cc: Michael Roth, QEMU
[-- Attachment #1: Type: text/plain, Size: 3505 bytes --]
Hi Helge,
I checked what happened in MSYS2 and this looks like a bug in the widl tool.
I looked into the widl source code and think that it detects the default
include path incorrectly.
During build of widl tool the corresponding variable receive incorrect
value:
`BIN_TO_INCLUDEDIR = ../x86_64-w64-mingw32/include` but should be
`BIN_TO_INCLUDEDIR = ../include`. Looks like a package mismatch,
because the `/ming64/x86_64-w64-mingw32` directory exist
but contains only few libs and no any include files.
So I agreed with Marc-André. I think this bug should be fixed in MSYS2.
I think you can report this issue there
https://github.com/msys2/MINGW-packages/issues
When I checked the build using cross-compilation from Linux,
the widl tool uses proper BIN_TO_INCLUDEDIR.
We should add the rule that qga_vss depends on gen_tlb to get this error
more visible.
Marc-André, what do you think?
Best Regards,
Konstantin Kostiuk.
On Mon, Apr 18, 2022 at 11:15 AM Marc-André Lureau <
marcandre.lureau@gmail.com> wrote:
> Hi Helge
>
> On Sun, Apr 17, 2022 at 6:51 PM Helge Konetzka <hk@zapateado.de> wrote:
>
>> Generation with widl needs to be triggered explicitly and requires
>> library and include directories containing referenced *.idl and *.tlb
>> as parameters.
>>
>
> Ok, that's different issues, it would help to split the patch.
>
>
>>
>> Signed-off-by: Helge Konetzka <hk@zapateado.de>
>> ---
>>
>> For tested Msys2 build all referenced resources reside in /<usr>/include.
>> Msys2 provides its flavours in different /<usr> bases.
>>
>> This patch derives the missing include directory path from widl path.
>> Assuming the given widl path is /<usr>/bin/widl, it determines /<usr>
>> as base and appends /<usr>/include as include and library directories
>> to widl command. This way the directory is correct for any Msys2
>> flavour.
>> It makes sure, only existing directories are appended as parameter.
>>
>
> I would file a bug to msys2 instead for widl to use the default include
> directory. Otherwise, every widl user out there needs to be adjusted.
> (I think it would need a special --with-widl-includedir=DIR, given how
> msys2 remaps directory)
>
>
>> ---
>> qga/vss-win32/meson.build | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
>> index 71c50d0866..51539a582c 100644
>> --- a/qga/vss-win32/meson.build
>> +++ b/qga/vss-win32/meson.build
>> @@ -30,9 +30,16 @@ if midl.found()
>> input: 'qga-vss.idl',
>> output: 'qga-vss.tlb',
>> command: [midl, '@INPUT@', '/tlb', '@OUTPUT@
>> '])
>> -else
>> +elif widl.found()
>> + widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
>> + usr_include = fs.parent(fs.parent(widl.full_path()))/'include'
>> + if fs.is_dir(usr_include)
>> + widl_cmd += ['-L', usr_include]
>> + widl_cmd += ['-I', usr_include]
>> + endif
>> gen_tlb = custom_target('gen-tlb',
>> input: 'qga-vss.idl',
>> output: 'qga-vss.tlb',
>> - command: [widl, '-t', '@INPUT@', '-o',
>> '@OUTPUT@'])
>> + build_by_default: true,
>>
>
> I would make qga_vss depend on gen_tlb instead (so the tlb is always built
> with the dll)
>
> thanks
>
> --
> Marc-André Lureau
>
[-- Attachment #2: Type: text/html, Size: 5260 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
2022-04-20 11:17 ` Konstantin Kostiuk
@ 2022-04-20 12:27 ` Marc-André Lureau
2022-04-22 17:12 ` Helge Konetzka
0 siblings, 1 reply; 7+ messages in thread
From: Marc-André Lureau @ 2022-04-20 12:27 UTC (permalink / raw)
To: Konstantin Kostiuk; +Cc: Michael Roth, Helge Konetzka, QEMU
[-- Attachment #1: Type: text/plain, Size: 3932 bytes --]
Hi
On Wed, Apr 20, 2022 at 3:17 PM Konstantin Kostiuk <kkostiuk@redhat.com>
wrote:
> Hi Helge,
>
> I checked what happened in MSYS2 and this looks like a bug in the widl
> tool.
>
> I looked into the widl source code and think that it detects the default
> include path incorrectly.
>
> During build of widl tool the corresponding variable receive incorrect
> value:
> `BIN_TO_INCLUDEDIR = ../x86_64-w64-mingw32/include` but should be
> `BIN_TO_INCLUDEDIR = ../include`. Looks like a package mismatch,
> because the `/ming64/x86_64-w64-mingw32` directory exist
> but contains only few libs and no any include files.
>
> So I agreed with Marc-André. I think this bug should be fixed in MSYS2.
> I think you can report this issue there
> https://github.com/msys2/MINGW-packages/issues
>
>
Thanks for the investigation and your comment on the msys2 issue:
https://github.com/msys2/MINGW-packages/issues/11520
When I checked the build using cross-compilation from Linux,
> the widl tool uses proper BIN_TO_INCLUDEDIR.
>
> We should add the rule that qga_vss depends on gen_tlb to get this error
> more visible.
>
> Marc-André, what do you think?
>
>
yes, that's what I suggested earlier
thanks
> Best Regards,
> Konstantin Kostiuk.
>
>
> On Mon, Apr 18, 2022 at 11:15 AM Marc-André Lureau <
> marcandre.lureau@gmail.com> wrote:
>
>> Hi Helge
>>
>> On Sun, Apr 17, 2022 at 6:51 PM Helge Konetzka <hk@zapateado.de> wrote:
>>
>>> Generation with widl needs to be triggered explicitly and requires
>>> library and include directories containing referenced *.idl and *.tlb
>>> as parameters.
>>>
>>
>> Ok, that's different issues, it would help to split the patch.
>>
>>
>>>
>>> Signed-off-by: Helge Konetzka <hk@zapateado.de>
>>> ---
>>>
>>> For tested Msys2 build all referenced resources reside in /<usr>/include.
>>> Msys2 provides its flavours in different /<usr> bases.
>>>
>>> This patch derives the missing include directory path from widl path.
>>> Assuming the given widl path is /<usr>/bin/widl, it determines /<usr>
>>> as base and appends /<usr>/include as include and library directories
>>> to widl command. This way the directory is correct for any Msys2
>>> flavour.
>>> It makes sure, only existing directories are appended as parameter.
>>>
>>
>> I would file a bug to msys2 instead for widl to use the default include
>> directory. Otherwise, every widl user out there needs to be adjusted.
>> (I think it would need a special --with-widl-includedir=DIR, given how
>> msys2 remaps directory)
>>
>>
>>> ---
>>> qga/vss-win32/meson.build | 11 +++++++++--
>>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
>>> index 71c50d0866..51539a582c 100644
>>> --- a/qga/vss-win32/meson.build
>>> +++ b/qga/vss-win32/meson.build
>>> @@ -30,9 +30,16 @@ if midl.found()
>>> input: 'qga-vss.idl',
>>> output: 'qga-vss.tlb',
>>> command: [midl, '@INPUT@', '/tlb', '@OUTPUT@
>>> '])
>>> -else
>>> +elif widl.found()
>>> + widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
>>> + usr_include = fs.parent(fs.parent(widl.full_path()))/'include'
>>> + if fs.is_dir(usr_include)
>>> + widl_cmd += ['-L', usr_include]
>>> + widl_cmd += ['-I', usr_include]
>>> + endif
>>> gen_tlb = custom_target('gen-tlb',
>>> input: 'qga-vss.idl',
>>> output: 'qga-vss.tlb',
>>> - command: [widl, '-t', '@INPUT@', '-o',
>>> '@OUTPUT@'])
>>> + build_by_default: true,
>>>
>>
>> I would make qga_vss depend on gen_tlb instead (so the tlb is always
>> built with the dll)
>>
>> thanks
>>
>> --
>> Marc-André Lureau
>>
>
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 6393 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl
2022-04-20 12:27 ` Marc-André Lureau
@ 2022-04-22 17:12 ` Helge Konetzka
0 siblings, 0 replies; 7+ messages in thread
From: Helge Konetzka @ 2022-04-22 17:12 UTC (permalink / raw)
To: Marc-André Lureau, Konstantin Kostiuk; +Cc: Michael Roth, QEMU
Hello,
a few moments ago I sent a PR to Msys2 to make widl work as expected.
I've prepared a rather simple patch to activate the generation of
qga-vss.tlb by widl in targets all and qemu-ga, which I will post later on.
Thank you for your patience and your help!
Regards, Helge.
Am 20.04.22 um 14:27 schrieb Marc-André Lureau:
> Hi
>
> On Wed, Apr 20, 2022 at 3:17 PM Konstantin Kostiuk <kkostiuk@redhat.com
> <mailto:kkostiuk@redhat.com>> wrote:
>
> Hi Helge,
>
> I checked what happened in MSYS2 and this looks like a bug in the
> widl tool.
>
> I looked into the widl source code and think that it detects the
> default include path incorrectly.
>
> During build of widl tool the corresponding variable receive
> incorrect value:
> `BIN_TO_INCLUDEDIR = ../x86_64-w64-mingw32/include` but should be
> `BIN_TO_INCLUDEDIR = ../include`. Looks like a package mismatch,
> because the `/ming64/x86_64-w64-mingw32` directory exist
> but contains only few libs and no any include files.
>
> So I agreed with Marc-André. I think this bug should be fixed in MSYS2.
> I think you can report this issue there
> https://github.com/msys2/MINGW-packages/issues
> <https://github.com/msys2/MINGW-packages/issues>
>
>
> Thanks for the investigation and your comment on the msys2 issue:
> https://github.com/msys2/MINGW-packages/issues/11520
> <https://github.com/msys2/MINGW-packages/issues/11520>
>
> When I checked the build using cross-compilation from Linux,
> the widl tool uses proper BIN_TO_INCLUDEDIR.
>
> We should add the rule that qga_vss depends on gen_tlb to get this
> error more visible.
>
> Marc-André, what do you think?
>
>
> yes, that's what I suggested earlier
>
> thanks
>
> Best Regards,
> Konstantin Kostiuk.
>
>
> On Mon, Apr 18, 2022 at 11:15 AM Marc-André Lureau
> <marcandre.lureau@gmail.com <mailto:marcandre.lureau@gmail.com>> wrote:
>
> Hi Helge
>
> On Sun, Apr 17, 2022 at 6:51 PM Helge Konetzka <hk@zapateado.de
> <mailto:hk@zapateado.de>> wrote:
>
> Generation with widl needs to be triggered explicitly and
> requires
> library and include directories containing referenced *.idl
> and *.tlb
> as parameters.
>
>
> Ok, that's different issues, it would help to split the patch.
>
>
> Signed-off-by: Helge Konetzka <hk@zapateado.de
> <mailto:hk@zapateado.de>>
> ---
>
> For tested Msys2 build all referenced resources reside in
> /<usr>/include.
> Msys2 provides its flavours in different /<usr> bases.
>
> This patch derives the missing include directory path from
> widl path.
> Assuming the given widl path is /<usr>/bin/widl, it
> determines /<usr>
> as base and appends /<usr>/include as include and library
> directories
> to widl command. This way the directory is correct for any Msys2
> flavour.
> It makes sure, only existing directories are appended as
> parameter.
>
>
> I would file a bug to msys2 instead for widl to use the default
> include directory. Otherwise, every widl user out there needs to
> be adjusted.
> (I think it would need a special --with-widl-includedir=DIR,
> given how msys2 remaps directory)
>
>
> ---
> qga/vss-win32/meson.build | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/qga/vss-win32/meson.build
> b/qga/vss-win32/meson.build
> index 71c50d0866..51539a582c 100644
> --- a/qga/vss-win32/meson.build
> +++ b/qga/vss-win32/meson.build
> @@ -30,9 +30,16 @@ if midl.found()
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> command: [midl, '@INPUT@',
> '/tlb', '@OUTPUT@'])
> -else
> +elif widl.found()
> + widl_cmd = [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']
> + usr_include =
> fs.parent(fs.parent(widl.full_path()))/'include'
> + if fs.is_dir(usr_include)
> + widl_cmd += ['-L', usr_include]
> + widl_cmd += ['-I', usr_include]
> + endif
> gen_tlb = custom_target('gen-tlb',
> input: 'qga-vss.idl',
> output: 'qga-vss.tlb',
> - command: [widl, '-t', '@INPUT@',
> '-o',
> '@OUTPUT@'])
> + build_by_default: true,
>
>
> I would make qga_vss depend on gen_tlb instead (so the tlb is
> always built with the dll)
>
> thanks
>
> --
> Marc-André Lureau
>
>
>
> --
> Marc-André Lureau
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-22 18:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-17 14:50 [PATCH] qga/vss-win32: enable qga-vss.tlb generation with widl Helge Konetzka
2022-04-17 15:40 ` Konstantin Kostiuk
2022-04-17 16:34 ` Helge Konetzka
2022-04-18 8:15 ` Marc-André Lureau
2022-04-20 11:17 ` Konstantin Kostiuk
2022-04-20 12:27 ` Marc-André Lureau
2022-04-22 17:12 ` Helge Konetzka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.