Archive: InstallOptionsEx


InstallOptionsEx
I modified the original version of InstallOptions to add some controls (not supported by all OS, or with others special requirements) and to make some additional changes:

- Removed NumFields from INI File "Settings" section.
- Added Animation and ProgressBar controls.
- Added ability of ComboBox and DropList controls of supporting images for each item in their list boxes.
- Added TRANSPARENT, CENTER and NOAUTOPLAY flags for Animation controls and SMOOTH and VERTICAL flags for ProgressBar controls.
- Added support of NOTIFY flag for Text, Password and ComboBox controls.

This is just beta version, it probably has some bugs and I don't know, I'm not responsible for problems it gonna make, as even it's my first touch in C++.

Included the .dll and its readme.


I'll test it :)

// edit by me


For the next version I'll be targeting the easiest controls to implement, as Trackbar.


It would be cool if it supported the property grid control, very useful for pre-configuration setup....


But one thing can be done even without C++, create an editor of InstallOptions pages which shows the page and edits it at the same time, using the great "Rect" page attribute (where you can assign a page with a part of the resource, if used correctly, it can even show several pages at the same time).

One problem is: how can I unload InstallOptions without going to other pages or quiting the program? Probably the idea of creating a .dll function called "Clear" (as I saw in another modification) would be great to add, but as you know, I don't have that kind of knowledge of how to do it (so help is appreciated here)...


OK! New version beta 2 (5/31/2004):

- Added TrackBar and IPAddress controls.
- Added ability of Button controls of
supporting an image or icon.
- Added BACK_RECT, TOOLTIPS and NO_TICKS flags for
TrackBar controls and BITMAP and ICON flags for
Button controls.
- Added support of NOTIFY flag for IPAddress control.
- Removed TRANSPARENT and NOAUTOPLAY flags for Animation
control.

Included .dll and its Readme.

Main TODO -> Addition of new controls.

Any help to make this plugin even better is accepted at any times.


OK! New version beta 3 (6/7/2004):

- Added DateTime and MonthCalendar controls.
- Added UPDOWN flag for DateTime controls and NOTODAY, NOTODAYCIRCLE and WEEKNUMBERS flags for MonthCalendar controls.


Your additions sounds great. How about adding a few samples to your package?


I'm planning it for the next or the following version. I didn't do any until now because I was trying to change more things of it!

Planned:

- Addition of UpDown control. (not attached with other controls)
- Add ability of it to make other controls as its buddy control (UpDown control).
- Remove FileRequest and DirRequest.
- Add flags for Button controls to make it act like same as FileRequest and DirRequest but using a buddy control (don't need to the a Text control). Makes the Text control free to use its NOTIFY flag and the Button control to be user customized.
- Implement NSIS style $\n,$\r and $\t. Try to implement common variables ($0-9 $R0-9) as input and output.

I ever wanted to make that change of splitting FileRequest and DirRequest Text control from the Button control since I discovered: after using those controls, to get a control handle you had to use a control number different than the InstallOptions one. Now it will be balanced.


OK! New version beta 4 (6/11/2004):

- Added UpDown control.
- Removed FileRequest and DirRequest controls. Use Text and Button controls instead.
- Added FILEREQUEST and DIRREQUEST flags for Button controls and LEFT, HORIZONTAL and WRAP flags for UpDown controls.
- NSIS $\n, $\r and $\t imported to remove the need for conversions between NSIS characters and plugin's.

This version is about exactly as I planned before (except for the variables thing, I'm trying to implement that).


How about the source code as well? Wouldn't hurt to get it peer reviewed.
A couple of questions-
a) What is the advantage of using NSIS style $\r $\n instead of \r \n?
b) What exactly are you trying to implement for the "variables" feature? I'm a little hazy on that.


I wasn't posting the source because to don't boost much my post count for each version that is launched. Anyways, I posted it below.

(If you see, there are comments of what I added or changed, but I didn't comment removed parts)

a) Because before implementing that, if you would write and/or read Install Options INI files, you had to convert the string from NSIS -> Install Options and/or Install Options -> NSIS to be supportable with one another. For example:

NSIS string: "// NSIS string test \\$\r$\n// NSIS second line \\"

Putting this exact NSIS string into an INI file from Install Options and making it show, it would appear like this:

// NSIS string test \$$// NSIS second line \

So I think this explained it.

2) I don't know why I posted it! I should be saying before "not a good idea" instead of "I'm trying to implement that" by now. Sometimes I paste the information without changes and forget the spelling...:(


Overall, I think this is pretty good. A couple of comments:
a) I still don't see any advantage of using "NSIS" syntax for special characters as opposed to the current "C" syntax that InstallOptions uses. In fact, I couldn't even get the "NSIS" syntax to work. Do you have an example showing how it works? See my attached script. It doesn't seem to work properly.
b) I agree with you, drop the whole "variables" thing. I don't see any advantage in implementing it.


InstallOptionsEx version beta 4 - DLL
a) Fixed. Same version.


InstallOptionsEx version beta 4 - DLL Source
...


OK, I see that you have fixed the "NSIS" style escape characters. But I still don't see the advantage of it.
Either way I have do conversions- whether it uses the "C" style or the "NSIS" style.


As you insist, I'll put a define in the Source Code to use the old "C" style.


Is these any sample to show the new feature?


Hi deguix
,NOTIFY flags in DropList control not work,Can you have a look?


Don't get me wrong- I think you've done a good job. I don't want to insist that you change anything. But if something as basic as the escape character is going to be changed, I think we should see a clear advantage for it.
The other thing of course is that it will not be compatible with MUI.

Another suggestion is to document which OS the new controls do not work on- since you did say that the InstallOptionsEx is not 100% supported by all Windows OS'es.


Is these any sample to show the new feature?
Hmmm... I didn't launch any sample yet, I'm working on one.

Hi deguix
,NOTIFY flags in DropList control not work,Can you have a look?
Yep, it happens when you use the new feature for it: 16x16 Image for each item. This happens because it doesn't use the normal DropList but a modified instead. But I'll try to put the NOTIFY as soon as possible.

Don't get me wrong- I think you've done a good job. I don't want to insist that you change anything. But if something as basic as the escape character is going to be changed, I think we should see a clear advantage for it.
The other thing of course is that it will not be compatible with MUI.
I'm playing on conservative side now. I understand, everyone used "\r\n" way since InstallOptions had the MULTILINE support. I'll go back in that change, but I'll make a define for people who liked this change I made. As a matter of fact this project continues with the name "InstallOptions" at front of it, isn't it? The discussion of that ends here.

Another suggestion is to document which OS the new controls do not work on- since you did say that the InstallOptionsEx is not 100% supported by all Windows OS'es.
Thanks for the suggestion, I'll put this on the next version of InstallOptionsEx.

Isn't the problem with NSIS style escaping that NSIS converts them before writing to the INI file using WriteIniStr?


Ohhh :eek: ... that's why he doesn't see an advantage of that... How I am stupid! I have to punch my face after that. Anyways, I was going to back up that change...


Yep. The NSIS style escaping works if the text is already in the INI file. However, if you want to dynamically write to the INI file, you will have to convert everything.
Thanks Joost for explaining it better than I could.


InstallOptionsEx version beta 5 (before next version launching) - DLL
Just to fix that, I made a version "before the launching of the next version". But I made some small additions that will have in the next version:

- NOTIFY flag for MonthCalendar, DateTime and UpDown controls.
- Returned to old "C" style escape characters.

These changes are undocumentated.

I'm making this version because of the full week of school work on me (because the school year is ending) and the final tests. Next version is planned to be launched next week (after Tuesday).


InstallOptionsEx version beta 5 (before next version launching) - DLL Source
...


Thanks deguix,I like this EX version very much.


If you know, Ex is for "Expanded". Generally I did put for my functions the "Adv" for "Advanced". I just didn't put "Adv" on the plugin name because it doesn't have dramatic changes comparing with the normal InstallOptions. It just adds more controls and new features.


InstallOptionsEx version beta 5 - DLL
- Added HotKey control.
- Added support of NOTIFY flag for MonthCalendar, DateTime, UpDown and HotKey controls.
- Added information to controls and options their minimum supportable OS.
- C style escape characters restored again.
- Fixed problems with new controls about the TabStop not working.

HotKey control doesn't have a 100% correct translation Input->Control-Control->Output: If you type "Ctrl + +" as input it will convert to "Ctrl +", and if you type some keys that I don't know their VK_ names (like some numpad keys) it won't output these. But for most of the keys the control will work correctly.


InstallOptionsEx version beta 5 - DLL Source
...


I found that droplist can not list item,but InstallOption can.


What do you mean by that?


This same code in here: http://forums.winamp.com/showthread....24#post1399824
When change InstallOptions:: to InstallOptionsEx:: the droplist items missing.


Everything is working fine for me.

InstallOptionsEx v.2.4 beta 5
NSIS 2.0 -> latest development snapshot
Windows XP Home Edition -> latest updates

What InstallOptionsEx, NSIS and Windows version do you use?


InstallOptionsEx v.2.4 beta 5
NSIS 2.0 Specail(Open LogSet command)
Windows Server 2003 Simplified Chinese

I upload the script and exefile here,would you have a look what wrong for me.


Remove Text=DropList lines inside your .ini file for now.


OK.Thanks deguix,the ini file create by HM NIS Edit,I forgot this.


could you put an example which one sees all the possibilities?

thank you


If I do it now, I have to change it for every version I launch as you know that it's a beta version. When it becomes stable I'll do one. This is not the right time to do that.

Now, about the changes for the next version, I've done some fixes to it, like that one from bluenet. But I'm not giving more details on it right now.


OMG .. that's some nice shit ^^


Archive: InstallOptionsEx


Originally posted by deguix
If I do it now, I have to change it for every version I launch as you know that it's a beta version. When it becomes stable I'll do one. This is not the right time to do that.

Now, about the changes for the next version, I've done some fixes to it, like that one from bluenet. But I'm not giving more details on it right now.
*


ok, thank you !! :up:

InstallOptionsEx version beta 6
Ok, next version planned (and almost done) changes are:

- Support for changing font and colors of controls (which gives a wide range of commands). This is quite limited, but at least it gives a better look w/o using NSIS itself. Some controls that don't support this because:

> Windows Themes can sometimes fill completely controls (Button).

> Some controls don't call WM_OWNERDRAW or WM_CTLCOLORS* or don't have messages to change the colors or font (IPAddress, HotKey, UpDown, TrackBar, RadioButton, CheckBox, GroupBox).

> ComboBox + ImageList = Special drawing (ComboBox /w Images).

- Fix that problem I already said in older posts.
- Fix the cutting of controls when its "right" or "bottom" values that are bigger than rectangle's.
- Small bugs from last version.

This version will appear here soon.


InstallOptionsEx version beta 6 - DLL
- Added a wide range of commands for setting initial color and font formatting without using NSIS commands.
- Fixed the control extention beyond the rect height and width. This makes the control to resize itself when necessary.
- Added file verification before setting a bitmap or icon to DropList , ComboBox and Button controls.
- Fixed a stupid bug that made some controls flags to be set when you did not specify them.
- Fixed another stupid bug that made ProgresBar controls to do not show their indicator bar correctly.
- Added one laking information about the standalone keys for HotKey controls.
- Fixed other minor bugs.

Yeah, it has more fixes than I expected yesterday. By using the ProgressBar control I found 2 serious bugs.

Now what I expect for the next version is an appearance of the powerful RichText control (used by the actual NSIS license page) and more fixes as it is in a beta version. Any bug you find is very important to me.


InstallOptionsEx version beta 6 - DLL Source
...


OMG This is neat! Thanks for all your hard work!

Cheers

-Stu


Hummm... Did you test it? I see 0 downloads up to now and you already commented...


I've got it now :)

I couldn't try it as I was at work :/

-Stu


Oh, no problems.


have you thought of including lobo's tooltip plugin into IOex? would be a lot work less, if one could simple put the tooltip-text into the ini-file of a io-page.


Another thing you would say is to include lobo's dialogs plugin into it.

Yes, I can include those additions, but you have to wait a while, since I'm working on other projects at the same time.

Just a question to lobo first. What are the control ID's of your tooltips? (if you know, tooltips are the same as normal controls)


Oh, I forgot to tell about some IOEx new features not mentioned in the documentation:

- You can specify the height and/or width of a control using the Height and/or Width INI value names. They are used instead of Right and/or Bottom INI value names.

- ListItemsHeight INI value name adjusts the height of each ListBox, ComboBox and DropList item. It's mentioned on the documentation from other INI value names, but it's not directly included.

If I forgot them, probably they are not even tested fully. Can you all test these for me?

