Common Installation with Components Choice: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
|||
(7 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{PageAuthor|Red Wine}} | {{PageAuthor|Red Wine}} | ||
== Description == | == Description == | ||
The following example on how to create a common installation with components | The following example on how to create a common installation with components choice provided for the subject [http://forums.winamp.com/showthread.php?s=f9514f23b6cf9fd97bf7b177f2f4a04e&threadid=261054 at this forum thread].<BR> | ||
== The Code == | == The Code == | ||
Line 10: | Line 10: | ||
!include "Sections.nsh" | !include "Sections.nsh" | ||
Insttype "/CUSTOMSTRING=Please make your | Insttype "/CUSTOMSTRING=Please make your choice" | ||
Insttype "English Interface" | Insttype "English Interface" | ||
Insttype "French Interface" | Insttype "French Interface" | ||
Line 17: | Line 17: | ||
page instfiles | page instfiles | ||
Section "Common | Section "Common Files (Required)" | ||
SectionIn RO | SectionIn RO | ||
# common files here | # common files here | ||
Line 44: | Line 44: | ||
</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 script. | |||
#This notice may not be removed or altered from any distribution. | |||
[[Category:Code Examples]] | [[Category:Code Examples]] | ||
[[Category:Section Management Functions]] |
Latest revision as of 20:02, 30 March 2009
Author: Red Wine (talk, contrib) |
Description
The following example on how to create a common installation with components choice provided for the subject at this forum thread.
The Code
name 'sections test' outfile 'sectest.exe' !include "Sections.nsh" Insttype "/CUSTOMSTRING=Please make your choice" 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 script.
- This notice may not be removed or altered from any distribution.