Dave, thx, i'll download it now.
I didn't realize there was a difference between 1.9 from Nullsoft and that from firehose...
Greetz, Hendri.
InstallOptions as an extension DLL
42 posts
it works!!!
hmmm,
now the splash works and the installer doesn't move to the background anymore (I also removed BringToFront)
But also the page numbers have changed!!! so I had to adapt onNextPage and onPrevPage commands...
but it works fine now.
The nice thing about onNextPage and onPrevPage is that it's possible to do something like .onVerifyInstDir but now only after clicking install. So much problems solved!
Thx greetz, Hendri.
hmmm,
now the splash works and the installer doesn't move to the background anymore (I also removed BringToFront)
But also the page numbers have changed!!! so I had to adapt onNextPage and onPrevPage commands...
but it works fine now.
The nice thing about onNextPage and onPrevPage is that it's possible to do something like .onVerifyInstDir but now only after clicking install. So much problems solved!
Thx greetz, Hendri.
Re: it works!!!
--
Dave.
Originally posted by Smile2MeSorry about that.. my fault 🙂 They shouldn't change again...
But also the page numbers have changed!!! so I had to adapt onNextPage and onPrevPage commands...
Thx greetz, Hendri.
--
Dave.
Dave, thx, it's ok...
the change of page numbers was due to the movement in .onInit,
but i saw the problem and what caused it, so no problems anymore 😁.
Now my installer does everything i always wanted it to do:
-Check dir at clicking install
-display splash
-ask for regcode
-create backup
-install the main program into another application
-automatic uninstall if previous version is detected
-and much more....
so i'm happy 🙂
Maybe, after the 4th of january, Justin will post new possibilities for NSIS and i will get back to work again, but for the moment:
HOLIDAYS!!!
Thx all and greetz, Hendri.
the change of page numbers was due to the movement in .onInit,
but i saw the problem and what caused it, so no problems anymore 😁.
Now my installer does everything i always wanted it to do:
-Check dir at clicking install
-display splash
-ask for regcode
-create backup
-install the main program into another application
-automatic uninstall if previous version is detected
-and much more....
so i'm happy 🙂
Maybe, after the 4th of january, Justin will post new possibilities for NSIS and i will get back to work again, but for the moment:
HOLIDAYS!!!
Thx all and greetz, Hendri.
1.90 changes schmanges
Here's what I want to do:
I have a folio of work which I plan to distribute on CD. When the user runs the installer they are given a choice whether they wish to install the folio to their harddrive and run it as an application or run a "lite" (HTML version) from the CD. If the user selects the app version then the installer continues, otherwise I open the webpage and the installer aborts.
Unfortunately the difference between 1.90 at firehose.net and the newer 1.90 has broken my script. With 1.90 from firehose.net I could call the InstallOptions dll with .onInit and the first screen the user saw was my InstallOptions choices page. Now when I compile and run it, it skips the InstallOptions screen and jumps right to the component page.
While I could continue using the older 1.90 I will probably want to take advantage of improvements/features in later releases. So how can I implement this in the new version?
Here's what I want to do:
I have a folio of work which I plan to distribute on CD. When the user runs the installer they are given a choice whether they wish to install the folio to their harddrive and run it as an application or run a "lite" (HTML version) from the CD. If the user selects the app version then the installer continues, otherwise I open the webpage and the installer aborts.
Unfortunately the difference between 1.90 at firehose.net and the newer 1.90 has broken my script. With 1.90 from firehose.net I could call the InstallOptions dll with .onInit and the first screen the user saw was my InstallOptions choices page. Now when I compile and run it, it skips the InstallOptions screen and jumps right to the component page.
While I could continue using the older 1.90 I will probably want to take advantage of improvements/features in later releases. So how can I implement this in the new version?
Mmm, sorry about that, my fault again 🙁
The last couple of 1.9 betas and the original 1.90 broke some installers' splash screens behaviour because they were changed so that .onInit was called after the NSIS window had been created. I submitted a modification which Justin kindly merged in which put the call to .onInit back to where it was (before the NSIS window is created). However, the .onNextPage callback was also changed so that it is also called before the first page (the same place .onInit was called in the original 1.90), so you can move your call to InstallOptions to the .onNextPage function to get the same behaviour as before. The only other change you'll need is to set a flag (in .onInit) and test for it before showing InstallOptions, as .onNextPage is called for every page change.
--
Dave.
The last couple of 1.9 betas and the original 1.90 broke some installers' splash screens behaviour because they were changed so that .onInit was called after the NSIS window had been created. I submitted a modification which Justin kindly merged in which put the call to .onInit back to where it was (before the NSIS window is created). However, the .onNextPage callback was also changed so that it is also called before the first page (the same place .onInit was called in the original 1.90), so you can move your call to InstallOptions to the .onNextPage function to get the same behaviour as before. The only other change you'll need is to set a flag (in .onInit) and test for it before showing InstallOptions, as .onNextPage is called for every page change.
HTHFunction .onInit
StrCpy $9 ""
FunctionEnd
Function .onNextPage
StrCmp $9 "" isFirstPage
Return
isFirstPage:
StrCpy $9 "Y"
; Do InstallOptions stuff
FunctionEnd
--
Dave.
thanx
problem solvered!
problem solvered!
MUI_INSTALLOPTIONS_DISPLAY not filling in text
I am following the UltraModernUI docs for custom pages, and doing the following:
* In my init, I am using MUI_INSTALLOPTIONS_EXTRACT_AS on my ini
* I am then using MUI_INSTALLOPTIONS_WRITE to write some defaults to text fields
When I display it using MUI_INSTALLOPTIONS_DISPLAY, these fields are blank.
I have verified that the INI in the temp directory has the correct text in the fields (Text=foo).
I just tried putting default text directly into the INI itself and removing my MUI_INSTALLOPTIONS_WRITEs and it still doesn't fill in the text when I display the page.
Any idea what am I missing?
Thank you.
- Andy
I am following the UltraModernUI docs for custom pages, and doing the following:
* In my init, I am using MUI_INSTALLOPTIONS_EXTRACT_AS on my ini
* I am then using MUI_INSTALLOPTIONS_WRITE to write some defaults to text fields
When I display it using MUI_INSTALLOPTIONS_DISPLAY, these fields are blank.
I have verified that the INI in the temp directory has the correct text in the fields (Text=foo).
I just tried putting default text directly into the INI itself and removing my MUI_INSTALLOPTIONS_WRITEs and it still doesn't fill in the text when I display the page.
Any idea what am I missing?
Thank you.
- Andy
(Was just replying when the thread moved. How confusing.)
Figured it out...
The old version of my installer (which worked) used this for Text fields:
Figured it out...
The old version of my installer (which worked) used this for Text fields:
which I updated to this:WriteINIStr $PLUGINSDIR\Foo.ini "Field 1" "Text" $SOME_STUFF
Apparently the correct thing to set on a Text field is "State":!insertmacro MUI_INSTALLOPTIONS_WRITE "Foo" "Field 1" "Text" $SOME_STUFF
!insertmacro MUI_INSTALLOPTIONS_WRITE "Foo" "Field 1" "State" $SOME_STUFF
From the documentation:
Text: "Specifies the caption of a label, checkbox, or radio button control. ..."
State: "... For edit texts and dir and file request boxes, this is the string that is specified. ..."
I'm guessing its in state because the user can normally change it and on the page leave callback function you just read the state even if the user did not change anything on the page and it will still work correctly.
Text: "Specifies the caption of a label, checkbox, or radio button control. ..."
State: "... For edit texts and dir and file request boxes, this is the string that is specified. ..."
I'm guessing its in state because the user can normally change it and on the page leave callback function you just read the state even if the user did not change anything on the page and it will still work correctly.
Sorry, just trying to put questions in the correct thread.Originally Posted by asm View Post(Was just replying when the thread moved. How confusing.)
Thanks Anders.
I just find it strange that it's worked like that for me since I first wrote it 10+ years ago :-)
Maybe it's the move to UMUI or the switch to the macro from WriteINIStr.
I just find it strange that it's worked like that for me since I first wrote it 10+ years ago :-)
Maybe it's the move to UMUI or the switch to the macro from WriteINIStr.
In the first version of the IO readme from 2002 (more than 15 years ago) it also says State is used by edit boxes as far as I can tell. Your code could be even older and we do try to not break stuff over time but at some point in the early days of this plug-in the design was probably not optimal nor set in stone, sorry.Originally Posted by asm View Post
I just find it strange that it's worked like that for me since I first wrote it 10+ years ago :-)
Maybe it's the move to UMUI or the switch to the macro from WriteINIStr.
It has nothing to do with the move to UMUI or the macro unless UMUI uses a different version of the plug-in. I don't use UMUI and I don't know anything about it.