(If it's better than I thought, what else good can be waiting for me now?)


(If it's better than I thought, what else good can be waiting for me now?)
One thing good that I discovered on this time that passed is that InstallOptionsEx first versions had the fixes of the InstallOptions 2.5 already (even MUCH before the time), so people who used this didn't have the Next button problem since beta 1.

Now the bad things: several bugs were found on the code, including one critical that DISABLED controls which were added the font and/or paint features didn't draw correctly. And there are some others which I don't want to comment right now.

Apparently now I have an image of ever doing buggy projects without testing fully (yeah, even StrFunc.nsh has one, but much less apparent than IOEx). If you see most of my older functions you can see 2 or 3 bugs each... I'm much more lucky with projects outside NSIS though where you can't find them easily.

(You can now see the list of projects I'm working now and to work after on my signature)

I wanted to make a small modification on ListBoxes when I'm fixing the "DISABLED controls not drawing correctly [sometimes]". I would like to change the colors of selected and deselected items of a DISABLED ListBox by default. I don't like the actual default IO's colors because sometimes you can think that a ListBox is enabled, but it's really disabled.

On the image the:

- Left DISABLED ListBox is from InstallOptions
- Right DISABLED ListBox is from InstallOptionsEx

The image:


Tooltip is a good feature, I hope beta 7 would include it.Thanks deguix's work. :)


Hummm... I don't have a defined plan for the next version, but yeah, I'm thinking on some plugins combinations with IOEx for the future:

- Dialogs and tooltips -> additional dialogs and tooltips support.
- Banner -> creation of dialogs not based on resources (it's not really true but I have this idea when looking at it), timeout, extented NOTIFY for running NSIS codes when the dialog is being shown.
- AdvSplash -> Alpha Blending, extended timeout, extended NOTIFY for running NSIS codes when a click is made to the image, modeless dialog boxes, special effects when showing window (it's not really true but I have this idea when looking at it).

...

About NOTIFY flag: I'm planning to change a little bit the way NOTIFY flags are handled:

- Create another INI value name for "Settings" page called "Notification" (or something like it) where you can get the type of the notification being sent by a control.

- Each field will have an additional INI value name called "Notification" where you can set the notification flags you want for the control.

What do you think of this?


Hummm... I don't have a defined plan for the next version, but yeah, I'm thinking on some plugins combinations with IOEx for the future:

- Dialogs and tooltips -> additional dialogs and tooltips support.
- Banner -> creation of dialogs not based on resources (it's not really true but I have this idea when looking at it), timeout, extented NOTIFY for running NSIS codes when the dialog is being shown.
- AdvSplash -> Alpha Blending, extended timeout, extended NOTIFY for running NSIS codes when a click is made to the image, modeless dialog boxes, special effects when showing window (it's not really true but I have this idea when looking at it).

...

About NOTIFY flag: I'm planning to change a little bit the way NOTIFY flags are handled:

- Create another INI value name for "Settings" page called "Notification" (or something like it) where you can get the type of the notification being sent by a control.

- Each field will have an additional INI value name called "Notification" where you can set the notification flags you want for the control.

What do you think of this?

What I already done for InstallOptionsEx 2.5 beta 7:

- "Fixed the control extention beyond the rect height and width. This makes the control to resize itself when necessary." change removed. It's quite useful to have a way to do not show controls to the user sometimes...

- Fixed "Text" and "ListBox" control w/ DISABLED flag: Didn't redraw right.

- Added missing features which documentation from last version didn't mention.

- Added "FontName" INI value to all known controls that support font changes.

- Added "Dis*" commands for "ListBox" controls which enables to set colors for DISABLED controls.

- Added a new flag to "CheckBox" controls, the old and famous "3STATE" flag that allows you to set additonally an indeterminated (or grayed) state.

- "ListItems" for "Button" controls w/ "DIRREQUEST" flag is the text which appears above the Tree-View control of directories.


InstallOptionsEx 2.41 beta 7 - DLL
This version brings a new system for control notifications. I'll explain a little bit how it works. Let's have an example INI file to start:

[Field 1]
Type=ComboBox
Left=0
Top=0
Width=100
Height=400
Notify=ONTEXTCHANGE

[Field 2]
Type=Button
Left=110
Top=0
Width=50
Height=12
Notify=ONDBLCLICK|ONKILLFOCUS
State=C:\MyDir

You can see there is a new INI value name for each field called "Notify", with this you can use notification flags for each control. I made the flags to be supported for more than one control to make easier the use of them. This INI value name is used for notification flags that, when the user does the action, triggers the calling to the validation function.

On the first field, there is a "ONTEXTCHANGE" notification flag which makes the plugin call the validation function after the text is changed by the user and after it appears on the screen.

On section "Field 2", there is "ONDBLCLICK" which makes the plugin to use "ShellExecute" and the text specified by "State" value (this is special for Buttons and Links). And there is a "ONKILLFOCUS" which is when a control loses focus.

Now, when for example the first field receives focus it won't call the validation function. Why? You didn't specify it to do it, so you change it to:

[Field 1]
Type=ComboBox
Left=0
Top=0
Width=100
Height=400
Notify=ONTEXTCHANGE|ONSETFOCUS

And now there is another addition to this system. After a control called the validation function it records what control did call it and the action the user did to the control:

[Settings]
State=2
Notify=ONTEXTCHANGE

This could be different if another action from the user is made:

[Settings]
State=2
Notify=ONSETFOCUS

As you saw, I added ONSETFOCUS and ONDBLCLICK and some other notification flags that the normal NOTIFY flag couldn't do. I made some other changes, so let's see them all:

- Rearranged control notification system:
- - Added Notify value name for "Settings" and "Field #" sections.
- - Added: ONSETFOCUS, ONKILLFOCUS, ONLISTOPEN, ONLISTCLOSE, ONSELCHANGE, ONTEXTCHANGE, ONTEXTUPDATE, ONCLICK, ONDBLCLICK, ONTEXTTRUNCATE, ONTEXTVSCROLL, ONSTART and ONSTOP notification flags.
- Added BackShow, NextEnabled and NextShow for "Settings" section.
- Fixed the control extention beyond the rect height and width addition of the last version removed.
- Fixed Text controls: "black" color was being set even when you didn't.
- Fixed ListBox controls: didn't appear as they were disabled.
- Added missing features to the documentation which last version's didn't mention.
- Added FontName for Label, Link, ListBox, ComboBox, DropList, Text and Password controls, DisBgColor, DisTxtColor, DisSelBgColor and DisSelTxtColor for ListBox control.
- ListItems for Button controls w/ DIRREQUEST flag is the text which appears above the Tree-View control of directories.
- Added a new flag to CheckBox controls, the old and famous "3STATE" flag that allows you to set additonally an indeterminated (or grayed) state.


InstallOptionsEx 2.41 beta 7 - DLL Source
...


wonderful£¬Thanks deguix, I have a test.


On the next version I'll add ToolTips support (which is halfway done) and much less fixes because most of them I fixed on the last version...

Some more additions comparing with Lobo's ToolTips plugin are the ability to change text and background colors of ToolTips, additional flags, notifications? (thinking, not planned) and multiline support (searching for information).


InstallOptionsEx 2.41 beta 8 - DLL
I added the ToolTips feature to InstallOptionsEx in this version. See an example for INI file using all ToolTip value names:

[Field 1]
Type=Label
Left=0
Top=0
Width=100
Height=10
Text=Default Options:
ToolTipIcon=INFO
ToolTipTitle=Default options
ToolTipText=Makes the program to select all the default program options
ToolTipFlags=BALLOON
ToolTipTxtColor=0xFFFFFF
ToolTipBgColor=0x009900
ToolTipMaxWidth=300

ToolTip features:

- ToolTip types supported: Normal or Balloon.
- Colors of tooltips can be changed.
- Balloon tooltips are supported for those who have IE 5, for all Windows versions.
- Multiline is halfway supported. It does not supported escape characters, but there is ToolTipMaxWidth that makes the ToolTip to break lines when it does reach the width limit.
- XPStyle makes the Balloon tooltips icons to have a better quality.

ToolTip notes:

- ToolTips disappear when you click on their controls.
- Tracking and In-Place ToolTips aren't supported right now.

Changes comparing to the last version:

- Added ToolTips feature -> Added ToolTipText, ToolTipFlags, ToolTipMaxWidth, ToolTipTxtColor, ToolTipBgColor, ToolTipIcon and ToolTipTitle value names.
- Fixed DISABLED ComboBox and DropList controls bug: Didn't redraw right.
- Fixed DISABLED ListBox controls bug: User specified colors didn't apply.


InstallOptionsEx 2.41 beta 8 - DLL Source
...


nice work!


I uploaded plugin's Archive page here.

(Comm@nder21, two of the links in your signature are broken or going to wrong pages.)


It seem a bug. When disable a text contrl, the text not change to gray. Link contrl can not "ExecShell" a file that local in some directory.


thanks, deguix, fixed :)


When disable a text contrl, the text not change to gray.
I can't reproduce this bug. You have to say what IOEx version you are using, and if you're using XPStyle on or off.

Link contrl can not "ExecShell" a file that local in some directory.
Local directory = where the application is. If that file you specified doesn't exist, it won't work.

When using this with the Modern UI my Welcome and Finish pages are not displayed correctly.

The background of the window is gray, and the background of the text is white.

What am I doing wrong?


I make a sample to show this. When click the checkbox and link you can see the two problem. Sorry my wrong, contrl is a Label not a Text.
The version is beta 8.


Fixed both on beta 9. (Deliverator's and bluenet's)


InstallOptions 2.41 beta 9 - DLL
Mostly, this is a bug fixing version of IOEx from the older versions additions:

- Fixed DISABLED Label controls: didn't draw shadow.
- DISABLED Label and Link are now controls supported by DisTxtColor value name.
- Fixed Label and Link controls: didn't draw background color on the entire control.
- Shadow Text feature added. Added TxtShwColor, DisTxtShwColor, SelTxtShwColor and DisSelTxtShwColor.
- FIRST DLL optimizations: 0.5 kb smaller on decompressed build (no change for compressed build).
- Fixed text positioning of ComboBox, DropList and ListBox controls. They are now closer to the control border.
- Fixed focus rectangle not appearing on ComboBox and DropList.
- ListBox, ComboBox and DropList controls have automatic word ellipsis.
- FontOrientation and FontEscapement removed - because most of the drawing commands do not support this feature.


InstallOptionsEx 2.41 beta 9 - DLL Source
...


I have needed flash support (for short guides) in my installer's for a while but not able to code it. Could support for this control be added to InstallOptionsEx so we have the flash option. If not could someone please assist in creating a plugin for this purpose. Thanks in advance for any assistance.


This I'm doing is just the beggining. It's better you to create a plugin for that.

I've just added some Windows controls because they're from the Operational System. Adding too many custom controls on one plugin makes its size to explode. (that's why exists an item on TODO list saying about implementing custom controls -> separated sub-plugins for IO)


Hi deguix!
Can you have a look here?
http://forums.winamp.com/showthread....67#post1459067
Do you think I can resolve my problem with your modified version of installoptions?
Thank's in advance.
dilox


No. When I thought of it, people were only against this feature.

I put things on InstallOptionsEx depending on how many people would like the feature included and their reasons (not totally true but...). I only heard against, so I didn't include it. If you wanna this now, maybe it's still possible...

When there is too much request on one thing, I become estimulated (!) and then I do it, depending if I do know how to do it (there are sometimes problems with knowing something, as I only started coding with C when I modified IO, so common "C" mistakes are done).


Ok.. but why people are against this feature? I think the possibility of inserting variables and codes into file .ini and having default value (and other kind of value) not fixed but variable, are great opportunities.
I don't know if and how it's possible to realize that in C.
I only hope you put this feature in your to-do list as soon as possible
:)
Bye, dilox


I'm not working on InstallOptionsEx right now but if I can I'll try to implement that. Ok?

[EDIT]Now you know that I keep editing even much after I posted the original post. I wasn't expecting your answer right now...[/EDIT]


Sincerly I don't understand what you mean, can you explain me better?
The problem is that if you make any changes to the installoptions file (through code, writeinistr, etc..) then you have to recompile the file .nsi that include it to see modifications to take effect. :(
You can not parse custompage during runtime.
Is this an unsolveble problem?
Hope don't...
Bye, dilox


The problem is that if you make any changes to the installoptions file (through code, writeinistr, etc..) then you have to recompile the file .nsi that include it to see modifications to take effect.
1) You didn't understand what "Variables" feature I'm talking about (but I never explained so I'll do it now):

You put a common variable ($0-$9, $R0-$R9) as text or state of a control and it will convert the variable into the actual contents of the variable at the time a page is reserved, showed (w/o reserving it) or updated by controls notifications.

2) About writting not taking effect until the next compilation:

The plugin reads information from the INI file everytime you reserve a page or show it directly (w/o reserving it). If the INI file is not updated at all if you try to change it before the reading of the INI file by the plugin, it's not my problem, but a scripting problem of yours.

As I don't know how your level of NSIS knowledge is, I'll explain the scripting problem:

If you use Modern UI and you are using the default way of including a custom page under the installer, use !insertmacro MUI_INSTALLOPTIONS_WRITE instead of using WriteINIStr. If you use Win9x, use FlushINI before and after writting to INI files.

Archive: InstallOptionsEx


l


Thank's for better explanations and for tring to implement this new feature! Have a good job! ;)
Bye, dilox


Sorry, when I keep editing posts generally the original post is rude. I try to make it less rude the more I edit, but sometimes it continues rude. This probably will change when I know totally how to benefit from the English language, so I can make more post editions before posting making it not hurt anyone...

Thank's for better explanations and for tring to implement this new feature! Have a good job!
I won't do this right now. See on my signature that I have much work to be done besides IOEx...

Hi, is these possible add a feature that Button Flags FILEREQUEST can select multi files?


is these possible add a feature that Button Flags FILEREQUEST can select multi files?
Hmmm... I don't know what to say. I'll have to see when I come back to IOEx development. (See my signature)

The file open dialog can only select one file, some time I want to select mutli files, how can I do that?


I understood your question. However I do not know right now how to do it (I actually heard a little about this but not enough). I'll only see it when I go back to IOEx development. Please, be patient until then.


I was looking lately though source codes from GUI's builders made for other programs so that I can get some knowledge from them. An example is the automatic control positioning. However as I'm not working on IOEx now, I cannot verify them right now.


I've discovered when adding a new feature that enables you to choose which character to use on password masking (hehe, couldn't resist :)), flags not even mentioned on InstallOptions (original) documentation:

- PASSWORD for Text controls (same as Password controls).
- DROPLIST for ComboBox controls (same as DropList controls).

I think this information should be added to IO docs, because even the unmeaningful things can mean something to someone. It's just a simple thing anyways...


Those are for internal usage of InstallOptions.


Yeah, I know... As those can be used externally as well, I will add them to IOEx documentation.


another suggestion: seperation lines for the droplist dialog


OK, added to the TODO list.


InstallOptionsEx 2.41 beta 10 - DLL
The greatest addition here is the variables support for ANY value of a value name. It can even be used several times on the same value. Get a look at the list of changes below:

- Fixed VSCROLL flag: wasn't supported by ListBox controls.
- Changed flag name: HORIZONTAL to HSCROLL.
- Mentioned PASSWORD for Text and DROPLIST for ComboBox controls on the documentation.
- Added new feature to Password controls: Password mask character (see Text INI value name).
- Added new features to Icon controls:
- Supports getting icons from executables, and dlls (see Text and State INI value names).
- Supports default Windows icons (see State INI value). Options: APPLICATION, EXCLAMATION, INFORMATION, QUESTION, STOP and WINLOGO.
- Added variables $0-$9, $R0-$R9 support before reserving or showing without reserving pages. It is supported on every value of a value name and can be used multiple times on the same value.


InstallOptionsEx 2.41 beta 10 - DLL Source
...


InstallOptionsEx 2.41 beta 11 - DLL
The most important fix for this version is that all font related commands works for all control types. See what changed this version:

- "Flags" INI value optimizations:
  - Removed the "not useful" BACK_RECT, NOTODAYCIRCLE, TRANSPARENT and CENTER flags. The second flag effect is implemented with NOTODAY and the last flag is implemented to the Animation control normal functionality.
  - Removed VERTICAL flag. Use VSCROLL instead.
- Fixed ComboBox and DropList controls: Disabled controls now have their text on the right color by default.
- Fixed ListBox controls: Focus boundary rectangle wasn't being drawn.
- Font INI value names are now supportable by all controls.
- Fixed Link controls: They are underlined by default except when FontUnderline=0 is set.
- Changed importance level of Height and Width. Now if Right is specified, Width is ignored, and if Bottom is specified, Height is ignored.
- Fixed "Back" button appearance: It should appear only after the first page.
- Changed State and Notify INI value names from Settings INI section:
  - Fixed: State had the value of 0 and Notify didn't even appear when OPEN_FILEREQUEST, SAVE_FILEREQUEST or DIRREQUEST were used on a Button control.
  - As the appearance of these INI value names are imminent: If State = 0, the page returned a notification. If Notify = ONNEXT, ONBACK or ONCANCEL, the user clicked on next, back or cancel buttons, respectively.


InstallOptionsEx 2.41 beta 11 - DLL Source
...


InstallOptionsEx 2.41 beta 11 (Public Build #2) - DLL
There had a bug that was appearing since beta 10 (when I implemented the variables) which made the "0" on values for INI value names useless. That means, the code treated it like the default value. I fixed this on this "before-the-next-release" version because this affects all commands that transform the value into an integer (mostly those with "0" and "1" as options).

This version only contains this fix as the difference between the original version.


InstallOptionsEx 2.41 beta 11 (Public Build #2) - DLL Source
...


In the future versions I'll focus more on the real-time acquirement of information from INI files. That means, the page will change everytime you change something on the INI file at run-time.

This will bring real advantages against the original InstallOptions:

- You could adjust the page controls without needing to show the page again.

- You woudn't need the System or other plugins just to change a control appearance. Hence this would help a lot those who are learning NSIS and don't know System plugin and experts who have a lot of codes for run-time actions.

- You could use an editor to do the first touches on an INI file and make final adjustments yourself afterwards with InstallOptionsEx easily, without the need of reshowing the page every time you want to do a change on the page.

- I could create new abities without worrying if the user could change them at run-time. For Example: Now you can't use WM_SETTEXT to set the text of a label because it's being drawn internally by the plugin. If I add this, you could change it, and even the shadow colors...


Bug inleave Function?
Sorry for bothering you again with installoptionsex, but i guess i found a bug.

I used the leave function for notification checks, but the Value "ONNEXT" in the Settings Sections is only filled if the page is destroyed. Every check and abort in the leave function led to an empty value, but as i re-read the variable in the instpage i noticed, that "ONNEXT" was written within. You should change the check to let the people abort if neccesary from within the leave function.

Tested with Build 11.2

Regards

flizebogen


Thanks. Fix already prepared for the next version.


For the next version, I also fixed icon problems based on their sizes, and added ability to support cursors and animated cursors. This time I warned about this because someone wanted it fixed.


InstallOptionsEx 2.4.1 beta 12 - DLL
The greatest thing this version is the ability of updating pages when they're running. On the best side, it makes every feature of IOEx available without the knowledge of System plugin. On the other, it allows anyone to update it by hand, so it's better to secure it for now. It's basic for now. Now take a look on the other changes in this version:

- Added the ability to update the page when showing it. (There are still bugs to be fixed here.)
- DLL size reduced to 13.5kb. Increased speed to load pages by fixing internal memory leaks.
- Flags INI value name optimizations:
- - Added MULTISELECT flag for Button controls.
- - Fixed FILE_EXPLORER flag: had effect similar to HSCROLL flag.
- - HSCROLL and VSCROLL flags support for Button controls was removed.
- New documentation (which will be improved more in future versions).
- Removed HotKey control, for optimization purposes.
- Removed a ComboBox feature of setting images for each list item. It already had lots of problems since its inclusion.
- Fixed Icon controls: Didn't use the right icon size when told to do so.
- Icon controls additionally support cursors (*.cur) and animated cursors (*.ani).
- Fixed DateTime and MonthCalendar controls: Not enough space on buffers, changed date and time format.
- Made the focus rectangle on Link controls to occupy the control rectangle border, not the text rectangle border.
- New lines work again on Link controls.
- Fixed documentation: MonthCalendar controls can have a State INI value.

Another thing: The new documentation doubled it's size when not in a zip file but it was dramastically reduced inside one (interesting...). So that means, only 1 file for both the plugin and source.

As it uses the expand/collapse feature, you have to enable ActiveX to see it correctly. Please, warn me if there are any problems w/ the readme. If there are enough problems, I'm going to return to the old one.


Hello deguix and thanks a lot for this very useful plugin. But i have a little problem since the beta 11 and always with the beta 12, when i use a link control it does not launch the link but open a dirrequest window, i tried everything but i cant get it work, i tried to use notify=onsetfocus and it opens a dirrequest window and then loads the link... I dont understand.

Can you please help me

[Field 2]
Type=Link
Notify=ONCLICK
Left=23
Right=61
Top=0
Bottom=10
State=http://www.dfsfddsf.tk/
Text=dfsfddsf


InstallOptionsEx 2.4.1 beta 12 - DLL
Whooops! I was testing the Link controls just before launching the new version that appeared right next to my eyes and I was still not seeing it! Thanks, fixed. Same version.

Can you find more? If so, I'm going to still use the same version if they are quick to be fixed like that one.


problem with buttons
Hello i get another problem with the new beta 12 version, i use a button to quit my app and one to go to a section, and when i clic on these buttons it opens a browser window instead of executing the actions. I think the problem is that the ini state setting doesnt get updated when i clic on the buttons and i dont know why, i use a third button with a open_filerequest flag and this one works.
Do you have a idea of the problem?

here is my ini :

[Settings]
CancelShow=0
NextShow=0
BackShow=0

[Field 1]
Type=Label
Left=62
Right=70
Top=0
Bottom=10
Text=le

[Field 2]
Type=link
Text=gdsgs
Notify=ONCLICK
State=http://www.dfsgfsgfsd.tk
Left=23
Right=61
Top=0
Bottom=10

[Field 3]
Type=Label
Left=10
Right=-70
Top=20
Bottom=30
Text=install folder:

[Field 4]
Type=Link
Notify=ONCLICK
Left=190
Right=-1
Top=20
Bottom=30
State=
Text=

[Field 5]
Type=Text
Notify=ONTEXTCHANGE
Flags=READONLY
Left=10
Right=-10
Top=30
Bottom=42

[Field 6]
Type=Button
Text=Browse
Notify=ONCLICK
State=5
Flags=OPEN_FILEREQUEST|FILE_MUST_EXIST
Filter=
Left=164
Right=218
Top=65
Bottom=79

[Field 7]
Type=Icon
Left=190
Right=-1
Top=-0
Bottom=0

[Field 8]
Type=Label
Left=10
Right=65
Top=0
Bottom=10
Text=Par


[Field 9]
Type=Label
Left=71
Right=120
Top=0
Bottom=10
Text=

[Field 10]
Type=Button
Text=Quit
Notify=Onclick
Left=82
Right=136
Top=65
Bottom=79

[Field 11]
Flags=Disabled
Type=Button
Text=Patch
Notify=ONCLICK
Left=0
Right=54
Top=65
Bottom=79


I Problem with the Validation Function in the previous beta isn't fixed but changed.

Now the Value "ONNEXT" is written everytime. Even if i simply click on a Button which acts as a Filerequest.

One note to the new docs. The collaps / expand feature is very nice but you should add an "expand all" button, for easier searching / printing.


InstallOptionsEx 2.4.1 beta 12 - DLL
The buttons bug is (I think) fixed now. (As I should say, a stupid bug caused by the previous build fix)

For that suggestion about "collapse/expand all": I'm going to do that next version as I have to come up with the code.


Thank you
Thanks a lot, it works great now.


My problem still exists.


InstallOptionsEx 2.4.1 beta 12 - DLL
Now I fixed yours (try it please).


do you plan to add more examples to the documentation? i tried to use the tooltips, but failed miserably :p


Found two problems.

1. When i have a field with type=Password and i don't specify "Text=*" it crashes the installer.

2. I have 30 controls on my form and there are 2 checkboxes with notify ONCLICK method on them (I want to catch when the status of checkbox is changed). I could not figureout why but sometimes when I click on one of those checkboxes the form "blinks". It did not happen with original InstallOpptions.dll

+ I have a problem: I have two editboxes on the form. One is enabled so user can enter data into it and another one is disabled. I need to get the behaviour when a user types something in the 1st editbox so that string is copied to second (disabled) editbox. I managed to put ONTEXTCHANGE flag and catch the change and to read the string from the control, but it won't to accept the string in the second disabled editbox when I write it there. Any ideas why it can happen?

Thanks in advance!


Have you tried
GetDlgItem $R0 $hwnd 20xx
SendMessage $R0 "${WM_SETTEXT}" 0 "STR:Text"

$hwnd is from using InstallOptionsEx::initDialog /NOUNLOAD "ioFile.ini"
20xx is control ID (1200 + Field number - 1)

-Stu


Originally posted by Afrow UK
Have you tried
GetDlgItem $R0 $hwnd 20xx
SendMessage $R0 "${WM_SETTEXT}" 0 "STR:Text"

$hwnd is from using InstallOptionsEx::initDialog /NOUNLOAD "ioFile.ini"
20xx is control ID (1200 + Field number - 1)

-Stu
I tried it... did not work for me :(

Works fine here (using InstallOptions.dll)

InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\dlg"
Pop $R0

GetDlgItem $R1 $R0 1201
SendMessage $R1 "${WM_SETTEXT}" 0 "STR:Some text"

InstallOptions::show
You need to move it to the Leave function though of course (the GetDlgItem + SendMessage)

Make sure you !include WinMessages.nsh too

-Stu

Originally posted by Afrow UK
Works fine here (using InstallOptions.dll)
InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\dlg"
Pop $R0

GetDlgItem $R1 $R0 1201
SendMessage $R1 "${WM_SETTEXT}" 0 "STR:Some text"

InstallOptions::show
You need to move it to the Leave function though of course (the GetDlgItem + SendMessage)

Make sure you !include WinMessages.nsh too

-Stu
this code is in the leave function and it works perfect for the checkboxes (except that blinking effect). WinMessages.nsh is included (needed to add a few defines myself though). At this moment that blinking thing is major for me if i dont find a way to fix it i'll need to go back to InstallOptions. :(

An example script showing it happen should help deguix fix it.

-Stu


Originally posted by Afrow UK
An example script showing it happen should help deguix fix it.

-Stu
Man! I found it! :) THANKS for your help! :)

I just did not know that "STR:" plays any role at all.... I thought it's just a "test" string you guys use....

I'm going to update my install script... I'm 99% sure the whole thing will be alright now.

2deguix: Man, You rock! Keep up the great work! :)

Archive: InstallOptionsEx


Ok.... I have reproduced blink effect.... Please see the scripts in the attachment. If you click "Use Win Auth" checkbox on the Profile DB group you'll see that blink. The second checkbox on PDM DB tab works just fine. The only difference is:


StrCmp $0 1 +1 +4
WriteINIStr "$PLUGINSDIR\DBConnection.ini" "Field 9" "Flags" "DISABLED"
WriteINIStr "$PLUGINSDIR\DBConnection.ini" "Field 11" "Flags" "DISABLED"
Goto +3
WriteINIStr "$PLUGINSDIR\DBConnection.ini" "Field 9" "Flags" ""
WriteINIStr "$PLUGINSDIR\DBConnection.ini" "Field 11" "Flags" ""


I need to disable the controls so when user clicks back button and then returns to this page those controls are still disabled.

Thanks in advance!

That blink effect is the page update I talked about which, unfortunately, didn't go well. It's slow because the DLL updates every control (the DLL only knows that the INI file has changed). Maybe a solution would be creating a new DLL call so you can inform what INI value name from a control changed in the INI file.


Basically I don't mind extra code in my install script to prevent this problem. I'm pretty far from C++ language (did not touch it for a few years) so I think you'll better make a decision based on your experience. :)

Thanks for the hard work man!


InstallOptionsEx 2.4.1 beta 13 - DLL
Toopak: Your bug is fixed. "Page update from its INI file" feature was removed though. At least it won't blink anymore on your pages :).

flizebogen: I also added the Collapse/Expand All feature to the docs. I think you're going to like the speed to load the docs :D.

See full list of changes:

- Added VSCROLL for ComboBox and DropList controls, and READONLY flag for CheckBox and RadioButton controls.
- Text on Button controls is automatically wrapped if there has no sufficient space.
- Label, Bitmap and Icon controls can have Link controls underneath them so the "hand" cursor shows when pointing to those.
- The text of DateTime controls is now aligned to the right when RTL is activated.
- ListBox controls new feature: multiple vertical columns (see Text INI value name).
- Added "Collapse/Expand/Invert All" options to documentation.
- Optimized the documentation.
- Removed "page update from INI file changes" feature.
- Added TRANSPARENT flag for Bitmap controls.

If kichik is going to launch the new InstallOptions next NSIS version (2.05), probably the next IOEx version will be 2.4.2 beta 1 :confused:. I organized IOEx betas like that so I can't revert it anymore (I forgot about that IO could change). But it's still usable :rolleyes:...


Thanks for the changes to the docs, now its a lot easier to search and print.


Print? Wow, what a useful way to read one! Quite interesting...

I was thinking, what would be a great thing to release on 2.4.2 beta 1. New control types, just like I did on 2.4.1 beta 1? Maybe.... With the extra time I got from the blizzard here with 30+ inches of snow (about 75 cm of height), no school for 2 days... :D I think it's a great time to implement TreeView controls isn't :)? But it is difficult because of the grouping of items :confused: (ListItems is in only one line). I don't know if this is a great way to group items in a group...:

I|II{A|B{1|2|3}}|III{A|B|C}

It would appear like:

I
II
+-A
+-B
+-+-1
--+-2
--+-3
III
+-A
+-B
+-C

Is there any other ideas that might be a good solution for grouping items together in one line?


How about:
I|II|>A|>B|>>1|>>2|>>3|III|>A|>B|>C

Basically > makes it step inwards if you know what I mean.
I think this would be easier to use because you don't have to worry about missing a curly bracket off by accident, plus I'm sure it would be easier to parse the string in your source code too :D

-Stu


I'm sure it would be easier to parse the string in your source code too
It's just a little bit harder because the DLL won't know when the group will end or start (like on I|>>1) so it would need 2 extra loops, and also, it would need to record which level each item is being written to. But your idea is still brillant because of the easiness to use.

Resuming both ideas:

"{" and "}":

- Strengths:
--- Small line.
--- The item left to the '{' is always the parent.
--- Fast DLL process.

- Weaknesses:
--- Someone could forget a bracket.
--- Not easily to seen on HM NIS Edit.
--- Difficult to know which level an item is in.

">":

- Strengths:
--- Number of ">" indicate the number of levels the item is.
--- Previous item with a any previous level than the item is the parent.
--- Neatly seen on HM NIS Edit.

- Weaknesses:
--- Big line.
--- Slower than "{" and "}".

Anyone else?

Ah I see what you mean.

I was thinking about placing + to make groups, but that still doesn't tell where a group should end.
I think your original idea would be best.

-Stu


Re: InstallOptionsEx 2.4.1 beta 13 - DLL

Originally posted by deguix
Toopak: Your bug is fixed. "Page update from its INI file" feature was removed though. At least it won't blink anymore on your pages :).
Thanks, man! Works great now! :)

Hey it would be ideal to make some macros to do common tasks like check/uncheck check-boxes, add list-box items and so on (in Leave function).

-Stu


I planned to create a DLL call that warns the DLL about a change on the INI file:

Maybe a solution would be creating a new DLL call so you can inform what INI value name from a control changed in the INI file.
It'll do everything you wish for that can be also changable on the INI file (if that approach works) without even using GetDlgItem. This enables also to use InstallOptionsEx to create more than 1 page at a time (which I don't know how to do at this point), and so it goes on. It's all matter of time... and also a little bit of luck with the weather around here...

As a TreeView control on generally would be compared to the Components page TreeView control, I'm trying to do these things below:

- When you don't have CHECKBOXES flag activated, State INI value only indicates 1 item to be selected.
- When using the CHECKBOXES flag, State INI value indicates the state of every item used on ListItems INI value name.

- Text INI value is the bitmap file where the checkboxes can be located. It's the same format as found on the components page. This is required or the checkboxes won't show. Requires at least: Internet Explorer 3.0.

Maybe I should stop talking about it and do it. :blah:


I was thinking lately about the usefulness of the ValidateText value name. After I included the notification system I don't think it's that useful anymore. You could do the same thing by using a notification like ONTEXTCHANGE, StrLen to verify the length of the string, and a MessageBox to show a string. Do you think I should keep it, or remove it from the next versions? (MaxLen and MinLen will still be usable to support some control abilities)


how to handle buttons ?

i have 2 buttons on my IO and how do i read out which one was clicked ?

it is to mention that these 2 buttons replaces 2 radiobuttons and depending on this it choses different IO pages following thereafter

before:
o bla
o blubb
[next]

after
[bla] [blubb]
(no next)

PS how to open a HLP file from a button like LINK ???


i have 2 buttons on my IO and how do i read out which one was clicked ?
Read the "State" value name of "Settings" section of your INI file using "ReadINIStr". Like:
ReadINIFile $0 "YourPage.ini" "Settings" "State"
But, in order for the page to notify you about button clicks, you have to put a notification flag on the "Notify" value name of the field you want on your INI file. Like:
[Field 1]
Type=Button
Text=Blablabla
Left=0
Right=30
Top=0
Bottom=10
Notify=ONCLICK
it is to mention that these 2 buttons replaces 2 radiobuttons and depending on this it choses different IO pages following thereafter
In this case, you need to use WriteINIStr after the page was shown to change the "Type" value of those fields. Like:
WriteINIStr "YourPage.ini" "Field 1" "Type" "Button"
PS how to open a HLP file from a button like LINK ???
Put the full path location where it's found on the "State" of that link control. Like:
[Field 3]
Type=Link
Text=Click me
Left=100
Right=-1
Top=40
Bottom=70
State=C:\MyDir\MyHelpFile.hlp
You can also put a variable $0-$9, $R0-$R9 to specify the path if you think it's easier:

State=$R9\MyHelpFile.hlp

doesn't work here

[Field 1]
Type=Button
Text=Save
Left=30
Right=130
Top=10
Bottom=30
State=
Notify=ONCLICK
FONTBOLD=1

[Field 2]
Type=Button
Text=Restore
Left=160
Right=260
Top=10
Bottom=30
State=
Notify=ONCLICK
FONTBOLD=1


State of INI [SETTINGS] is both 0
ReadINIStr $BUTTON "$PLUGINSDIR\menu01.ini" "Settings" "State"

  !insertmacro MUI_INSTALLOPTIONS_READ $BUTTON "menu01.ini" "Settings" "State"


doesn't work either
State=$R9\MyHelpFile.hlp


nsis205, latest IOex 2.41b13

The IO is called w/o any PAGE and hast no PRE or LEAVE functions.

The IO is called w/o any PAGE and hast no PRE or LEAVE functions.
That's why it's not working. It has to be read on the leave function. After the leave function, a page notification is always set (like ONNEXT, ONBACK or ONCANCEL) and state will always be 0.

Secondly, remove the empty "State" INI value names from your fields. The plugin will think that you want to execute something and it won't return to the leave function.

Thirdly, the "State" of a Button or Link field is the same thing as the first parameter of the Exec NSIS command. So that means if you are used to run an application like this with NSIS:
Exec "C:\MyDir\MyApp.exe"
You can just put exactly as it appears:
State=C:\MyDir\MyApp.exe

>> That's why it's not working. It has to be read on the leave function

whoops - i should have a closer look to my script (now for 1.5 years - still no end)

> page custom selectaction

Should PAGE end here ?

  InstallOptionsEx::dialog "menu01.ini"
Pop $R0


The button state should be returned state in POP (differs from back next cancel) as well...

... after a while...

ok i managed the leave function.

but now i have next problem:
i have a 3rd button [Go] which selects a language.

if i click there the code behind is working fine but the leave function does not get a new state - exactly: its empty ''
the Go-button return (aborts) back to the IO page which need to be redrawn in new language - nothing happens...


Help-Link - i tried now everything, it still doesn't work

[Field 8]
Type=Link
Text=Online-Help
Left=30
Right=68
Top=120
Bottom=128
State=

  !insertmacro MUI_INSTALLOPTIONS_WRITE "menu01.ini" "Field 8" "State" "$EXEPATH\onlinehelp.hlp"

State, path and file are correct but nothing happens.

let me guess - you have no clue ? :cry:


Don't you mean $EXEDIR or perhaps $INSTDIR not $EXEPATH...

-Stu


sorry - yes - i mask some code ;)

