[virt-tools-list] [PATCH 3/4] install script: add install_script_avatar entity
Fabiano Fidêncio
fabiano at fidencio.org
Mon Aug 27 22:54:25 UTC 2012
On Mon, Aug 27, 2012 at 7:43 PM, Zeeshan Ali (Khattak)
<zeeshanak at gnome.org> wrote:
> On Tue, Aug 28, 2012 at 12:57 AM, Fabiano Fidêncio <fabiano at fidencio.org> wrote:
>> On Mon, Aug 27, 2012 at 6:03 PM, Zeeshan Ali (Khattak)
>> <zeeshanak at gnome.org> wrote:
>>> On Sun, Aug 26, 2012 at 11:50 AM, Fabiano Fidêncio <fabiano at fidencio.org> wrote:
>>>> Add a new entity called OsinfoInstallScriptAvatar to help the creation
>>>> of an Avatar file for an install script. If avatar entity needs to be
>>>> set, just add, in the .xml's script file:
>>>> <avatar>
>>>> <image-type>...</image-type>
>>>> <extension>...</extension>
>>>> <alpha>...</alpha>
>>>> <width>...</width>
>>>> <height>...</height>
>>>> </avatar>
>>>
>>> I don't quit follow one major thing here: What is the direction of the
>>> OsinfoInstallScriptAvatar? Is app setting it on libosinfo or app
>>> getting it from libosinfo? How would a typical usage look like?
>>
>> App is getting it from libosinfo. With this entity, we can drop
>> AvatarFormat boxes' class and get this info from install-script.
>
> Ah ok so its all about script telling app that if it needs to add a
> user avatar, which format it needs to be in? If so, how does app know
> which filename to use with avatar?
How is it done in gnome-boxes?
>
>>>
>>>> ---
>>>> data/install-scripts/fedora.xml | 7 +
>>>> data/install-scripts/windows-sif.xml | 7 +
>>>> data/schemas/libosinfo.rng | 25 ++-
>>>> docs/reference/Libosinfo.types | 1 +
>>>> osinfo/Makefile.am | 2 +
>>>> osinfo/libosinfo.syms | 7 +
>>>> osinfo/osinfo.h | 1 +
>>>> osinfo/osinfo_install_script.c | 13 ++
>>>> osinfo/osinfo_install_script.h | 5 +
>>>> osinfo/osinfo_install_script_avatar.c | 352 ++++++++++++++++++++++++++++++++++
>>>> osinfo/osinfo_install_script_avatar.h | 84 ++++++++
>>>> osinfo/osinfo_loader.c | 61 ++++++
>>>> 12 files changed, 564 insertions(+), 1 deletion(-)
>>>> create mode 100644 osinfo/osinfo_install_script_avatar.c
>>>> create mode 100644 osinfo/osinfo_install_script_avatar.h
>>>>
>>>> diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml
>>>> index eef4f4a..f7ee68c 100644
>>>> --- a/data/install-scripts/fedora.xml
>>>> +++ b/data/install-scripts/fedora.xml
>>>> @@ -113,6 +113,13 @@ reboot
>>>> <param name="user-password" policy="required"/>
>>>> <param name="admin-password" policy="required"/>
>>>> </config>
>>>> + <avatar>
>>>> + <image-type>png</image-type>
>>>> + <extension>.png</extension>
>>>> + <alpha>true</alpha>
>>>> + <width>-1</width>
>>>> + <height>-1</height>
>>>
>>> These XML elements should be simply omitted when there is no value for them.
>>
>> And the application (boxes, in our case) will manage that if there is
>> no width/height the value to be set is -1?
>
> No, libosinfo will/should set those to -1 when not provided.
>
Okay.
>
> --
> Regards,
>
> Zeeshan Ali (Khattak)
> FSF member#5124
--
Fabiano Fidêncio
More information about the virt-tools-list
mailing list