|
|
|
|
#1 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
Sections must be selected
I have an installer with sections all unselected(SECTION_OFF)
the customer must be select the section if he want to continue the installation. Now if I dont select any section the I have the installation folder on my desktop with the readme and license installed because i have the following code(I WANT THIS) Section "-General Readme/License" SectionIn RO SetOutPath "$INSTDIR" File "${NSISDIR}\Examples\License.txt" File "${NSISDIR}\Examples\Readme.txt The others section are: Function .onInit SectionGetFlags ${sec1} $0 IntOp $0 $0 & ${SECTION_OFF} SectionSetFlags ${sec1} $0 there is a total of 10 sections Thank you in advance |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Sorry, what is your question?
Do you want it so that atleast 1 section has to be selected to install? -Stu |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If so, then you need to do this...
For Modern UI, you need to have a leave function of your components page code: If you aren't using Modern UI (you should!) then define the custom leave function like so: Page Components "" "" "CheckComponents" -Stu Last edited by Afrow UK; 28th July 2003 at 16:55. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
Thank you ...yes I forgot to mention it "Im using MUI".
I wrote your code in the installer, it work very well. Now m going to understaind Thank you a lot. |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
No problem
![]() Its very simple. Sections are "1" if selected and "0" if not selected. SectionGetFlags gets the section state. "StrCmp $R0 1 done" will goto the end of the function (done label) because that shows that one of the components is selected. If none are selected (all are state "0") then it will reach the error message box. Btw, remove the "Push $R0" from the start, that isn't needed. -Stu |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
Another question...
You wrote this command MB_ICONEXCLAMATION. ITS possible to change the ICON???? Insert another icon. |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You cannot insert any icon unfortunately.
You can only have ICONS from Windows standard message boxes: See section 4.9.4.14 of the NSIS user manual on the MessageBox command: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.4.14 -Stu |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
Ok thanks again ...I can use the stop icon or the icon in the script.
I think the Stop icon will be great. Its coming more intresting ....... Probably Im bothering you but my installer have a long name about 50 letters (I have different collection for every years) and i want see the collection name during the installation. May I change the lenght of the installer "MUI_CUSTOMFUNCTION_COMPONENTS_LEAVE" |
|
|
|
|
|
#9 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
So, you have a piece of text that is <50 characters long and you want it to be displayed in a MessageBox?
You can indeed add a MessageBox anywhere you like - in Functions and Sections. You should have a look at all of the MUI Custom Functions available (read Contrib\Modern UI\Readme.html) - there's PRE SHOW and LEAVE functions for all Modern UI pages. PRE is called before the page loads SHOW is called when the page loads LEAVE is of course called when the user clicks the next button E.g. !define MUI_CUSTOMFUNCTION_WELCOME_PRE WelcomeFunction !define MUI_CUSTOMFUNCTION_INSTFILES_LEAVE InstFilesFunction etc It's probably better to display your string on an InstallOptions dialog (look in Contrib\InstallOptions and compile test.nsi script, also look at the Readme.html file.) -Stu |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
Thanks so much ....im going to try tonight...ill let you know tomorrow.
|
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
Thank you Afrow UK its wworking ...great
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|