it is: strcpy $B2BPATH $exedir > exepath ^^

later it is
!insertmacro MUI_INSTALLOPTIONS_WRITE "menu01.ini" "Field 8" "State" "$B2BPATH\online.hlp"

but that dont work as mentioned (although ini is ok)


Perhaps you could attach your script.

-Stu


sorry, thats not really possible, only snippets
(it's a 40kb script with many subroutines and lots of
variables and some external language files)

[Settings]
NumFields=8
Title=
BackEnabled=0
BackButtonText=< Back
NextEnabled=1
NextButtonText=Next >
CancelEnabled=1
CancelButtonText=Quit

CancelShow=1
NextShow=0
BackShow=0


[Field 1]
[Field 2]
[Field 3]
[Field 4]
[Field 5]
[Field 6]
[Field 7]

[Field 8]
Type=Link
Text=Online-Help
Left=30
Right=68
Top=120
Bottom=128
State=



strcpy $B2BPATH $exedir
;for testing purpose only cause later the path
;is compared with the real installpath from registry

!insertmacro MUI_INSTALLOPTIONS_WRITE "menu01.ini" "Field 8" "State" "$B2BPATH\online.hlp"

InstallOptionsEx::dialog "$PLUGINSDIR\$LANGSHORTmenu01.ini"
Pop $R0


The next normal IO is fully functional

[Field 12]
Type=Link
Left=260
Right=310
Top=124
Bottom=134
State=Online.hlp
Text=Online Help


... this way or i put the full path+file into it..
but not in IOex.

do you need more information ?

Sorry, I was out of NSIS for a while, and I'm now at my school. But I can see from your code that you forgot about the Notify INI value name for Link and Button controls are always required. Clicks won't work if you don't specify this for those 2 controls. This is considered as a feature.


i just want to set the bitmap for Back, Next, Cancel button .... can you guy tell me how


>> you forgot about the Notify INI value name for Link
i need notify for link ???
Do u want to fool me ? ;)

Displays a static hot text that, when the mouse is passed over its area, the mouse cursor turns into a hand. When combined with Label, Bitmap and Icon controls, this makes their areas also make the mouse turn into a hand, and execute the action of this control. It's better to don't use any text with this trick.
Please update your readme, thanks i reserved the old one
[...]See Notify value name below for more information on notifications.
I'll try...
notify=onclick works without any additional code thx

now the other point - i need to redraw the IO after abort - possible ?

Please update your readme
As IOEx is on betas this is not a thing that is going to be usually done. My priority is more on the plugin itself than docs so maybe some kind of information on docs could be still wrong after changes.

now the other point - i need to redraw the IO after abort - possible ?
That's what I'm trying to do on next versions. Fortunately I'm going to work more on IOEx this week because of the February school vacation.:D

Originally posted by deguix
That's what I'm trying to do on next versions. Fortunately I'm going to work more on IOEx this week because of the February school vacation.:D
Damn, this is my last day today :(

-Stu

If I had school Saturdays and Sundays, and they took off those winter days off and holidays, about more than half of the year would be a vacation. :D (180 days of school in total)


@deguix
thx for help - i did it another way now, not less comfortable

wish you happy holidays :)


Hi deguix

I tried out the transparent flags for BMP and it works! Thanks a lot!

However, the custom page re-draw itself slowly (really slow). I am pretty sure that the flag slowing it down because once the flag removed, the custom page loaded just fine. Is there any work around that I could avoild this problem until next release? FYI, I have 4 BMP on custom page: a background image and 3 images with transpanent flag. Thanks in advance!!


@robber98: I implemented exactly as on original InstallOptions. Try your INI file on it and see if it continues to slow down.

I'm now accepting help including new features to the plugin. If anyone wants to make or made patches for this plugin, think they're useful, and want them to be implemented on IOEx, you're welcome. TreeView is not an easy control to implement (a month passed and still less than 50% of the TreeView is done) and about no features were added besides the control.

