[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    UIRibbon 2022 Edition
From:       Fabian Maurer <dark.shadow4 () web ! de>
Date:       2022-12-18 23:34:30
Message-ID: 4790402.31r3eYUQgx () arch
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello wine-devel,

trying to get more work done on UiRibbon during the holidays, could need some
help regarding planning though.

Short rundown:

uiribbon.dll uses a proprietary binary format to load ribbon structure data.
This is created using UICC.exe (shipped by windows SDK) from a XML markup; the
binary is embedded into the application.
I already reversed the binary format pretty far, and wrote a file format
description.

That file format description uses Kaitai Struct, a declarative language to
generate binary data parsers. Currently I'm working on a Kaitai backend to
generate a C parser.

I'm probably going to create a folder under "libs" called "uiribbon" where
said description and classes generated by kaitai struct (and the runtime) can
lie.
I do believe that leaving the parser/generation up to Kaitai is a good idea,
especially since Wine itself doesn't need to rely on Kaitai. Just need it to
regenerate the parser if the format description is modified.
I hope that's not a problem, because I really want to go the Kaitai Struct
route.

The problem:

Still not sure how to deal with tests. And if we need to use a writer..
I could make a "custom UICC", a program to turn XML markup into the binary
format. Not really useful for applications, but could be a "nice to have" or
useful for tests. Lots of work though.

Problem 1: Windows doesn't ship UICC by default. That means if we need it for
tests, it needs to be installed, or tests won't be able to run.

Problem 2: Windows doesn't really have a parser exposed for the binary markup.
You can load it and it either works, or doesn't - in the worst case the
application simply crashes. Other error cases simply create a broken ribbon,
only displayed completely in black. Not easy to see what's wrong, or test if
it's wrong to begin with.
Although it should probably be possible to extract existing UI elements using
uiautomation. Not sure exactly how useful it is.

Question is how we do the tests:

1) Put markup and according binaries into the tests, write tests against the
binaries to assert what we expect from the written markup. If I recall
correctly, embedding binary blobs wasn't too well received.

2) Put markup into tests. Compile it on windows using real UICC, test the
parser that way (using something like C_SRCS = ../uiribbon_parser.c to have
the parser available in the tests)

3) Compile markup using custom UICC, test the ribbon against windows (using
uiautomation, limited testing only).

Maybe some combination.

Thoughts?

Regards,
Fabian Maurer

[Attachment #5 (unknown)]

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span \
style="font-size:0.75em;">Hello wine-devel,</span></p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">trying to get more \
work done on UiRibbon during the holidays, could need some help regarding planning \
though.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Short rundown:</p> \
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">uiribbon.dll \
uses a proprietary binary format to load ribbon structure data. This is created using \
UICC.exe (shipped by windows SDK) from a XML markup; the binary is embedded into the \
application.</p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I \
already reversed the binary format pretty far, and wrote a file format \
description.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">That file format \
description uses Kaitai Struct, a declarative language to generate binary data \
parsers. Currently I'm working on a Kaitai backend to generate a C parser.</p> <br \
/><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I'm probably \
going to create a folder under &quot;libs&quot; called &quot;uiribbon&quot; where \
said description and classes generated by kaitai struct (and the runtime) can \
lie.</p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I do \
believe that leaving the parser/generation up to Kaitai is a good idea, especially \
since Wine itself doesn't need to rely on Kaitai. Just need it to regenerate the \
parser if the format description is modified.</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I hope that's not \
a problem, because I really want to go the Kaitai Struct route.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">The problem:</p> \
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Still not \
sure how to deal with tests. And if we need to use a writer..</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I could make a \
&quot;custom UICC&quot;, a program to turn XML markup into the binary format. Not \
really useful for applications, but could be a &quot;nice to have&quot; or useful for \
tests. Lots of work though.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Problem 1: Windows \
doesn't ship UICC by default. That means if we need it for tests, it needs to be \
installed, or tests won't be able to run.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Problem 2: Windows \
doesn't really have a parser exposed for the binary markup. You can load it and it \
either works, or doesn't - in the worst case the application simply crashes. Other \
error cases simply create a broken ribbon, only displayed completely in black. Not \
easy to see what's wrong, or test if it's wrong to begin with.</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Although it should \
probably be possible to extract existing UI elements using uiautomation. Not sure \
exactly how useful it is.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Question is how we \
do the tests:</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">1) Put markup and \
according binaries into the tests, write tests against the binaries to assert what we \
expect from the written markup. If I recall correctly, embedding binary blobs wasn't \
too well received.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">2) Put markup into \
tests. Compile it on windows using real UICC, test the parser that way (using \
something like C_SRCS = ../uiribbon_parser.c to have the parser available in the \
tests)</p> <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">3) \
Compile markup using custom UICC, test the ribbon against windows (using \
uiautomation, limited testing only).</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Maybe some \
combination.</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Thoughts?</p> <br \
/><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Regards,</p> \
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Fabian \
Maurer</p> </body>
</html>





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic