design and localisation questions on htmlinstaller

Jan 21, 2011 at 4:39 PM

hello,

I am trying to use htmlinstaller to create a "multi dialog" UI. I am at the point where I have a welcome, choose component, and ready to install html page, which was a bit tricky if you do not know css and html well.

Now I tried to add a "path selection" html page to my wizarrd. Therefore I added 2 browse controls in the configuration.xml file. What I am now missing is the "html representation" of these browse controls, so that I can plase them on the html page I like.
For the component selection dialog this is the <div id="components" /> tag. Is there a tag like this for the browse (and all the other configurable) conrol? May be it is just not documented?

Also I did not found out how localisation could work for htmlinstaller. Some strings are localised if there are different settings in the configuration.xml file, some are not. Is there a common way how the string get into the html pages?

Thanks for any help

If there is something planned but not implemented a pointer on where to start would speed up patch submission.

Coordinator
Jan 23, 2011 at 8:21 PM

It's useful to know that htmlInstaller uses htmlayout SDK (http://www.terrainformatica.com/htmlayout/). So all the tags are somewhat documented there and in release notes. A browse control is a widget type="folder-path" or type="file-path". There's also a "filter" property for the wildcard presented.

For localization you have to stick to strings from the configuration that affect UI. This means putting no language-specific strings in your custom HTML. If you see a string missing that needs to appear in the configuration, please file a bug with the set. It's not ideal, we should think about being able to embed locale-specific HTML partials. 

 

Jan 24, 2011 at 9:30 AM

thanks dblock.

I did not know that htmlinstaller uses the standard widgets for the "browse" control. Anyway the behavior is still queer. I added 2 browse controls in the configuration xml file. These are displayed in my htmlinstaller "wizard" on a page where I do not like them.
If I add e.g.

<widget id="ProgInstPath" type="folder-path"></widget>

to the html page, it shows a path selection UI. But the other 2 misplaced path controls(widgets are also displayed.
I also have another question on the folder-path widget: Is it possible that it rembers the last selected folder? If I go forward and backward in my sample wizard, the previously selected folder is not selected any more.

Any ideas how to solve this?

Coordinator
Jan 24, 2011 at 1:29 PM

Don't add the browse controls in the configuration, just add them in HTML. htmlnstaller will collect ID values anyway.

The pages are re-created every time you go back and forth, I can see how this is a problem. You should file a bug on this, it's going to require some C++ work to fix.

Jan 24, 2011 at 3:10 PM
Edited Jan 24, 2011 at 4:49 PM

Thanks for the info, nice to knwo this. Is there a place in the documentation that tells me about this?
what about label and other controls? same way?

but the last about this is then, how to localise this then? In the configuration.xml file I can have 2 configurations with different strings, e.g. the message shown when nothing is selected in the browse control. I do no know of a way on html to do it.
Any ideas how to do this?

I also found out that the caption of the cancel/install/skip /.. buttons is not taken from the configuration xml file, although I saw in debug mode that it is assigned. Is it a bug?
Is there a common way to reference text from the configuration.xml, e.g. dialog_message?

a lot of questions, but I need to understand this htmlinstaller stuff so I can implement my wizard with this. If you are interested, I could post a sample as  general dni sample when working.

Jan 24, 2011 at 4:55 PM

created http://dotnetinstaller.codeplex.com/workitem/8230 for the "selection remember" issue.

I allthough guess I will need a different wizard for install and uninstall or at least hide some unusefull elements.
Is it planned to support this also?

Coordinator
Jan 24, 2011 at 6:01 PM

I would definitely like to support "virtually any" workflow. I think completely different UIs for install and install mode, different locales, etc., should all be possible.

Coordinator
Jan 24, 2011 at 6:15 PM
quirrel wrote:

Thanks for the info, nice to knwo this. Is there a place in the documentation that tells me about this?
what about label and other controls? same way?

The documentation under Setup Bootstrappers, htmlInstaller has external links to HTMLayout-specific tags, CSS attributes, etc. It would be great if someone (you?) edited the docs and provided more detail on all these topics.

All controls work the same way.

quirrel wrote:

but the last about this is then, how to localise this then? In the configuration.xml file I can have 2 configurations with different strings, e.g. the message shown when nothing is selected in the browse control. I do no know of a way on html to do it.

Any ideas how to do this?

That's the thing. Right now you can only do this in the configuration and only for controls that are pre-defined. What I'd like to enable long term is either localization strings in the configuration that can be reused in html, a whole locale-based template selection (author two different HTMLs) or both.

quirrel wrote:

I also found out that the caption of the cancel/install/skip /.. buttons is not taken from the configuration xml file, although I saw in debug mode that it is assigned. Is it a bug?

Since you see this under a debugger, probably yes. Maybe you can fix it too? :)

quirrel wrote:

Is there a common way to reference text from the configuration.xml, e.g. dialog_message?

a lot of questions, but I need to understand this htmlinstaller stuff so I can implement my wizard with this. If you are interested, I could post a sample as  general dni sample when working.

So no, there's no common way to reference text from the configuration. It works the other way around where controls with specific IDs get the text. It's a great feature request, you should file it.

Definitely want your sample once it's working! Feel free to submit it to DNI as a patch or blog about it somewhere else.

Jan 25, 2011 at 7:50 AM

dblock, thanks again for your answers.
I'll see if I can document a bit what I found out on htmlinstaller and submit a patch, will set a flag for me to do it in a calm minute.

I really need this localisation stuff asap. I think it can somehow be solved if it is possible to reference text from config.xml in the html files. I created http://dotnetinstaller.codeplex.com/workitem/8235 as feature request and will see if I can get working anything at this point. Same applies for the button caption.

So, in order to get me kicked in dotnetinstaller(htmlinstaller) development I have some more questions on implementation of it: If I add "custom tags" to the configuration.xml file, are these somehow automatically available in the "InstallConfiguration" object?

I hope I get done something quite soon.

Coordinator
Jan 25, 2011 at 1:37 PM

I don't know the answer to your question. Currently this is done the other way around, as components look their corresponding component html by id. But there's code that sets attribute values by walking the HTML DOM. So I think the approach would be to do the same, walk the html and whenever you see a special tag, replace it. You could also pre-process all HTML on document load. Either will work.

Jan 28, 2011 at 12:36 PM
dblock wrote:

[...] But there's code that sets attribute values by walking the HTML DOM [...]

could you tell me please where it is? I just found out how you save values from e.g. folder selection control to htmlinstaller when switching from one place to another, but for the other way around (set the saved value when you "back" the dialog) I did not find the code you mentioned ... 

 

Coordinator
Jan 28, 2011 at 5:49 PM

See htmlInstaller\SetControlValuesTask.cpp. It starts at an element and walks down recursively calling elt.child(child_index).