I lately added a screenshot of the TreeView control to the IOEx Archive page. It's simple looking now, but I'll try to improve it more in the next days.


Hi,
I'm working on scripts that used installoptions.dll (not installoptionsex) and i've just downloaded and installed InstallOptionsEx and my question is : how to replace the use of installoptions by installoptionsex ?

(I'm using W2000 SPa and NSIS 2.05)

Geo


Have you read the InstallOptionsEx readme?
Place InstallOptionsEx.dll in yor Plugins folder and use InstallOptionsEx:: call.

-Stu


I've read that (sorry but as I'm working on a code I've not done, and the guy has quit the company so many things are confusing for me), I will try futhermore (there're no InstallOptions:: call used in the code).

EDIT : I've changed all InstallOptions:: call by InstallOptionsEx:: call in system.nsh. It compiles, it make InstallOptionsEx properties working (I've tried with NextEnabled=0) but MUI_PAGE_WELCOME doesn't displayed rightly.

EDIT 2 : as written in the doc, I've also try to rename InstallOptionsEx.dll in InstallOptions.dll but the MUI_PAGE_WELCOME doesn't displayed rightly anymore.

To be sure I've understant a main point : InstallOptionsEx is InstallOptions, but developped more deeply ?


Yes.
If you need to use InstallOptionsEx's features, then use it instead of just InstallOptions, else stick with default InstallOptions.

-Stu


EDIT 2 : as written in the doc, I've also try to rename InstallOptionsEx.dll in InstallOptions.dll but the MUI_PAGE_WELCOME doesn't displayed rightly anymore.
That's what I'm planning to next version, try to make support again to the "SendMessage" command on some controls that have been using the "custom draw".

To be sure I've understant a main point : InstallOptionsEx is InstallOptions, but developped more deeply ?
Yes, except for the docs which is not looking that "helpful" right now.

So is it a way to use InstallOptionsEx instead of InstallOptions and having the pages displayed correctly ?

