Skip to content
⌘ NSIS Forum Archive

InstallOptionsEx

368 posts

deguix#
Yeah, I know... As those can be used externally as well, I will add them to IOEx documentation.
deguix#
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.
deguix#
InstallOptionsEx 2.41 beta 10 - DLL Source

...
deguix#
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.
deguix#
InstallOptionsEx 2.41 beta 11 - DLL Source

...
deguix#
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.
deguix#
InstallOptionsEx 2.41 beta 11 (Public Build #2) - DLL Source

...
deguix#
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...
flizebogen#
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
deguix#
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.
deguix#
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.
WebMatze#
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
deguix#
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.
WebMatze#
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
flizebogen#
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.
deguix#
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.
deguix#
InstallOptionsEx 2.4.1 beta 12 - DLL

Now I fixed yours (try it please).
Yathosho#
do you plan to add more examples to the documentation? i tried to use the tooltips, but failed miserably 😛
Toopak#
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!
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
Toopak#
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 🙁
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
Toopak#
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. 🙁
Toopak#
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! 🙂