Jump to content

Couple small features


ckitching

Recommended Posts

Here's two patches for a couple small features I added to WIHU. The first (and smallest feature) makes WIHU use the description value if it exists for section headers. I added it mostly for consistency, and the fact I was/am considering adding other features that would make use of the section name, and would like to shorten them if I eventually do add them. If you don't use descriptions in your top-level install items, there will be no change. I was thinking of adding some dependancy tests but I'm not yet familiar enough with the code, and it's not nearly as trivial as the additions I've made so far.

The second feature (and patch file) will be in the next message.

WIHU_Section_Description.patch

Link to comment
Share on other sites


The second patch adds a helptext item to install items. I didn't want to litter my filesystem with lots of little RTF files, and the default 'no help' text didn't appeal to me, so I added this. Most of the help text I would add doesn't need any fancy formatting, just a plain text blurb. The syntax is quite simple.

helptext.x.x.x = Help text to appear in the window.

I don't do any escaping of the help text, so if you need a \, type in \\ instead. If you want a line break, type "\par". You can use other RTF code if you're brave, but keep in mind the text length limits.

help.x (external RTF files) always takes priority over any helptext.x you specify, so don't try to combine these.

helptext.patch

Link to comment
Share on other sites

And last but not least, a screenshot and example.

[Mozilla Firefox]
helptext = Firefox 1.0 empowers you to browse faster, more safely and more efficiently than with any other browser. Join more than 16 million others and make the switch today.\par\par Firefox imports your Favorites, and settings, so you have nothing to lose.

description.0 = Mozilla Firefox 1.0
command.0 = Apps\Firefox\Firefox_1.0.exe
test.0.0 = !HKLM:SOFTWARE\Mozilla\Mozilla Firefox\1.0 (en-US)\
test.0.1 = %ProgramFiles%\Mozilla Firefox\firefox.exe?version<1.7.5
test.eval.0 = 1
selected.0 = if.true
disabled.0 = if.false
locked.0 = if.false

description.1 = Firefox Extensions
command.1 = *
selected.1 = 0
test.1.0 = %ProgramFiles%\Mozilla Firefox\firefox.exe?version<1.7.5
test.eval.1 = 0
disabled.1 = if.true
locked.1 = if.true
helptext.1 = All these extensions will be installed globally, but some will not work until disabled and reenabled in each user profile.

Oh, and anyone has permission to use these patches in any way that they like.

post-90-1105521236_thumb.png

Link to comment
Share on other sites

Thank you for this contribution. I added this to my source.

My code is a bit confusing, I have to do a complete rework (c++) some day :blushing:

Of course, I should use some of the MFC/ATL classes. But don't hesitate to add more features or to clean up my code a bit.

Please contact me before to get the most reason source. I had to patch the source by hand because I forgot to upload most recent source last time;)

Benjamin Kalytta

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...