Or should I use InstallOptions and use InstallOptionsEx with some dll call when I need it ? (I can't really figure out how both can works together... :-\ )


In MUI's System.nsh, just use InstallOptionsand in your installer script use InstallOptionsEx. As simple as that.
That means you get two InstallOptions dll's in your installer though.

-Stu


Archive: InstallOptionsEx


It's me again :)

In my custom dialog, I've tried to use InstallOptionsEx but I can't extract the INI file.

With InstallOptions.dll, I was doing that in tne .init function :


Function DlgJvmDetection.onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${INCLUDES_DLGS_DIR}\DlgJvmDetection.ini" "DlgJvmDetection.ini"
FunctionEnd


And I've tried :

Function DlgJvmDetection.onInit
InitPluginsDir
File /oname=$PLUGINSDIR\DlgJvmDetection.ini DlgJvmDetection.ini
FunctionEnd


Function DlgJvmDetection.onInit
File /oname=${INCLUDES_DLGS_DIR}\DlgJvmDetection.ini DlgJvmDetection.ini
FunctionEnd


But I get a "File: "DlgJvmDetection.ini" -> no files found." error in both of the case.

EDIT : Ok, I've look inside system.nsh and solve my problem :

Function DlgJvmDetection.onInit
InitPluginsDir
File "/oname=$PLUGINSDIR\DlgJvmDetection.ini" "${INCLUDES_DLGS_DIR}\DlgJvmDetection.ini"
FunctionEnd



EDIT 2 : I achieve to made all work together :D, thx for your help.
All I had to do is to add two macros (the two I was using with InstallOptions) :
!macro MUI_INSTALLOPTION****INITDIALOG FILE

!verbose push
!verbose ${MUI_VERBOSE}

InstallOptionsEx::initDialog /NOUNLOAD "$PLUGINSDIR\${FILE}"

!verbose pop

!macroend


!macro MUI_INSTALLOPTION****SHOW

!verbose push
!verbose ${MUI_VERBOSE}

InstallOptionsEx::show
Pop $MUI_TEMP1

!verbose pop

!macroend


I've got (a last ?) question : for the moment, I put those macro in DlgJvmDetection.nsi containing the callbacks functions and some functions to go with my custom page INI (DlgJvmDetection.ini).

I will probably have to use InstallOptionEx in other custom pages so what is better :
- to put those macros in system.nsh
- to create a system_ex.nsh containing the macro specific to InstallOptionEx ??

2. Answer:

to create a system_ex.nsh containing the macro specific to InstallOptionEx

Thx for your quick help and advices. The library is done and used.

I've got a new problem. I've got a LINK control, and would like that when clicked, it open an URL with Internet Explorer (to install a program,it needs IE :-\). My main webbrowser is Firefox, and if I just put an URL as STATE value for the LINK control, with notify=ONCLICK , it correctly open the link in Firefox.

In the doc, there is written, for the STATE field option used with a LINK control : "Specifies something to be executed or opened (like "Exec" command from NSIS)."

But I've tried many different syntax but it doesn't work (nothing happens when I click)

(I'm using WriteIniStr in the .pre callback on my custom dialog)

WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Field 10" "State" "Exec '$WINDIR\explorer.exe ${JVM_DOWNLOAD_URL}'"

WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Field 10" "State" '"$WINDIR\explorer.exe" "${JVM_DOWNLOAD_URL}"'

WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Field 10" "State" 'Exec '"$WINDIR\explorer.exe ${JVM_DOWNLOAD_URL}"'

WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Field 10" "State" "$WINDIR\explorer.exe ${JVM_DOWNLOAD_URL}"

Is it a syntax problem (with the " and '), or something else ?

And secondly, does a way to center text in a LABEL control exist ?


Just pass it ${JVM_DOWNLOAD_URL}. You don't need to pass it the path to Windows explorer.

-Stu


The problem is that if I do that, it will open the URL with the default web browser, but I want to force the use of IE.

I've got that in my .ini at execution :


[Field 10]
Type=Link
Text=Windows Automated Downloads
Left=95
Right=292
Top=79
Bottom=87
Notify=ONCLICK
State="C:\WINNT\explorer.exe" "http://www.java.com/en/download/windows_automatic.jsp"


And if I paste "C:\WINNT\explorer.exe" "http://www.java.com/en/download/windows_automatic.jsp" in my windows workplace, it launch IE and open the right page.

Try WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Field 10" "State" '"$WINDIR\explorer.exe" ${JVM_DOWNLOAD_URL}'
or
WriteIniStr "$PLUGINSDIR\DlgJvmDetection.ini" "Field 10" "State" '"$PROGRAMFILES\Internet Explorer\iexplore.exe" ${JVM_DOWNLOAD_URL}'.


It stil doesn't work. What strange is, is that if I take the string in the State field and copy it in the command prompt, the page open in a IE window...


If you set up FireFox as your default web browser (go to Options > General) then it will open URL's in Firefox not IE.

-Stu


That would be the exact problem - the automatic Java installer only works for IE.

You could try to detect whether or not IE is the default browser. If it isn't, change the link to go to the manual install page, http://www.java.com/en/download/manual.jsp.

If your app requires Java to run, you could also detect whether it is already installed (there's a function in the archive), and then use MUI_FINISHPAGE_RUN, although it's probably not the most elegant solution.


And secondly, does a way to center text in a LABEL control exist ?
This is also planned on next versions. EDIT: I'll create 4 more value names called Align, VAlign (for control positionment), TxtAlign, TxtVAlign (for text).

It stil doesn't work. What strange is, is that if I take the string in the State field and copy it in the command prompt, the page open in a IE window...
IOEx uses the ShellExecute function from Win API. It requires the file location to be separated from the parameters on separate function parameters (meaning, separated into "lpFile" and "lpParameters"). So what you're trying to do is not possible right now. InstallOptions also has this problem.

@Pidgeot : I didn't find the function in the archive but developpe my own. It's a good idea to test if IE is the default browser or not, and then choose the url. I will apply this solution.

@deguix : the manuel is a bit confusing cause according to it, what I would like to do seems possible. Do you plan to add this functionnality to InstallOptionsEx ? (for exemple by addind a field in the ini (one for the app to launch and one for the parameters for exemple ??). So it's only possible to put :
- an url
- an exec without parameters
in the State field of a Link control ?


Do you plan to add this functionnality to InstallOptionsEx ? (for exemple by addind a field in the ini (one for the app to launch and one for the parameters for exemple ??).
Yes, but how I still don't know at this point. I gonna figure this out later.

So it's only possible to put :
- an url
- an exec without parameters
in the State field of a Link control ?
Yeah.

OK, i'll keep watching out this topic. Great great job indeed :up:, the whole NSIS stuff.


TreeView control is complete for this version (I'll leave "ownerdraw" style for the next version). IOEx planned release date is probably sometime next week or a week after.

To fix your problem, geoffrey_4js, I'm thinking on spliting the string by an "|". My objective is to make the syntax compact (not so many INI value names).


Your idea sounds good,so we could do something like that :
State="$WINDIR/explorer.exe"|"$URL"


Either i didn't found it in the docs or it's not yet supported:

I have a DropList with a lot of values. Is there a way to make this control editable? My list will never contain all possible values so i want to give the user the chance to enter a new value or chance an list entry.

Any idea?

(Using latest Version dated Jan 22 2005)

regards

flizebogen


You'd need a combo box for editing. I don't know if it's in IOEx (can't check here at college).

-Stu


Thanks, combobox is exactly what i'm looking for and works very well


Your idea sounds good,so we could do something like that :
State="$WINDIR/explorer.exe"|"$URL"
I changed my idea over it. Maybe this new idea will go against the direction which this feature was going, but I now think that it should be removed from IOEx, because there is already a better way to doing that with NSIS (using "LeaveFunction" and Exec command). The same applies for "ValidateText" (using "LeaveFunction" and MessageBox command).

What do you think about it, should I keep those two, or should I remove them from IOEx?

Hello

Is posible works with InstallOptionEx in an IDE like HM Nis Edit?

Thanks in advance


Yes, but you should create "Unknown" controls for controls that don't exist on InstallOptions.


InstallOptionsEx 2.4.2 beta 1 - DLL
Not so many things this version were implemented, but the implementation of TreeView was the feature I spent my time the most. Other big changes were the fix of a bug existant since 2.4.1 beta 10 about Password controls, and the inclusion 4 brand new INI value names for "Field #" INI section. Take a look at the changes:

- Added new control type: TreeView.
- Major Fix: Password controls without a value for Text INI value name gave a fatal error.
- Added new flags to Flags INI value name: CHECKBOXES for TreeView controls, TRANSPARENT for Animation controls (second implementation).
- Removed flags from Flags INI value name: RIGHT for CheckBox and RadioButton controls, LEFT for UpDown controls.
- Added new INI value names for "Field #" INI sections: Align, VAlign, TxtAlign,and TxtVAlign.
- Removed ellipsis support for strings that pass control border boundaries on Label, Link, DropList, ComboBox and ListBox controls.
- Added tab character support for Label and Link controls.
Added carriage return, new line and tab characters support for DropList, ComboBox and ListBox controls.
- Adjusted rectangles of Label and Link controls so that the focus rectangle don't cut part of strings (only Link controls) and have at least 1 pixel of background color on the left and right of the control.
- Right-To-Left dialogs have the UpDown control to invert its position in relation to its buddy control.
- Forgot to mention about NOWORDWRAP flag for Text and Password controls in the documentation.
- MaxLen INI value name for TrackBar controls didn't calculate correctly the maximum number of items. Now if you specify 10, there will be 10 items.
- Aplied patch #1164307.


Would like a "display and continue script" function (for things like showing a trial version nag screen and disabling the Next button for 5 seconds)

-dandaman32


InstallOptionsEx Progress Bar Usage
Hi, I'm curious to see a usage of the progressbar control. What I tried to do was this:


Function MyPage
InstallOptionsEx::initDialog /NOUNLOAD "$PLUGINSDIR\test.ini"
Pop $hwnd
InstallOptionsEx::show
Pop $0

StrCpy $R0 "0"

loop:
WriteINIStr "$PLUGINSDIR\test.ini" "Field 2" "State" "$R0"

IntOp $R0 $R0 + 1
Sleep 25
IntCmp $R0 100 +1 loop +1

cancel:

FunctionEnd


Where Field 2 is a progress bar of course, but I guess that's not the way, because IOEx::show does not return? Any suggestions?

Thanks

You have to use SendMessage to adjust the current position with the message PBM_SETPOS:


!define PBM_SETPOS 0x0402

GetDlgItem $0 $hwnd 1201 ;field # + 1200 - 1
StrCpy $R0 "0"

loop:
SendMessage $0 ${PBM_SETPOS} $R0 ""

IntOp $R0 $R0 + 1
Sleep 25
IntCmp $R0 100 +1 loop +1

cancel:
Or using LogicLib.nsh:

!define PBM_SETPOS 0x0402

GetDlgItem $0 $hwnd 1201 ;field # + 1200 - 1

${For} $R0 1 100
SendMessage $0 ${PBM_SETPOS} $R0 ""
Sleep 25
${Next}
About the docs:

- I found a problem in the new docs where "Notify" INI value name in "Field #" section disappeared. I'm gonna check this out later.

Having such loops block other UI activity by the user, so he can't for example click Cancel. I wonder if it's possible to include

System::Call ${sysGetMessage}
and
System::Call ${sysDispatchMessage}
in the loop, to keep the UI responsive.

I am not totally comfortable with how NSIS handles the message loop, so any ideas?

InstallOptionsEx timer auto-callback
So, due to my complete confusion regarding how to update a progress bar without blocking the rest of the UI, I have decided to hack IOEx. What I want to do is to modify the following loop in showCfgDlg() (InstallerOptions.cpp):


while (!g_done) {
MSG msg;
int nResult = GetMessage(&msg, NULL, 0, 0);
if (!IsDialogMessage(hConfigWindow,&msg) && !IsDialogMessage(hMainWindow,&msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}


Somewhere in there, I want to add code that will callback a function in my NSIS installer. The callback will be... called based on a timer. So when setting up the IOEx dialog, I will pass a time parameter like 500 msecs, and the above while loop will determine if that time has elapsed and call my callback. Then, in my callback, I can update the progress bar, and do all the other things I need to do.

(This whole idea is due to my frustration with all other attempts to update a progress bar automatically, without blocking the UI in a loop. I have attempted various user32::SetTimber/callback based approaches, but with no luck, so if someone can point me to the "right" way to do this, I'd be happy. :) )

Hmmm... there existed one InstallOptions modification in the past that used this feature... I could merge his idea to the plugin! I just wanted this feature to be implemented as the value name of "Settings" INI section, and to be known as a page notification (like ONTIMEOUT or something). What do you think?

I forgot about that feature, thanks for reminding me! :D


Sure, that is a good idea. My approach just calls the Page's leave function after a half a second (repeatedly), although that should probably be specifiable somehow, as in the INI as you said, but I have a deadline for a project, so my goal is to get it working for my needs asap.

Looking forward to your update! If it's soon enough, I look forward to using it.


Done, I just need to prepare docs. The feature included also halts when a notification from controls is called (like ONCLICK).


Cool, I'm curious to learn how you implemented this. I'd be happy to beta test.


InstallOptionsEx 2.4.2 beta 2 - DLL
This version really don't have much. The only implementation is the TimeOut value name for "Settings" section. See the full list below:

- Added TimeOut INI value name for "Settings" section. This enables the page to return after the specified time. When notifications are activated, the timer pauses until "Abort" is called on page's validation function. Also, it continues to repeat until the page is closed.
- Added ONRCLICK for TreeView controls.
- Fixed ONCLICK notification flag: Only captured single-clicks when ONDBLCLICK was not set.
- Added the missing Notify INI value name on the documentation.


The TimeOut works great for my purposes. I'm glad I'll be able to keep my IOEx standard, instead of maintaining my patches. Thanks again.


InstallOptionsEx DropList Problem
InstallOptionsEx "DropList" problem is showing the item lists all compressed togethor.

To call invoke InstallOptionsEX .. i call


!macro MUI_RESERVEFILE_INSTALLOPTIONSEX
!verbose push
!verbose ${MUI_VERBOSE}
ReserveFile "${NSISDIR}\Plugins\InstallOptionsEx.dll"
!verbose pop
!macroend

!macro MUI_INSTALLOPTION****DISPLAY FILE
!verbose push
!verbose ${MUI_VERBOSE}
InstallOptionsEX::dialog "$PLUGINSDIR\${FILE}"
Pop $MUI_TEMP1
!verbose pop
!macroend

!insertmacro MUI_INSTALLOPTION****DISPLAY my.ini
Function CustomPageFunction
!insertmacro MUI_INSTALLOPTION****DISPLAY "my.ini"
FunctionEnd


With image below shows both a non InstallOptionsEX and InstallOptions droplist . As you can see one of the droplists shows the text in a somewhat "cramped" form.

I have seen this before in Win32 but i cannot remember the reasons/fix.

The fix is to use ListItemsHeight to a higher value (the default is 10 pixels, I think). I knew of this problem before but I didn't know if there are any computer that uses larger fonts. Thanks for the report!

You see, ListItemsHeight INI value name is similar to Height for other controls, but I just don't implement like this because that's the Windows default. You can suggest me this if you think it's better.


ListItemsHeight :: make sense. I just didnt see it in the .ini settings inside the documentation.

If i may humbly make a couple of suggestions!

Could you make a note as to why you may want to use ListItemsHeight in the documentation.

Would you consider re-ordering the .ini file list in the documentation - ListItemsHeight sits between the Font... settings in my docs.

***
PS..
I really should just shut up and say thankyou for InstallOptionsEX - you ve done a fantastic job.

Its made my installer very cool..

Thanks


Thanks. On the next version in the documentation, "ListItemsHeight" will be located right after "Left/Right/Top/Bottom/Height/Width".

Could you make a note as to why you may want to use ListItemsHeight in the documentation.
Do you mean if I could put in the docs why I chose "ListItemsHeight" instead of putting in place of the normal "Height", and not changing the actual value for "Height" to another INI value name, like "DropListHeight"?

Could you make a note as to why you may want to use ListItemsHeight in the documentation.
Please ignore this - i wrote this when i was very tired and on further reading this morning it is nonsensical. All the information is already included in the documentation.

Sorry to waste your time on this one.

Ok, I'm lost. :confused: Has anybody has a bit of code showing how to use the ProgressBar control with InstallOptionEx ?

Thanks in advance,

KenA


Hi,

I'm sorry to insist but nobody has a working piece of code using the ProgressBar control ? Or at least some pseudo code or explanations describing what should go in the pre page and what should go to the leave page ? So far I managed to either freeze the installer (I use the initDialog with /NOUNLOAD or quit with a crash without /NOUNLOAD, with no update of the control in either case. :(
D'oh ! The latest version (and the latest help file in particular) posted in this forum opened my eyes, so problem solved !:D

Deguix, thanks again for the great plugin even if sometimes I really struggle with the doc.:up:

KenA

Archive: InstallOptionsEx


it would probably be a good idea to replace the seperators of ListItem ("|") with something else, so one can use it for a listed item. so far i have to replace all | with $\ and all $ with $$. how about making a future version of IOEx use something else (i.e. $\n)?


Deguix, thanks again for the great plugin even if sometimes I really struggle with the doc.:up:
Sorry about that, maybe I'm better at programming IOEx than at developing docs...

it would probably be a good idea to replace the seperators of ListItem ("|") with something else, so one can use it for a listed item. so far i have to replace all | with $\ and all $ with $$. how about making a future version of IOEx use something else (i.e. $\n)?
I might never told you this, but "\n" and "\r" actually work in ListBox, DropList and ComboBox controls. Also, $\n would bring confusion between NSIS syntax. Writing that with WriteINIStr would be not good at all.

There is one thing I could do. I could create some escape characters for the characters used on lists: "\|", "\{" and "\}". It's quite unfare to don't let the user to use those characters as item names.

EDIT: Wow! This thread is quite big! It's going to beat the record of the thread with the most posts in NSIS forums!

:D

I have an idea. It would be cool to add 'tabs' (like on Desktop Properties). I could use this on one of my installers.

Something like

Type=Tabs
...
Text=Tab 1|Tab 2
State=1

Text = tab names
State = selected index

The tab clicks would act like NOTIFY and we could use them to change to another IOEx form with the exact same tabs (but with the next one selected with State field).

How easy would this be to implement?

-Stu


Tabs are used to hold other controls. This would be a little easy because it only needs to know which controls are going to appear when one tab is selected. Also, the Tab control will need to hide or show the controls when a tab is selected.

The simplest implementation would be using the value name that I'll add for the next version which is "RefFields" value name. This will be a list of fields to be hidden or shown when tabs are selected or unselected. This list will probably use "|" and "," characters to separate field indexes.

The simplest answer then would be yes. I never thought on this idea until now. Thanks for bringing this up! :D


Well, ok if you're up for it, that would be great :)

-Stu


Nice, but really needed?
Tabs are great, but I don't know how good looking tabs would be in a Wizard dialog. That's why you got multiple pages and next/back buttons. But since I'm a nice guy I wont overrule this completely. Here is my tips:

Here is my pseudo INI layout:


[Field 1]
Type=TabbedPages
Text=Tab 1|Tab 2|Tab 3
State=1
; You got separate IO pages
Pages=page1.ini|page2.ini|page3.ini
Tab= ;filled in by IOEx


State in this case contains the index of the tabpage that is visible (to follow the same scheme as the other controls).
You must read the [Settings]State key from the page INI of the visible page to check for clicks on controls within a page.

As I said, I had this idea:


Type=Tab
ListItems=Tab 1|Tab 2
State=Tab 2
RefFields=1,2,4|3


That's the simplest, effective and most useful general solution to have the least amount of addition of structure to the DLL. I'm trying to find balance between size and features.
The only thing I need to implement here is the handling of Tab controls and the "RefFields" multiple field ID's to work with, nothing more.

InstallOptionsEx 2.4.2 beta 3 - DLL
Lately, my betas were slowing down, which is not good for betatesters at all. Also, the TODO's from previous versions which weren't done are now giving a toll on me. Expect to don't have new controls, and to have fast, bugfixing only builds for some versions to come.

For the plugin size, the most responsible for the increases are new INI value names. 3KB were added to the compressed build this version (19 KB now) and half of it were because of new INI value names. I'm expecting it to make somewhat near the 30KB mark at the end of beta development.

Now, on to the new features. ListView control is the newest attraction on IOEx. It has features like CHECKBOXES flag (imported from TreeView control), view mode flags, and extra options just for the REPORT_VIEW (which will be futurely used by Header controls). But Link and Button controls aren't going to be passed aside that easily. They have 2 new dialog flags: COLORREQUEST and FONTREQUEST. Let's see the full list of changes:

  • Added new value names for "Field #" section: RefField, StateImageList, SmallImageList, LargeImageList, HeaderItems, HeaderItemsAlign, HeaderWidth.
  • Added new flags for ListView controls: LIST_VIEW, ICON_VIEW, SMALLICON_VIEW, and REPORT_VIEW and for Link and Button controls: COLORREQUEST, FONTREQUEST.
  • Older INI's braking notice: All values supported by OPEN_FILEREQUEST, SAVE_FILEREQUEST and DIRREQUEST flags for Link and Button
    controls on State value name and UpDown controls on Text value name were transfered to RefField value name.
  • Now Link and Button controls with OPEN_FILEREQUEST, SAVE_FILEREQUEST, DIRREQUEST, COLORREQUEST, FONTREQUEST flags output state values to State value name.
  • UpDown controls now detect automatically the text from its buddy control. State value is not used anymore when the buddy control is set.
  • Older INI's braking notice: All values for TreeView controls on Text value name ware transfered to StateImageList value name.
  • Fixed automatic Custom Draw setting for Label, DropList, ComboBox, and ListBox. Custom Draw setting will only be set if you specify one of the color commands values. Because of this, when this setting is disabled, the colors will be as the Windows' default, and some features like multiline for those controls (except Label) will be disabled. The good news is that this fixes problems when setting text to those controls or change some colors for now. To use custom draw in controls with default color values, use empty values like on "TxtColor=".
  • Added forgotten details about Animation controls support for the State INI value, types of animation supported, TreeView controls support for the StateImageList INI value, and the ONSELCHANGE notification flag.
  • Fixed problems with notifications that executed when other handled or non-handled notifications were activated.
  • Fixed checkbox state changes on TreeView controls when the space key was pressed.
  • Other small bugfixes.
Just a note on this version, this is what I know I couldn't do yet:
  • the flag EDITLABELS is not finished.
  • the "\|" escape character is not implemented yet.
  • there is a bug on the last parameter of FONTREQUEST flag "State" INI value. The color is indicated as a decimal number.

InstallOptionsEx 2.4.2 beta 3 post-build 1 - DLL
I forgot to fix a bug before launching it:

- ListItems of ListView controls have problems when setting empty item names.


InstallOptionsEx 2.4.2 beta 3 post-build 2 - DLL
I made two changes to this build:

- Added EDITLABELS flag for TreeView and ListView controls.
- Fixed empty item names for TreeView controls.

This increased the build size in 0.5 KB (now 19.5 KB). First, add features, then remove unnecessary ones and fix bugs.

I think this strategy keeps me from forgetting what I changed in the plugin, because now I always have a list of what changed. I don't know, keep posting versions this quick would be good for posting numbers here in forums. At least, nobody has to wait anymore for features, because they come as fast as I implement them! :D


InstallOptionsEx 2.4.2 beta 3 post-build 3 - DLL
Another build, and more fixes and additions:

- Added MULTISELECT for ListView controls (made single selection default in this case).
- Fixed the return of State and ListItems INI values for Link and Button controls with COLORREQUEST flag.


I have a question regarding the Beta 3 Post build 3:

I have the following Ini Code:



[Field 17]
Type=Text
Left=20
Right=120
Top=160
Bottom=175
State=
Flags=Disabled

[Field 18]
Type=Button
Left=130
Right=150
Top=160
Bottom=175
RefField=17
State=
Text=...
Flags=OPEN_FILEREQUEST
NOTIFY=ONCLICK
Filter=All Files|*.*
ToolTipIcon=INFO
ToolTipTitle=Messagetext
ToolTipText=Choose a File to add to your Mail
ToolTipFlags=BALLOON
ToolTipTxtColor=0x000000
ToolTipBgColor=0xE1FFFF
ToolTipMaxWidth=300



I use this 2 Controls to display which file the user had selected. In your Docs you're saying that the Reffield command is input only and that the output of the Filerequest control is the state value of that control. So my question is: Is it still possible that the output is given to another control?

It's RefFields, sorry 'bout that.


Now i works - thanks


ININININ
I still think my Tab idea is the best. It make the hole thing more structured as you can keep the fields for the different tabs in separate Ini files. Nothing more would be required really. You just have to read more than one INI in your page leave callback function.


Ok? How about the control IDs of the fields when importing other INI's, would fields have to start at 1 also in those INI's?

1) If yes: This would need extra handling for additional types of control ID's (starting at 1300 for example), a variable containing the groups of tabs that occupy certain ID groups, and a defined limitation of number of controls a page can have. Also, there is the nesting of tabs inside others. What would be the ID's of the controls inside this tab control nested in another? They would have to be in the same ID group, so the division in the number of controls the group could have is halved, and thus the limitation could make the nesting of 5 tab controls, one inside another, to reduce considerably to just 1 control (if the actual limit of controls is 100). I'm not even counting how many INI files you would need to create for this nesting, because that would be in an huge number.

2) If no: What's the reason for creating separated pages then? You'll be limited to use different ID's for the controls anyways. It's a lot better having only 1 INI to worry about. If you need to be in separate pages, why not concatenate the INI files at run-time? That would be easier than adding more KB's to your favorite plugin for nothing. People don't usually use this feature. This feature is not even GUI related.

So, does everyone agree that my idea is better for the future of IOEx? :rolleyes:


I think it's fine. It'll be easier to manage everything in one INI file as well I think.

-Stu


So you mean that you want a very huge INI file?
And the controls that are on the tabs are hosted in their own childdialog anyway. You can't just place all contols on one dialog and then do show/hide of controls depending on what tab is selected. No real applications does this. They create separate dialogs for each tab and then swap between these page dialogs (moves active page dialog up z order and hides non-active page dialogs).

Thus you can have separate INI files and you don't have to worry about control IDs as they are unique within each dialog anyway.


Ok, you have the reason in saying that controls have unique ID's and it does the basic job of Tab controls. :( I was not studying over this type of control yet (didn't read SDK). I was more thinking on fixing bugs and implementing missing features first, and just then implement controls.

I still don't think I can do it for next versions, because, as I said, it's still a little difficult to manage INI files like that (independent window messages handling and other stuff).

For this, IOEx would need the support to be used for multiple dialogs, and this is a major TODO. If I can get this going, I can also get the creation of independent dialogs which is also a major TODO. However, I need to work first on remodelating the source code for the implementation of external controls (major TODO). As I implemented almost all the controls that don't need the major TODO's (except for HotKey, ScrollBar, ToolBar, StatusBar) IOEx is getting closer and closer from major release.


I don't think you should work this much on IOEx. The original purpose of IOEx was to bring more control classes to the playground and not be a complete user-interface tool for NSIS. I don't think we need that much in a installer anyway. If NSIS evolved into being a complete apllication development platform, then maybe...

What I would like is an easy way in the original InstallOptions plug-in to set and retrieve listbox items without using SendMessaget and GetDlgItem functions. What about simple functions called "ListboxGetItem", "ListboxSetItem", "ListboxGetCurSel", "ListboxDeleteItem" exported by the plug-in. I hate doing extensive string manipulations on the ListItems INI key (searching for a string matching the State and splitting on "|" character. And the NSIS script language was really not intended for this heavy string processing. The end result: You can drop a listbox and have add/remove buttons so people can configure some app right in the installer (add remove some items).


1)I don't know what's the future of NSIS, so I don't also know when I should stop developing on what I have. IOEx might be by far behind other user-interface programs, but at least there is something. If I didn't change it, then you would be stuck with IO and you would try to do it also. This also plays an experience role for me. Besides, NSIS is a really easy language to learn and with a powerful compiler that has a very low overhead and that compiles things very fast in slow computers.

2) I know, that's what I'm doing right now. I'm verifying the possibility of organizing the plugin's structure to be more object-orientated, which would allow it to easily export individual functions from the DLL. I'm trying to find what's already available (MFC), get a small part of the things I find and modify them to IOEx's ways. After this optimization I could export any type of function you need. But I'm still looking for information, so don't trust totally on what I say here.

Also, there is one more InstallOptions bug I discovered (without Ex): the text returned by a ComboBox and Text controls can be up to 2 times the actual buffer limit.


I've always felt that NSIS would be an ideal platform for program development, but it's always lacked some really necessary controls. One thing we could also do with would be to add customised menu (ie File, Edit View etc) and maybe a status bar too.

-Stu


Yes, of course, I'll get there. But I have no experience with menus whatsoever. What syntax would you suggest?


I think you'd have to have a Field # for each menu item and it would do NOTIFY by default. You won't need to specify the position/size attributes because it will always be put on the top, in order of Field #. E.g.

[Field 1]
Type=Menu
ListItems=Open|Save|Save As

State would be the ListItem that was selected which we can check on the Leave function.

As for sub-menus, that's something different - not sure if we could do that... in fact I doubt there would be any need to anyway. Basic menus are plenty!

-Stu


The core of NSIS currently handles the UI in such a strict way that turning it into an application programming platform requires massive changes to the core. The wizard page based system only loads plug-ins in the context of a page, and not persistent through the entire application. My NSIS Debugger plug-in creates a new thread where it handles the message queue of a separate window, but that is a different thing. You can pull off many hacks to take over the wizard dialog of NSIS (my recently posted wansis plug-in demonstrates this) but ultimately in the end it is an installer and nothing else.


That's true. But if you treated NSIS differently than a installer system, then it would go away from the goal of being NSIS in the first place. Logically, if everybody would want NSIS to turn into an independent language, it would be harder on people looking for building installers effectivelly. I would prefer NSIS to be more of a programming language, but there are others who prefer NSIS as an ideal tool for creating installers. Even though NSIS have few things big programming languages have, those languages don't have an efficient tool for creating installers like NSIS is. kichik has done a good job on equilibrating both. This equilibrium is also thanks to brainsucker for creating the System plugin.


I agree. I once tried making an installer out of visual basic but that did't work. I see NSIS as an installer system that has its perks. Such as: easy writing of INI files; creates program shortcuts easily; writes to the registry easily; you can use custom graphics; use a background gradient; can use custom made pages; etc... I could go on about it, but to stop taking up space on the server I will stop now.

I have never found such an installer system that was so easy to learn. I use HM NIS edit to edit my .nsi files. The first time I use NIS edit I went straight to the wizard so I could study the script it produced. My skills have increased dramatically. My hangman setup program is an example of my skills. I might post it on my thread "Just a thought.." just to show what could be done. :cool:


InstallOptionsEx 2.4.2 beta 3 post-build 4 - DLL
Wow, I about deleted this build from my computer. Luckly there is a recycle bin which I don't clean often. I've changed these things below:

- Added ListView and TreeView controls support for TxtColor and BgColor values.
- Fixed an interminable loop when UpDown controls had a buddy control that had the ONTEXTCHANGE or ONTEXTUPDATE notification flags.

I can't promise much about beta 4. It's better to do something than be talking about it every time. Also, no more fast builds. I got tired of doing them when I have not much to offer.


Will tabs still be added someday?

-Stu


Yes, of course. But there are a lot of suggestions pending. If you want a feature right away, why don't you help me to add what you want quickly? I'd be glad to have my work changed by someone else :rolleyes:.


Yeah! There are a lot of people who know how to code, but which rather want to wait for others to do it instead.

Come on... make something all of you...


I'm still a C++ newb and the IO source especially scares me lol
I'll have a mess around with tabs later today and see if I can implement it into IO.

-Stu


That's good to hear. I will try to fixup my wansis plug-in to support skinning of tabcontrols. Read more about it in the proper topic.


DropList Problem
Don't know if this is a bug or not, but when I try to use the DropList on Win2k, it is all congested and you can't see the list drop down. I've attached the image and here's the code:


[Field 15]
Type=Label
Text=Select Language:
Left=260
Right=315
Top=8
Bottom=18
Width=
Height=
FontHeight=8

[Field 16]
Type=DropList
ListItems=English|Japanese
State=English
Left=260
Right=350
Top=18
Bottom=
Width=
Height=
ListItemsHeight=12
Notify=ONSELCHANGE
Flags=DROPLIST

Also, all of the items are there in the droplist because when the droplist has focus, I can use the keyboard.

Oops, here's the image...


Set "ListItemsHeight" INI value to a number bigger than 15 (the default on the current version).


This doesn't seem to have any effect. Without ListItemsHeight, it works on XP, just not on 2k.


I misunderstood your problem. Set the "Bottom" value of your "DropList" to be big enough so that it appears correctly on Win2K (I never had Win2K, so I can't test it). Also, take out the "DROPLIST" flag. This is not needed if you're using a "DropList" type of control.


That worked, thanks!


InstallOptionsEx 2.4.2 beta 4 - DLL
This time there is some big things: new value names for Settings section that add more compatibility to IO.

  • MUnit INI value name: it adds the ability to use pixels coordinates instead of the dialog units. IOEx just became compatible with InstallOptions 1 pages.
  • Reimplementation of NumFields INI value name: The only thing different from IO is that it now detects the number of fields existent in the INI file automatically as default.
See the full list of changes for this version:
  • Added MUnit value name for Settings section and NotifyCursor for Field # section.
  • Added ListView and TreeView controls support for TxtColor and BgColor values.
  • Added EDITLABELS flag for TreeView and ListView controls and MULTISELECT for ListView controls (made single selection default in this case).
  • Fixed empty item names for TreeView and ListView controls.
  • Fixed the return of State and ListItems INI values for Link and Button controls with COLORREQUEST flag.
  • Fixed an interminable loop when UpDown controls had a buddy control that had the ONTEXTCHANGE or ONTEXTUPDATE notification flags.
  • Re-added NumFields from original InstallOptions for compatibility reasons.
  • Fixed the range of numbers for UpDown controls. Maximum value for MaxLen and MinLen is 2147483646 and the minimum is -2147483646. Also the default values for the two value names are 2147483646 and -2147483646, respectively.
I've discovered the problem that happens with non-WinXP systems about the ComboBox "Height" value:
  • WinXP: 0 = ListItemsHeight + border height * 2 (control is required to show up).
  • Other Versions: 0 = 0 (control doesn't show up).
I tried to expand the notification system but I didn't get far. I knew that it would be better to have separate plugins to capture mouse movements and for key presses than making everything built-in inside one plug-in.

Archive: InstallOptionsEx


Bugs in DirRequster ?
Could you confirm 2 bugs in InstallOptionsEx 2.4.2.b4 regarding the flag DIRREQUEST for buttons:

1) STATE will not be used as input to set the default folder of the DirRequester dialog. I know, this is not documented, but even the documented feature (the default folder will be previous selected one) does not work. REFFIELDS work, but only as documented for the output of the DirRequester. It would be nice to be able to initialize the dialog's default folder via STATE or the referenced textcontrol.

2) LISTITEMS displays a pipe character (|) at the end of the string. I can only get rid of this by appending about 700 space characters to the string.

Two hints for the documentation: you should mention that the NOTIFY-value is mandatory for a button to display a requester. I had no examples and was puzzling some hours to get it work like in 'old' InstallOptions.

In "How to use - Step 6: Return Value" you mention the return value on the stack (this is documented for "InstallOptions" as well) but in your example for Step 3 (Call the DLL - "show") you "forget" to pop the return value from the stack. Does InstallOptionsEx provide no return value anymore or did you really forget the POP (there have to be 2 POPs) ?

I am currently using NSIS 2.07.

See my custom testpage in the attachment.


1) There is actually no way to fix this without creating a new custom dialog for this occasion. The input of a folder is not accepted by the BROWSEINFO structure used by the SHBrowseForFolder. If you verify throughtly, even NSIS and InstallOptions have this problem. It always points to the "My Documents" folder first.

That default value is actually the value when you read from the INI file, not the one which appears, because you can't input a folder name to the control. So, there is no reason for saying the default value that appears, because it's the Windows default = "My Documents". But still, is better to say what appears anyways for this misunderstanding to don't happen again.

2) I'll fix that.

3) Actually, any notification will be enough to bring up the dir request dialog. I'll fix this also.

4) InstallOptions' example is also wrong on this (the example is copied from there). I'll remove the first push for it to make clear that the plug-in function has a return value.


I don't see that NSIS or InstallOptions are having problems to set a default folder for SHBrowseForFolder (I did not take a look at the sourcecode). Even Delphi calls this function and it behaves like expected. I don't know how NSIS or InstallOptions are doing this, but Delphi seems to use SendMessage to select the folder [SendMessage(Wnd,BFFM_SETSELECTION,Longint(True),Longint(PChar(TBrowseFolderDlg(Data).FolderName))); in unit BrowseDlg]. Forgive me my insisting...


Oh, I forgot to see the browse callback function, probably there is a way to select it after all. Thanks for giving me the crucial hint (BFFM_SETSELECTION). And I think the problem only happens with IOEx, because this SendMessage was already in the code... I don't like when this happens.


I'm not sure if I found a bug or not, but whenever I try to set the label or link fields (at run-time) in Japanese, the Japanese text doesn't come out right. I have all my files (nsi,nsh,ini) in Shift-JIS. I commented in here but I wasn't sure if it also applied here.

Thanks.


Can you post a screenshot about the characters appear? IOEx supports only calls ANSI functions and it doesn't support Unicode.


Unfortunately I cannot post a screenshot because of work. The characters that do appear are Japanese, but they're not the ones that are suppose to be appearing.

The weird thing, I thought, was that when I do a SetFont on the labels and links between init and show, the Japanese appears correct, but only on English WinXP running in Japanese.

Here is an example of one field from the ini file and the corresponding code that sets it in the script.


[Field 1]
Type=Link
Text=
Left=54
Right=188
Top=8
Bottom=22
Width=
Height=
Notify=ONCLICK
TxtColor=0x000000
BgColor=0xE9E8E5
NotifyCursor=HAND


LangString localizedString ${LANG_ENGLISH} "english"
LangString localizedString ${LANG_JAPANESE} "japanese"
...
WriteINIStr "$PLUGINSDIR\install_menu.ini" "Field 1" "Text" "$(localizedString)"
...
Function MenuPre
Push $HWND
InstallOptionsEx::initDialog /NOUNLOAD $PLUGINSDIR\install_menu.ini
Pop $HWND ; HWND of window
GetDlgItem $R0 $HWND 1200
SendMessage $R0 ${WM_SETFONT} $MyFont 1
InstallOptionsEx::show
FunctionEnd

The font is being set correctly. The langstring for japanese actually has Japanese in it. And I've saved all of my script files, ini files, etc. as Shift-JIS encoding.

Thanks for the help.

The weird thing, I thought, was that when I do a SetFont on the labels and links between init and show, the Japanese appears correct, but only on English WinXP running in Japanese.
Hmmm... this problem doesn't appear to be an IOEx issue. IOEx uses the exact font from the main window, which is from NSIS itself.

I might know what this problem really is though, SetFont sets the charset to the default ANSI charset. You should use System plug-in and call the "CreateFont" from the Windows API with the SHIFTJIS_CHARSET charset for the font to show correctly. There is a thread talking about this:

http://forums.winamp.com/showthread....hlight=SetFont

I had had the system plug-in and call to CreateFont (based from that thread) and didn't think about changing the charset. However, I was using the DEFAULT_CHARSET, which should have worked on a Japanese system, right? Anyways, I changed it to:


!define DEFAULT_CHARSET 0x01
!define SHIFTJIS_CHARSET 0x80
${If} $LANGUAGE == ${LANG_JAPANESE}
StrCpy $CharSet ${SHIFTJIS_CHARSET}
${Else}
StrCpy $CharSet ${DEFAULT_CHARSET}
${EndIf}
System::Call "gdi32::CreateFont(i 0, i 0, i 0, i 0, i 0, \
i 0, i 0, i 0, i $CharSet, i ${OUT_DEFAULT_PRECIS}, \
i ${CLIP_DEFAULT_PRECIS}, i ${DEFAULT_QUALITY}, \
i ${DEFAULT_PITCH}, t 'Sans Serif') i .r0"

This doesn't work either. It will still change appropriately on my English WinXP system, but my Japanese WinXP system, still doesn't show correct Japanese.

Thanks.

EDIT:
Also, the title bar caption and the button I have don't change on the English WinXP (ever). Is this because of how Windows works?

Well, I just tested IO vs IOEx with only a custom page and one button. The results: IO displayed correct Japanese on Japanese machine and IOEx displayed the word "2Button" instead of Japanese text on Japanese machine.

If you need more information, just let me know.


Could you test your code with the older versions published here? This might give me enough of a hint to correct your problem. Report to me which versions of IOEx work in the Japanese computer correctly. It would be even better if you fixed IOEx from there and sent me a patch to include in the next version (which should be posted here).


can you estimate, when the "\|" escape character will be implemented?


how can i display a dollar sign ($)? I looked at the code and it seems that $$ should do it, but it doesn't. am i missing something here?


also, in void WINAPI ConvertVariables(char *str) {
p3 = getuservariable(myatoi(p1));
while(*p3) {

should check p3 before dereferencing. I can cause a crash by putting $R119 in a text label, causing p3 to be null.


ok, so i've been diving into the code and it seems the problem is the $$ is being converted twice

ln 1680
// Label Text - convert newline
pField->pszText = myGetProfileStringDup("TEXT");

is called

which calls
myGetProfileString()

which calls
ConvertVariables()

then after that returns it calls ConvertVariables() again!


also, quick workaround, to get a $
use $$$$ :)


I didn't have time to look through all of the IOEx code to try and figure out where the fix should go because all I needed to expand off of IO was clickable bitmaps with a hand cursor for rollover, which was a quick fix.

I did check back all the way to the 3/05 release of IOEx and that still wouldn't correctly display Japanese text. I'll keep looking back till I find something that does it correctly.


there's an edit button too


ok, so i've been diving into the code and it seems the problem is the $$ is being converted twice
I fixed this region for the next version. It was really being called twice, and I fixed other small bugs also. But first, I need to finish the implementation of RichText control.

I still think there should be only one starting escape character, not "$", but "\", because putting "$$" is probably making the text for those who use "$$" complicated... and the "\\" is already considered a "\", so I could also make "\r9" to be considered equals to $R9 in NSIS. But this is just an opinion...

I didn't have time to look through all of the IOEx code to try and figure out where the fix should go because all I needed to expand off of IO was clickable bitmaps with a hand cursor for rollover, which was a quick fix.
Did you try NotifyCursor?

The other things that I added (yes added) in the next version are:
- the combination of all image controls into just one control called "Image" (even "Animation" control got in, because it shows animation of images without sound).
- added new image types using OLE and others using GDI+.
- adjustment of the size of all buffers ("BufferSize" value name for "Settings" section), which made easier to discover fixes related to memory allocation/destruction (like the two ConvertVariables one).

Did you try NotifyCursor?
Yes, but I HAD to have Japanese text working and IOEx wasn't supporting Japanese, which was why I had to revert back to IO and modify it to my needs. I'll try and figure out why (when I have time but I had a deadline...).

That's why it's said IOEx is a beta... until I'm satisfied with the features. That is, not really soon...

should check p3 before dereferencing. I can cause a crash by putting $R119 in a text label, causing p3 to be null.
I fixed that by adding a new variable called p4. This does the job done by p1, except that it correctly holds the variable number used by getuservariable function. myatoi function gets the entire number value that appears first, and so as in your example, the variable $INSTDIR would be used (10+11 = 21 = INST_INSTDIR -> see defines in NSIS\Contrib\ExDLL\exdll.h).

EDIT: I still need to check the existance of the variable though. I don't know how NSIS works totally, but it appears that $INSTDIR is not initialized when nothing is assigned to it.

Thanks for the bug report.

2 bugs in notify system
1) A click on a DirRequester-Button generates two notifies after the selection of a folder with the BrowseDialog: the first event notifies me of a change in the associated textcomponent (that's ok), and the second one notifies me of a click on the NextButton, which I did not touch - this is not ok. Cancelling the BrowseDialog generates only one notify (for the browsebutton).

2) ONTEXTUPDATE does not generate a notify for a textcomponent. I have used ONTEXTCHANGE instead, which works for me, because STATE reflects the input after the keystroke - in contradiction to the documentation - so that it behaves like ONTEXTUPDATE should do.

See the attached Testpage...

By the way: I had some unreproducable exceptions, when going back to the custom page and opening the BrowseDialog for the 2nd or 3rd time.


1) This is not a bug. If you go to the next page, then the page has to be saved and it calls the callback function normally, like IO's default. I'll treat this as a feature request.

