Common Installation with Components Choice: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 43: | Line 43: | ||
FunctionEnd | FunctionEnd | ||
</highlight-nsis> | </highlight-nsis> | ||
== License == | |||
This script is provided 'as-is', without any express or implied | |||
warranty. In no event will the author be held liable for any damages | |||
arising from the use of this code. | |||
Permission is granted to anyone to use this script for any purpose, | |||
including commercial applications, and to alter it and redistribute | |||
it freely, subject to the following restrictions: | |||
#The origin of this script must not be misrepresented; you must not claim that you wrote the original code. If you use this script in a product, an acknowledgment in the product documentation would be appreciated but is not required. | |||
#Altered versions must be plainly marked as such, and must not be misrepresented as being the original header file. | |||
#This notice may not be removed or altered from any distribution. | |||
[[Category:Code Examples]] | [[Category:Code Examples]] | ||
[[Category:Section Management Functions]] | [[Category:Section Management Functions]] |
Revision as of 05:51, 17 January 2007
Author: Red Wine (talk, contrib) |
Description
The following example on how to create a common installation with components choise provived for the subject at this forum thread.
The Code
name 'sections test' outfile 'sectest.exe' !include "Sections.nsh" Insttype "/CUSTOMSTRING=Please make your choise" Insttype "English Interface" Insttype "French Interface" page components page instfiles Section "Common FIles (Required)" SectionIn RO # common files here SectionEnd Section "English Language Files" SEC_ENG SectionIn 1 # ENG files here SectionEnd Section /o "French Language Files" SEC_FRA SectionIn 2 # FRA files here SectionEnd Function .onInit StrCpy $1 ${SEC_ENG} FunctionEnd Function .onSelChange !insertmacro StartRadioButtons $1 !insertmacro RadioButton ${SEC_ENG} !insertmacro RadioButton ${SEC_FRA} !insertmacro EndRadioButtons FunctionEnd
License
This script is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this code.
Permission is granted to anyone to use this script for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this script must not be misrepresented; you must not claim that you wrote the original code. If you use this script in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered versions must be plainly marked as such, and must not be misrepresented as being the original header file.
- This notice may not be removed or altered from any distribution.