Skip to content
⌘ NSIS Forum Archive

InstallOptionsEx

368 posts

Guest#
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 :-(
Guest#
Another small thing:

The vertical scrollbar (VSCROLL) don't work with a multiline textbox, contrary to the horizontal scrollbar (HSCROLL).
goldy1064#
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.
goldy1064#
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.
deguix#
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
goldy1064#
FYI: 2.4.4b2PB2 I think was compiled in Debug mode because every time the screen is redrawn, I get a messagebox display 0.
Guest#
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.
Guest#
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.
deguix#
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).
goldy1064#
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?
deguix#
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...
goldy1064#
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.
deguix#edited
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...
deguix#
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.
naxan#
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.
deguix#
😳

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.
quotient#
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?
quotient#
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.
deguix#
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.
NeoAlus#
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
Afrow UK#
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
NeoAlus#
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.
deguix#
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.
goldy1064#
Just wondering if you were thinking of giving the label controls tabstop functionality like I had mentioned a little while ago?

Thanks.
deguix#edited
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.