EDIT: I mean, a feature request for the implementation of notification flags for pages.

2) Fixed. The docs I still need to fix.

EDIT: Fixed. Note: The control always updates the text before sending the notification. The plugin doesn't handle aborting the new text operation at the moment when setting ONTEXTUPDATE.

3) I'm trying to verify if there are more buffer problems with the plug-in accumulated from older versions. Just see previous comments from other people here. With the addition of BufferSize for Settings section, this can be verified easily.


1) Hmmm... interesting problem. I verified your example again and I concluded that IOEx supports only 1 notification flag activation at a time. Another bug report for mee. There are just so many... :(

Curiosity: I just saw the size of InstallOptions.cpp of the IOEx source, and I'm impressed of how much code has been added since lastest IO version:

IO's: 48.6 KB.
IOEx's: 220 KB.

:eek:! 171.4 KB of difference! It's about 5x bigger than IO's! :D. Hmmm... I wonder where I spent all that time to get that mountain of code... :confused:


Thank you for looking once more after it, because I did not understand answer. Regarding bug #1: the problem is, that I did not click the nextbutton! I have only selected a directory with the BrowseDialog but I want to stay on the current custompage, because in my project there will be more components on the same page. The solution would be an onclick-notify for "Field 2" (instead for field 0) regardless whether I've clicked 'OK' or 'Cancel' in the BrowseDialog. A notify for "Field 0" should only happen when I've clicked on the nextbutton...

For an example, I have modified ioex.nsi to enable the nextbutton only when all textcomponents have an even number of characters. Maybe you can see my problem now...


1) That's the "1 notification flag activation at a time" bug. As I said, I'll fix that later. No need for extra explainations.


A bug report:

In InstallOptionsEx 2.4.2.b4, TxtAlign doesn't work if you don't set TxtColor to some value.
For example:

[Field 1]
Type=Label
Text=Hello
Left=0
Right=130
Top=80
Bottom=88
TxtAlign=RIGHT
TxtColor=0x0

This works and the text is right aligned, but without the line TxtColor=0x0 the text is left aligned.

Regards


I'll verify when I get time to do it. I'm back to school, so it's harder to use the computers at home, principally because most of the time to develop IOEx is at the morning, and school takes part of that + a part of the afternoon, and the other person uses the computer for the rest of the day and night (until 4 o'clock in the morning). I'm sure he has a lot to do by the amount of time I give.

I guess the problem happens because the plug-in doesn't set the flags on the control directly. It just aligns the text when it's customly drawn, making it not to work on non-custom drawn labels. It's seems easy to fix with a code change for me.


I have fixed this in the next version. Thank you for the bug report.


@deguix: asked this before, but i guess it was looked over after those many replies by fromcat. can you estimate when the "\|" escape character will be implemented? just so i can plan ahead.


Oh, sorry for not answering that before. I plan to add it to the next version, but I'm unsure of the quality of the implementation. The next version will be launched within this month (that's what I say instead of saying next 2 weeks). The new features are costing some annoying bugs in the code, which need to be fixed before release. The readme was not even touched, with the exception of the change log. So you see how I'm going...

Do you have any time limits for this? I could make sure that I do things as fast as I can if you want me to.


Originally posted by deguix
Do you have any time limits for this? I could make sure that I do things as fast as I can if you want me to.
thanks, but that's not necessary. just had to decide if i should release another beta or the final version (which would require that feature). knowing that i got some more time, i will just release another beta of my software.

I found another bug:

In InstallOptionsEx 2.4.2.b4, if you use an IPAddress control with Flags=DISABLED, the control is not editable, ok, but it doesn't appear grayed out.

Thanks, regards


I don't know why the OS doesn't gray it out, but I can't do this right now. If there was an example on the web that shows how to implement this, then I would probably find a way to include it in the plug-in. I probably don't have enough knowledge to judge how to implement that.


The "\|" (and "\{", "\}") feature was added. Any more small features/bug fixes/patches to include into the next version?

I'm already thinking: "What am I going to do for 2.4.2 beta 6 right now?". Plenty of code revamp I would say. The code is getting messier and messier, and so huge... I need to split everything up for clarity. Maybe using a .cpp file for every control? This would make implementations for new controls easier.


Maybe this time the release will be even slower than what I expected. I simply hated my previous implementation, but now it's a lot easier to split items of arrays.

Yathosho, don't worry about IOEx due dates for releases. I always miscalculate due dates and this is how I'm. It's never ready in time... :( but always has something of better quality than expected in it... :)


I think my last post was swallowed. If not, I apologize for the duplicate.

There was a bug in this function, where in the case of ListItems with variables after ConvertVariables() was called, the old string length nSize was returned. This lead to crashes and string truncation.

DWORD WINAPI myGetProfileString(LPCTSTR lpKeyName)
{
*szResult = '\0';
int nSize = GetPrivateProfileString(pszAppName, lpKeyName, "", szResult, BUFFER_SIZE, pszFilename);
if (nSize > 0)
{
ConvertVariables(szResult);
nSize = lstrlen(szResult);
}
return nSize;
}

Also, closing a DIRREQUEST dialog in any way - 'x', 'cancel or 'ok' - seems to send a State=0 and Notify=ONNEXT to the main validation function, but not all the time - only if it's one of the first things you do on the page.

Lastly, the default MUI/NSIS directory page shows disk usage requirements and free space. Is there access to those variables from inside IOex or NSIS?


I made several changes now to ListItems, the buffer allocation... I need to review my changes, but from what I did up to now, all those bugs you said are fixed for the next version.

Now, about the question, there are no NSIS variables for retrieving that information. You have to get them on your on using NSIS. Now NSIS questions shouldn't be in this thread.


I hate to ask you for a release when you're not ready, I hate when people ask me for that too.
So, can you give me a hint on the DIRREQUEST closing bug? I'm trying to push out a new installer on Friday and it's the only piece looming over my head.


Ok, I'll release it tomorrow morning with untested parts of the plug-in.


Archive: InstallOptionsEx


InstallOptionsEx 2.4.2 beta 5 - DLL + Source
Hmmm... this was not completed in today morning, but I wasn't satisfied to release it with annoying bugs, so I spend the time fixing some more bugs...

Also, as you may have noticed, the files for all versions for IOEx are hosted in the NSIS Wiki now. After the first stable build is released, all of them will be deleted (or at least I think so).

