|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2006
Location: Reading, UK
Posts: 39
|
Unable to select sections without going to custom install
I have two sections "Install" and "Extract", and 7 sections.
"Extract" has 1 of the sections selected and this simply extracts the payload. "Install" does a number of tests and depending on external conditions selects 1 to 6 of the sections. I want to present the user with "Extract" or "Install". The user will not be able to change any of the sections selected. Unfortunately, I keep running into problems. If I use SectionIn to designate which sections are assigned to an Install type, it switches to a 'Custom' Install option as soon as I change any of them. If I set the components page to use /NOCUSTOM then on loading it sets the Install component type to blank which disappears when I select another option. I want it to appear with Install and all the required options preselected, so the user can just click next. The example below is as close as I can get it The type of install is set to blank. When you manually set it to Install it sets the correct options, but this is an extra step which I am trying to get rid of.!include Sections.nsh !include MUI.nsh Name InstTest OutFile c:\InstText.exe InstallDir C:\Data\QuentinV3 InstType "Install" InstType "Extract" InstType /NOCUSTOM !insertmacro MUI_PAGE_COMPONENTS Section "Install Java SDK" sec_install_java SectionIn ro 1 SectionEnd Section "Install MySQL database server" sec_install_mysql SectionIn ro 1 SectionEnd Section "ISA Manager" sec_install_isa SectionIn ro 1 SectionEnd Section "Configure Database" sec_config_db SectionIn ro 1 SectionEnd Section "Update Quantel database" sec_config_update SectionIn ro 1 SectionEnd Section "Downdate Quantel database" sec_config_downdate SectionIn ro 1 SectionEnd Section "File Extract Only" sec_extract_only SectionIn ro 2 SectionEnd Function .onInit !insertmacro ClearSectionInInstType "${sec_install_java}" "${INSTTYPE_1}" !insertmacro ClearSectionInInstType "${sec_config_update}" "${INSTTYPE_1}" !insertmacro SetSectionInInstType "${sec_extract_only}" "${INSTTYPE_2}" FunctionEnd |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
I guess this is what you're looking for :-)
code: Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2006
Location: Reading, UK
Posts: 39
|
Wow thanks, You have obviously put in a lot of work for this.
It took quite a long time to understand how it works so I will add an explaination for others. The reason why my orginal showed blank in the selection list was because the selected sections did not match any of the predefined install types. After a bit of fiddling I found SetSectionInInstType in sections.nsh and wrote 2 macros to help standardise the SectionSet stuff. code: |
|
|
|
|
|
#4 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Î¥ou're welcome!. Nice job from your side!
Perhaps you may want to take a look at the attached below sample. I think it is a little more pro looking :-) Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS Last edited by Red Wine; 20th December 2006 at 14:52. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2006
Location: Reading, UK
Posts: 39
|
Maybe 1 for the Wiki!
|
|
|
|
|
|
#6 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
I've already posted a topic at wiki with the above sample code because here in forum after a few days is not easy to find it by someone who might need it.
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS Last edited by Red Wine; 20th December 2006 at 18:49. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|