This version brings a lot of big changes. In this version, RichText and Image controls were implemented, along with the BufferSize key name for "Settings" section, the new notification queuing and escape characters for "|", "{" and "}", and more types of images. Other changes include:

  • Added RichText control.
  • Added BufferSize value name for Settings section. A note though, everything, including Type value for all fields are affected.
  • Added ReadOnlyTxtColor and ReadOnlyBgColor value names for Text and RichText controls.
  • Added ONTEXTSELCHANGE notification flag for RichText controls.
  • Bitmap, Icon and Animation controls have now fused together into a control called Image. The old control names are still supported for compatibility.
  • Image controls now use GDI+ or OLE when needed. So there are new file types supported: .jpg, .jpeg, .gif (GDI+ or OLE), .png, .tiff, .wmf, .emf (GDI+ only).
  • Older INI files braking notice: Renamed icon names for ToolTipIcon value name to INFORMATION,EXCLAMATION and STOP, as defined under the icon resources for the State value name for Image controls.
  • Added "\|" escape characters for ListBox, DropList, ComboBox controls.This applies to list based value names only.
  • Added "\|", "\{" and "\}" escape characters for ListView and TreeView controls. This applies to list based value names that do not use just numbers only.
  • Fixed internal memory leaks and bugs.
  • For Link and Button controls using DIRREQUEST flag:
  1. Fixed the non-disabling "OK" button when a non-folder item was selected (like My Computer).
  2. Added ability for the State INI value name to specify the initial folder shown in the DIRREQUEST dialog.
  • Now FONTREQUEST and COLORREQUEST flags for Button and Link controls output the control state even if a value is specified for the RefFields value name.
  • Fixed string not being truncated at the maximum buffer size allowed when Text and Password controls returned (IO bug).
  • Fixed Link and Button controls with DIRREQUEST flag: "|" character was appended everytime to the end of ListItems value name.
  • Corrected the formula to convert pixels into points for Link and Button controls with FONTREQUEST flag.
  • Fixed Link and Button controls State value name return value when used with FILE_OPENREQUEST and MULTISELECT flags: String was truncated to the first 1023 characters (1024 w/ the terminator character).
  • State INI value name for ComboBox controls now uses the text specified for the state if it is not one of the items specified in ListItems.
  • HSCROLL and VSCROLL flags won't work anymore if specified for controls that do not support this flag. The effect is simply useless.
  • Re-added EXTENDEDSELCT and REQ_SAVE flags for compatibility purposes with IO.
  • Fixed bugs #1287731 and #1283528.

I didn't have much time to test everything, but now you have a chance to test what's new. Also, I still need to implement flags for the Image control and some more code for transparency.

One more thing, I couldn't put support for "\\" characters for most of the controls that support the use of a list of items for input and/or output. I might be able to add that to the next version later.

To download IOEx, go to InstallOptionsEx wiki page

Background of Welcome/Finish

Posted by Deliverator on 08-22-2004 11:52 PM:

When using this with the Modern UI my Welcome and Finish pages are not displayed correctly.

The background of the window is gray, and the background of the text is white.

What am I doing wrong?
It seems this problem is back again? When replacing InstallOptions.dll with InstallOptionsEx.dll, the background of the page is not rendered correctly. I have attached a screenshot of:

NSIS\Examples\Modern UI\WelcomeFinish.nsi

Picture 1: With standard InstallOptions.
Picture 2: With InstallOptionsEX

I know it has already been stated that ModernUI may not work with InstallOptionsEX for various things, but I hope this particular problem may be fixed in the future? InstallOptionsEX has many features I like to use :) Thanks very much for writing it, by the way.

(PS: I tried to manually set the background color with

SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
[...]

But it does not seem to fix the issue.

I still didn't update the file. I have to upload every single file from this thread to wiki yet. You were downloading an older version of IOEx. I didn't think it would take that long to upload all those files, but now I know. Sorry if I didn't tell you that before...


Now it's ok to download, but I didn't upload older versions to wiki. This is still not a big issue. If you want older versions, just search the thread.


The new version works great, thanks. A few notes:

I thought the ComboBox (DropList) control had a broken pulldown menu on Windows 98. But it's a common problem, and here's the scoop:

"The reason is that when you specify the height of the control, you are specifying it's height when OPEN not when closed. ... you can use SetWindowPos() to increase the height, or specify a greater height when creating it in the first place."

Specifying a greater height in the .ini works as expected.

msvs 7.1 users will need this:

#ifndef USER_TIMER_MAXIMUM
#define USER_TIMER_MAXIMUM 0x7FFFFFFF
#endif
#ifndef USER_TIMER_MINIMUM
#define USER_TIMER_MINIMUM 0x0000000A
#endif

There's an alternative, which is to set the winver I think, but the above works just fine.


i don't quite understand how to use the "\|" escape characters. i also think the more feature are getting implemented, the more the overview of the documentation suffers.


Hehe. Don't blame me. Maintaining both plug-in and documentation is quite difficult.

This escape character only works for any value name which supports to input or output a list of items. A list of items is a list containing items that has the "|" character basically separating them (there are also some which use "{" and "}").

One exception for this is when a value name supports to input or output a list of items with only numbers, because there are only numbers + the "|" character allowed in there. "\|" is not a number.

When you use it in those conditions stated above, it results into a "|" character.

Common example: "ListItems" value name.

The use for "\{" and "\}" is even more complicated. They only work for those values that actually use "{" and "}". Example: "State" value name for ListView and TreeView controls.

Also, don't forget that "\\", "\n" and "\r" are not supported on most of the value names supporting list of items as input or output, except for "ListItems" and "State" value names for ComboBox and DropList controls. The "\\" -> "\" effect is applied before the "\|" -> "|" effect is applied. This is the thing that I should fix in the next version.

One "simple" code example of the usage:

[Field 1]
Type=TreeView
Left=0
Right=-1
Top=0
Bottom=-1
ListItems=\{\\\|A\|\\\}{\{\\\|A1\|\\\}|\{\\\|A2\|\\\}}\{\\\|B\|\\\}
State=0{1|2}3
Flags=CHECKBOXES
StateImageList=C:\Dev\NSIS Source\Contrib\Graphics\Checks\modern.bmp
You can't apply this to the "State" value name in this case because the CHECKBOXES flag turns it into a "number-only" list of items. Also, see that the "\\" -> "\" transformation doesn't happen in there.

Just a note: you always should use the flag CHECKBOXES w/ the StateImageList value name, or the flag won't work. Also the file has to exist, so you should change the path first.

BUG: When StateImageList points to an invalid file, it still applies the CHECKBOXES flag normally. This flag uses the default checkboxes when this happens. Those checkboxes don't have the features this TreeView control has.

a feature request
would it be possible to add a feature, which allows me to specify a default directory for contols (i.e. filerequest).

let's say the user has to specify a file in on of my ioex pages and that it's most likely that this file is stored in a specific directory (i.e. my documents). i would love to have the option to specify this directory, when the installer initialises. when clicking on browse (filerequest dialog), it would start browsing in that specified directory.


I'm not sure if this would work, but you could try storing an initial path in the box (State), and get rid of the text when the page is shown (with SendMessage ... "STR:").

-Stu


deguix, IMHO you should stop taking feature requests for a while and concentrate on stabilizing and documenting what you currently have.
I want to add support for InstallOptionsEx to EclipseNSIS, but I am hesitant because IOEx is in constant flux.


No problem. I'll try to fix the maximum amount of bugs that appear. There aren't many though (except in docs). But I generally find more because I have to test most of the stuff; bugs generally aren't reported to me, even with the huge amount of people that read this thread.

Maybe I should put this plug-in somewhere like sourceforge. It will probably be more organized, and will support some direct feedback without cluttering the forums more than they are already... a dump of this would probably take many days.

would it be possible to add a feature, which allows me to specify a default directory for contols (i.e. filerequest).

let's say the user has to specify a file in on of my ioex pages and that it's most likely that this file is stored in a specific directory (i.e. my documents). i would love to have the option to specify this directory, when the installer initialises. when clicking on browse (filerequest dialog), it would start browsing in that specified directory.
Well, okay... what should I do then? Put it in "ListItems" or to make the plug-in to select the path from the file path automatically by using an extra flag? If "MULTISELECT" flag is specified, would the path of the first file be used if you want me to add the extra flag feature?

Could I ask you a question? Do you think the plug-in is confusing to use (except for the documentation which needs adjustments)?

I think moving the project to SourceForge would be a great idea. It will add more structure to your development, with clearly defined trackers for bugs, feature requests, etc. You can better manage what you are doing. Plus you get all the associated stuff for free (e.g., source control, release mechanism, etc.). Also, you may be able to recruit other developers to help out with it.
The plugin can be overwhelming, I feel, for a new user since it has sooo much stuff in it (given that the documentation is not synced up yet).


Next version, 2.4.2 beta 6, is going to have removed the GPL code for allowing more types of images. Does anyone have any suggestions for a free code (no GPL, no commercial licenses) replacing the current GPL code for this? If yes, then I can include it readly. Also, part of it is not considered GPL because it was taken from another source, so I can modify it to not be a copy anymore. Thus, general support for .jpg, .jpge, and .gif image types is still on IOEx.

I'll only talk about the other modifications when I release it.


Just for reference, I think the last message on the GPL found its basis at :
WINAMP.COM | Forums > Developer Center > NSIS Discussion > Changing the form
http://forums.winamp.com/showthread.php?threadid=230625
-----
GPL: http://www.gnu.org/copyleft/gpl.html
I don't mind the GPL so much myself - I admire its premise, actually.
The problem, at least to me, is that I've never found it quite clear what happens when you include a -compiled- piece of GPL code in your product or distribution.

I.e. if somebody were to use InstallOptionsEx with the GPL code in there, I can only imagine that it would consitute one of the two basic things..
- you're distributing a GPL'd product
- you're dynamically linking to a lib (the dll is 'separate' in the installer and gets extracted - so it doesn't become an integral part to the installer code itself)
So as far as I can tell - using InstallOptionsEx with the GPL'd code in the binary doesn't mean your entire installer becomes GPL - much less so any other software you may be installing with the installer.

However, it does leave questions such as :
- do I need to include the GPL text with my installer ?
- do I need to display that GPL code is being used ?
- do I need to give users access to the source code of InstallOptionsEx if they were to ask for it ? and/or include it ?
etc.
I believe the answer to all the above is 'yes', but I'm not a lawyer :)

-----
Lastly, separate of the GPL, InstallOptionsEx has its own licensing requirement;
"3. This notice may not be removed or altered from any distribution."
Similar questions - where, when and how should said notice be included ? Or does it apply to distributions of the InstallOptionsEx -package- only ? i.e. doesn't apply if you're simply using the plugin in your installer.

Thanks in advance :)


The maximum thing needed is to inform the user about IOEx and where it's source code is when there is GPL code, which is already not good for me.

Lastly, separate of the GPL, InstallOptionsEx has its own licensing requirement;
"3. This notice may not be removed or altered from any distribution."
Similar questions - where, when and how should said notice be included ? Or does it apply to distributions of the InstallOptionsEx -package- only ? i.e. doesn't apply if you're simply using the plugin in your installer.
Well, this part shows the reasoning of this:
[...] to alter it and redistribute it freely, subject to the following restrictions
This "and" shows that it applies only when altering the code and redistributing it.

Ahhh okay... I'm not a lawyer, etc. but I think phrased that way it's actually two separate terms... e.g.
"to alter it, subject to the following restrictions"
"to redistribute it freely, subject to the following restrictions"'

The intended meaning, I *think*, would be phrased as "to alter and redistribute it freely, subject to the following restrictions"

Regardless though - cool, thanks for clarification :)


I just forgot to say that it won't have the features I planned for it, it will be just a quick version to fix the GPL issue and some other fixes I picked up. Also, as NSIS 2.11 was released with InstallOptions version 2.44, it's going to be called "IOEx 2.44 beta 1" (Next time I should consider how I put versions on my projects, now I can only go forth to version 3 or to make patches for IO with IOEx code).


InstallOptionsEx 2.4.4 beta 1 - DLL + Source
New version released. No much was changed, as expected. See the full list of changes for this version:

  • Removed GPL'd code from the plug-in. Removed support for GDI+, which in turn, removed newer systems support of .png, .tiff, and .emf files.
  • Added support for the key "F2" on TreeView and ListView controls.
  • Fixed the selection of the last item with the "End" key in a ListView control without the CHECKBOXES flag and without using LargeImageList INI key.
  • Fixed: When StateImageList points to an invalid file, it still applies the CHECKBOXES flag normally.
  • Fixed: When a label was not changed in TreeView or ListView controls that use the EDITLABELS flags, it was emptied.
To download IOEx, go to InstallOptionsEx wiki page

BTW this plug-in supports png and other formats without GDI ;)
May be problems with some complex variants of tiff formats on systems with old IEs (or may be not, I cannot remember this precisely in the sunday evening) :)


Yes, I saw your plug-in source code one time, but I didn't got the inclusion to work. I might try to do that again later, or you could submit a patch, if you can read a big amount of code... Just search for IMAGE_TYPE_OLE and you can find the current OLE implementation I have. I think your code is somewhat based on that.


I have an AVI being displayed in an Image with the TRANSPARENT flag, and it's only transparent on Windows XP with XPStyle on. What do I have to do to get a transparent Animate?


Reproduced. I just can't understand, it works for some avi, but not for others. Does your avi have a sound channel in it and is of type "MS-RLE" of 8-bits? I've tested two avi files, one with sound w/ 8-bits "MS-RLE" type, and another without, to see if transparency went ok. The one w/ sound had this transparency problem.

Maybe the new version of the control for WinXP fixes this problem. This is not mentioned in MSDN.


I'm looking at properties on the file in Windows XP and on the summary tab under "Video" it says it is an 8-bit MS-RLE, 4fps 3kbps, and under "Audio" says "4 seconds". I used the "AVIEdit" tool from some oldish version of the windows SDK to create the AVI. Does this help?

Edit: Made a mistake, that's the wrong AVI, the one above works fine. The one that doesn't work says: Under video, the correct avi is 15fps, 1164kbps, 24 bit sample size, uncompressed. Under audio it says "2 seconds". I think I need to try converting it to MS-RLE. A 3MB AVI for 2 seconds of video is just stupid.


I managed to convert it to RLE and it worked fine. The problem was I needed to convert it to 8-bit, otherwise the codec wouldn't appear. So I opened the uncompressed avi in quicktime pro, exported it as a uncompressed avi in 8-bit color, load it back into aviedit, and exported it to RLE there. Thanks quicktime!


I hate asking questions that I feel I should have been able to find the answer to, but I couldn't, so I have to ask.

Is there a way to change the cursor to a Hand, when it is over an Image control using a GIF image?

Basically I'm using the Image control with a GIF image, and the NOTIFY=ONCLICK event to call the leave/validate function which in turn will open up a link. But I would like the cursor to be a hand, so that people realize the image is clickable.


Yes, I saw your plug-in source code one time, but I didn't got the inclusion to work. I might try to do that again later, or you could submit a patch, if you can read a big amount of code... Just search for IMAGE_TYPE_OLE and you can find the current OLE implementation I have. I think your code is somewhat based on that.

Attached short 'page' sample shows how IImgCtx may be used: ownerdraw control and paint on wm_drawitem. Both Ole and Ctx support transparency, so you can skip 'window region' part for them.
I also updated my plug-in - it's 'the best' version was lost during last archive crash.


Is there a way to change the cursor to a Hand, when it is over an Image control using a GIF image?
Try NotifyCursor=HAND.

Now, about the IImgCtx interface: is there anywhere a list of image types supported by the older IE versions and when this interface was started to be used on IE? This is just to know what image types it adds.

(Found in russian): It appeared in Internet Explorer 4.0 and supports BMP, GIF, JPEG, ICO, WMF, EMF, PNG, XBM, CUR, TIFF (may be others).
About some tiff limitations I read here http://codeproject.com/bitmap/JianImgCtxDecoder.asp


Thanks. I'm not working on the plug-in now, but when I will, I'll implement this.


Hi - I've just downloaded the latest version of IOEx from the link given above, and I have the problem with the Welcome and Finish pages not displaying correctly. Was this not fixed? Do I have the wrong version of the file?


Hmmm... There are probably 2 problems in the latest version:
- some problem when using "Text" INI key name for "Image" controls.
- trying to color the dialog itself - which is probably unhandled by the plug-in at all.

I still couldn't even start to work on features for next version though, so I can't expect it to be released even on next month. You should pretty much try to go around the problems, but right now I can't say much than just that.


FileRequest - Text & Button example?
I can't seem to find an example anywhere of an InstallOptionsEx Text & Button FileRequest dialog. Could someone please post an example .ini file? Thanks!



[Field 1]
Type=Text
Left=0
Right=100
Top=0
Bottom=10

[Field 2]
Type=Button
Text=...
Left=110
Right=125
Top=0
Bottom=10
Flags=OPEN_FILEREQUEST
RefFields=1
Notify=ONCLICK

Thanks Deguix, you're the man!

I converted from IO to IOex, and now have two problems:

1. For some reason the file Filter isn't working for me. It truncates the last character of the name, showing "DB Config Fil", and all files are still visible. I've tried lots of different examples, including copying directly from the readme.

[Field 1]
Type=Text
Left=8
Right=283
Top=21
Bottom=34

[Field 2]
Type=Button
Text=Browse
Left=192
Right=242
Top=68
Bottom=84
Flags=OPEN_FILEREQUEST
Filter=DB Config File|*.xml
RefFields=1
Notify=ONCLICK


2. When a file is selected and Open is clicked, the Installer goes to the next page immediately, instead of going back to the DBConfigXML custom page and waiting for the user to click Install.

Function DBConfigXML
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
Push $R0
${Plugin}::dialog $PLUGINSDIR\DBConfigXML.ini
Pop $R0
FunctionEnd

Function ValidateDBConfigXML
ReadINIStr $DB_CONFIG_FILE "$PLUGINSDIR\DBConfigXML.ini" "Field 1" "State"
IfFileExists "$DB_CONFIG_FILE" OK
MessageBox MB_OK|MB_ICONSTOP 'File does not exist.'
Abort
OK:
FunctionEnd


Thanks in advance.


1. For some reason the file Filter isn't working for me. It truncates the last character of the name, showing "DB Config Fil", and all files are still visible. I've tried lots of different examples, including copying directly from the readme.
When I comeback for IOEx development, I'll look at it.

2. When a file is selected and Open is clicked, the Installer goes to the next page immediately, instead of going back to the DBConfigXML custom page and waiting for the user to click Install.
This is normal because a notification flag is used. You should use abort in the custom page function when this is used.

Custom page bitmap disappeared after replacing IO with IOEx
Hi,
I've problem with bitmaps on custom pages.
I've downloaded InstallOptionsEx plug-in and saved InstallOptionsEx.dll on InstallOptions.dll in NSIS directory.
After that images on custom pages are not displayed.
With InstallOptions.dll installator worked properly.
Any help will be appreciated.


Because futuraly I want to patch InstallOptions with changes I mostly developed, I'll be working only on InstallOptionsEx for a while, and no other projects will be involved.

All those bugs were confirmed and all are my fault. Damn. These bugs are the ones confirmed:

- Image controls bug: Some image types don't work - bitmaps for example. Internal problems can range from not recognizing the file as image and not identifying the image type as to be destroyed.
- Filter key name bug: Last character is cropped. Internal problem is the replacement of last char with "\0".
- Dialog coloring bug: Since IOEx 2.4.1 beta 6 (version which custom drawn controls were implemented). I didn't check this one out yet.


I Need to use InstallOptionsEx, but unfortunately, with the lastest version, the background don't work correctly and the bitmaps are not draw.

But you know it already.

Thus can you give online the lastest version where this two bugs did not exist?

Thank you in advance.


InstallOptionsEx 2.4.4 beta 2 - DLL + Source
Sorry about that. New Release:

  • Fixed: Image controls implementation was coded poorly.
  • Fixed: Dialog box now can be colored (bug introduced IOEx 2.4.1 beta 6).
  • Fixed: Filter key value had last character chop down.
  • Fixed: Filter key value's first item in array is the only one detected.
  • Fixed: Filter key value can overrun the buffer by one byte besides the "BufferSize" limit for characters.
  • Added: Ability to convert "\\" to "\" in lists.
  • Fixed: The ListItems value name for ComboBox and DropList controls can't have the combination "\\" and "\|". This needs to be verified.
I'm very unhappy with the progress of this project. I was hoping to be able to use its multithreading capabilities to allow the creation of multiple windows.

I actually have almost no interest in an old project, which was the inspiration for all of those changes in this plugin, so you can only expect me to don't implement much at all to this plugin anymore. Maybe someone else might be interested in continuing this on, principally because my needs were realized already, and the TODO list contains suggestions - which are not always what the developer needs. I couldn't even adapt myself to newer plug-in versions, and my programs still use older versions of my own plug-in.

Documentation overhaul
Perhaps you should consider changing the documentation layout-wise - increase the indentation on sub-sections etc becuase the current version can be a bit hard to read.

I've attached an updated basic.js file that makes the text areas padded by 0.2in. Only change was:

document.write('<div id="' + pszDivisionPrefix + nTable + '" class=sc><table ');

changed to
document.write('<div id="' + pszDivisionPrefix + nTable + '" class=sc><table style="padding: 0.2in;" ');


hope this helps
nice plugin :)

-dandaman32

Archive: InstallOptionsEx


The new version does not work better :-(

Look at the WelcomeFinish example.


Hmmm... shit! I forgot to post the dll of the newer version! Fixed. Sorry for the forgotten new dll file.


Thank you very much


There are two other bug:

The checkBox, radiobutton, textbox (and maybe others) cannot have their background color and their text color changed by the SetCtlColors instruction.

I have also an other problem with a page which use a ListBox:
It post a MessageBox with the title "error" with the list of the items of the messagebox. If I click on ok, it repost the same messagebox but with the first character in less and so on until there do not remain any character and it jump the page... This page work well with the original InstallOption.


I found a problem with the new DLL that has been upload today, the real 2.44 beta2, I used IOEx to display the installer icon, and it doesn't work anymore, the only thing that works is to display an external icon using the text field in the ini, but i cant use the default installer icon(internal)
I worked without problem with the previous IOEx version.


InstallOptionsEx 2.4.4 beta 2 PB 1 - DLL
I released the Post Build #1 with quick fixes for the bugs discussed.

I've also implemented dandaman32's suggestion of padding to docs text tables - I used 2% of indentation for text tables (instead of 0.2in) in the style.css file -> better for smaller resolutions. Still, I don't know how it would look in a 640x480 resolution.

InstallOptionsEx wiki page


Thanks for the quick fix...


Thanks for the fix of my bugs.


Still, I don't know how it would look in a 640x480 resolution.
Nobody uses elinks anymore :)
I have a linux server that runs maybe a pentium 200mhz and a 2.5gig hd and trustix 3.0 rc1 ...the only time i use gnome 2.10 is when i'm testing its website with firefox, and even then the video runs at 1024x768.

-dandaman32

Thanks for the quick fix.../Thanks for the fix of my bugs.
After that, I had to make up for my mistake somewhere :).

and even then the video runs at 1024x768
That's the resolution I thought about when I used those precentages, so it won't have problems.

I still found another bug:

with the Link control:

In the finish page, when I define:
!define MUI_FINISHPAGE_LINK "Text Link"
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.address.com"
The background is not colored, and the text link does not appear. Moreover, when I click on this link, Nothing occurs :-(


Another small thing:

The vertical scrollbar (VSCROLL) don't work with a multiline textbox, contrary to the horizontal scrollbar (HSCROLL).


I have finally backtracked to where the East Asain strings will work with IOEx. 2.4.1b9 is the first version while backtracking that I was able to get strings to appear correctly using IOEx. If you need/want more information, just let me know.


It appears that the function ConvertVariables, called from myGetProfileString on line 874 in InstallOptions.h, is what is garbling the data because when I comment out that function call, my strings appear correctly.

For testing purposes, you can change your system locale for non-Unicode applications to Japanese, Chinese, etc. to see the strings show up correctly.


InstallOptionsEx 2.4.4 beta 2 PB 2 - DLL
I released Post Build #2 with more quick fixes for the recent bugs discussed. String manipulation functions were ravamped with old modified InstallOptions functions to support multibyte code pages. VSCROLL flag was fixed for Text and Password controls.

Changes for the adaptation with Modern UI: Link controls will always have the color set in the ini file, or if defaults are used and SetCtlColors is used, then it will use the SetCtlColors colors, and if that instruction is not used, only then it will use the default colors. Also, NotifyCursor is now set to "HAND" by default when using those controls. It is still needed to use Notify key to have the ONCLICK notification flag though - This allows to use other notifications with Link controls without always firing the ONCLICK notification flag when not needed.

Thus, the use of !define MUI_PAGE_CUSTOMFUNCTION_PRE and !insertmacro MUI_INSTALLOPTIONS_WRITE are required in Modern UI if you want to implement links using InstallOptionsEx.

InstallOptionsEx wiki page


FYI: 2.4.4b2PB2 I think was compiled in Debug mode because every time the screen is redrawn, I get a messagebox display 0.


My bad... Fixed.


It work fine, thanks.


Is is still me,

In the lastest version (2.44) of InstallOption, I can read in the version history:
"Added HWND and HWND2 entries to the INI file to avoid messy calculations of the correct control id."

Can you add this into InstallOptionEx?

Because it is very usefull and I need it in one of my install.

Thanks in advance.


hello,

There is a option which could be interresting:

That InstallOptionEx can, automatically, sort the itemslist alphabetically before posting them in the listbox, treeview, droplist, combobox...

Because it is rather complicated to do it in NSIS script because the StrCmp instruction cant compare if a string is inferior or supperior.


In the lastest version (2.44) of InstallOption, I can read in the version history:
"Added HWND and HWND2 entries to the INI file to avoid messy calculations of the correct control id."

Can you add this into InstallOptionEx?
There is no messy ID calculation: the field you chose + 1200 - 1 is always the field you want... thus, it's the same as using GetDlgItem, so there is no point in it.

That InstallOptionEx can, automatically, sort the itemslist alphabetically before posting them in the listbox, treeview, droplist, combobox...

Because it is rather complicated to do it in NSIS script because the StrCmp instruction cant compare if a string is inferior or supperior.
There's this Array plug-in for that. I don't need to implement what's already have been implemented in another plug-in (removed from TODO).

I have a bunch of different labels on my page and none of them are tabstops anymore (and I don't have that flag set to make them notabstop). Is there a new setting somewhere that I'm missing?


There's nothing wrong. Label controls can't be focused, so they are always not "tabstopped". There is no sense in adding a "tab stop" option for that type of control, unless if you make it a "link" by using notification messages. Maybe unifying both "label" and "link" controls would solve this problem...


Yeah, I'm using a label as a link because I have a background image and it was causing me issues when I would use a link control and not a label because the link control would cause unpredictable behaviour, it seemed. For instance, when I would click a link, the link worked, but it would sometimes also register a state change on another control or it would not allow my exit button to work (using a modified resource file with no Cancel button but instead a custom button).

What you could do is get rid of the link control and instead have a label control do both (since it can) and have a flag for it called TABSTOP. Just a thought.


I'll test this later and think about making Label and Link to be only one control - still, this provides some more compatibility problems with Modern UI.

Now InstallOptionsEx plug-in project can be found in SourceForge: http://sourceforge.net/projects/nsis-ioex. I'll upload stuff there in a week. You can already start posting bug reports, suggestions and patches too. I'm not planning on creating a web-site though - it would be a waste of effort.

If someone else would like to be a project admin, if you have some time to maintain the project there, then you could suggest here too. Even with some enough time I'm having, I'm still not really focusing much in this project, and I'm just lazy in working in a project...


How can I add VSCROLL to RichEdit?
Is it Supported??


RichEdit
I have the newest version but it do nothing if I add VSCROLL flag


Sorry, I'll do that after I finish uploading stuff to the sf project page. I already uploaded CVS files, but I just don't know how can I make automated CVS builds of the plug-in like NSIS dev snapshots.


good job!

But:
There is a bug in TreeView with Checkboxes.
When i unselect Checkboxes and select them again State is still 0.
I used ONSELCHANGE as notifier.

btw. ONSELCHANGE is working probably also not correct.
it recognizes only focus changes on treeView-items.
ONSELCHANGE should get Checkboxchanges or iam wrong?

It would be also nice if you could implement a focusState for treeView-items. So the selectet itemLabel can be read out.


:o

I couldn't reproduce the first one and third bugs, because I can't even get the CHECKBOXES working. :( The second one was reproduced, so I do expect those others to be true. I even got another bug: ending a level is normal, but ending two levels or more at once will make these levels except the first one and the main level to add an extra empty item, like when using "{{". This came with the multibyte charsets fix.

Now about the focus state, you can get it using TVM_* messages with the System plug-in. I'm also accepting help from the NSIS coding side to make functions available for either compile-time or run-time for the plug-in. Those functions would be great for operations like to get the focus state from an item in the TreeView control.

I got everything uploaded and ready in the sf, so I'll be working on IOEx in the weekend. I still got to accomodate myself to upload commits to the CVS.


I think I've found a bug with the Button control when using:

1. The OPEN_FILEREQUEST flag;
2. The RefFields=Field_ID key; &
3. TIMEOUT=time_in_ms key in the Settings section.

I use the TIMEOUT key to leave the page and decrement a counter (countdown timer) before updating the page with a WM_SETTEXT and returning (via Abort). When a control is clicked the countdown stops and no more WM_SETTEXT messages are sent, but the TIMEOUT notification still occurs.

I can successfully use the Button control to browse the file system and select a file but as soon as the browsing dialog closes (if I double-click the file or click the “Open” or “Cancel” buttons) the page returns a State value of “0” (the page) and a Notify value of “ONNEXT”…! If I disable the TIMEOUT function, the problem disappears. Similarly, if I increase the TIMEOUT value to about 8000ms the problem becomes less frequent… Everything else seems to work…

Here are some of the pertinent elements of the dialog *.ini file, FYI:

[Settings]
NumFields=20
TimeOut=1000
NextButtonText=Configure...

[Field 1]
Type=Label
Left=61
Top=130
Right=185
Bottom=137
Text=Seconds until these options are used:
TxtColor=0x0000FF

[Field 2]
Type=Label
Left=189
Top=130
Right=205
Bottom=137
Text=30
; TxtColor=0x0000FF remarked out as it breaks WM_SETTEXT function… :(


[Field 11]
Type=Text
Left=147
Top=104
Right=239
Bottom=117
State=c:\unattend.txt
Flags=DISABLED

[Field 12]
Type=Button
Left=243
Top=104
Right=282
Bottom=117
Text=&Browse...
RefFields=11
Notify=ONCLICK
Flags=OPEN_FILEREQUEST|FILE_EXPLORER|DISABLED


Any chance you can help me with this one?


Edit to previous post:

Fields 11 & 12 are disabled when the page shows, but if a user clicks a related checkbox, Field 10 (not shown above), EnableWindow $HWND 1 is used to enable the controls. Removal of the DISABLED flag had no effect on the problem.

NSIS 2.15 and IOEx 2.4.4b2a2 are in use.

Any help or alternative solutions appreciated.

Excellent plug-in btw.


I cannot promise anything, but I'll return to make updates to this plug-in this week, even if not published. I see I'm going to have some new school projects to do, but I'll try to speed up development anyways. I plan to stop developing other projects for other communities to work on this one.

I still didn't make many changes yet and I couldn't verify how your problem happens quotient. Hopefully, I'll find the answer this week.


crashing
Using:
2.4.4 beta 2 PB 2
NSIS 2.15

I get a crash anytime I have any $ variables in my ini file.
This worked previously.
Here's the ini that used to work:

[Field 1]
Type=Label
Text=Setup will install $5 in the following folder. To install in a different folder, click Browse and select another folder. Click Next to continue.
Left=0
Right=-1
Top=0
Bottom=30

[Field 2]
Type=Label
Text=Select the install type:
Left=0
Right=80
Top=40
Bottom=56

[Field 3]
Type=DropList
ListItems=Default Install|Custom Location
State=Default Install
Notify=ONSELCHANGE
Left=80
Right=-80
Top=38
Bottom=94

[Field 4]
Type=GroupBox
Text=Destination Folder
Left=0
Right=-1
Top=70
Bottom=105

[Field 5]
Type=Text
State=$4
Left=10
Right=-75
Top=85
Bottom=97

[Field 6]
Type=Button
Flags=DIRREQUEST
Text=B&rowse...
Notfy=ONCLICK
ListItems=Select the folder to install $5 in:
RefFields=5
Notify=ONCLICK
State=$4
Left=-67
Right=-12
Top=83
Bottom=98


I'm not sure why it crashes with $, but anyway you can't just put a $var in the INI file and hope that it is going to be replaced with the value of the variable itself (unless the plugin itself does this now?)
You should write the new strings containing the variables at run time with WriteINIStr.

-Stu


Well, it did work previously.
Also, WriteINIStr would only affect the strings on load, while one of those $ vars ($4) is used to display the user's current choice, which could change many times after load.


well, this probably happens after the fix about multibyte strings showing correctly (latest alpha). You can try a previous alpha (Post-Build) from the 2.4.4 beta 2 release. It doesn't have this multibyte strings fix.


Just wondering if you were thinking of giving the label controls tabstop functionality like I had mentioned a little while ago?

Thanks.


Thanks deguix, 2.4.4 beta 2 (PB 1) works great for me.


Tabstop is done, merge of Label and Link controls is still not done... I'm not using CVS yet, because I often have to call back a change.


Archive: InstallOptionsEx


Thinking about several months about this, I should abandon this project now.

First and main reason is that I don't like hacking environments like the Windows GUI - there are many glitches with everything. I like working in an already solid environment or an unstable one with the ability to change how it works. NSIS is stable, but Windows API is "stable" with bugs, which is more like unstable for me.

Second is the continuity of a project. I don't like to change the same code over and over again, I like to create new things instead, without rewriting old code once again.

Third, I like language standards and low-level coding to improve high-level coding, and I like when there exists a "model" code that can be changed later to create variations.

Thank you for at least saying that this is a good project, and making suggestions and mentioning bugs. I see that someone will take advantage of some of the code for his own purpose.


Ok, cool. That's going to help out a lot. Thanks!


thanx for all you did man!

though i never used it, its for sure a great plugin!

i'll pack it with the plugin rollup package i plan to release in the next months :)


It would be better to standardize the code first, so that only necessary plug-ins would be used and implemented in the package.


I don't like to change the same code over and over again, I like to create new things instead, without rewriting old code once again.
Unfortunately, the reality of software development is that old code needs to rewritten/fixed several times until it passes some predefined level of acceptability. And THEN go on to the new stuff. Just the nature of the business. :)
(Doesn't seem to stop Microsoft, however :D)
Anyway, good luck with whatever you decide to do next.
I suppose I will shelve my plans for IOEx support in EclipseNSIS- I was waiting for it to get out of beta stage. :(

Problem with the TreeView
Good evening,

I have a problem with the treeview:

When I select a subitem, only the parent item is reported in "State"

[Field 3]
Type=TreeView
Left=0
Right=-1
Top=41
Bottom=-12
Notify=ONSELCHANGE
ListItems=A|B|C|D|E{F|G}H|I{K|L|M}N|O
State=E

In this example, if I select "F" or "G", "state" will be equal at "E" intead of "E{F}" or "E{G}" as it should.

Can you fix this?


Well, I'm in a vacation, and the project is abandoned. But I might return developing it later, if I develop another project needing this.

You could always test older versions to "fix" whatever the problem you need. Still, thank you for continuing to report stuff.


how to perform a file request?

please give me a code example for ini + nsi.

thx