added SectionSetInstTypes and SectionGetInstTypes, fixed typos in the tutorial

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2306 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
flizebogen 2003-03-15 18:35:12 +00:00
parent eeef07324f
commit 15f9cccfb6
2 changed files with 20 additions and 4 deletions

View file

@ -24,4 +24,20 @@ Sets the description for the section section_index. To set a subsection, you mus
\c section_index user_var(output)
Stores the text description of the section section_index into the output. If the section is hidden, stores an empty string. The error flag will be set if an out of range section is specified.
Stores the text description of the section section_index into the output. If the section is hidden, stores an empty string. The error flag will be set if an out of range section is specified.
\S2{SectionSetInstTypes} SectionSetInstTypes
\c section_index inst_types
Sets the Install Types of the section specified by section_index. Note that the Section Index starts with Zero. Inst_types is a byte. Every bit of it is a flag that tells if the section is in that Install Type or not. For Example you have 3 Install Types and you want that the first section to be included in the Insttypes 1 and 3. Than the command looks like this:
\c SectionSetInstTypes 0 5
because the binary value for 5 is "00000101". The error flag will be set if an out of range section is specified.
\S2{SectionGetInstTypes} SectionGetInstTypes
\c section_index user_variable
Retrieves the Install Types of a section. See above for a description of how to deal with the output. The error flag will be set if an out of range section is specified.

View file

@ -6,7 +6,7 @@ Most software packages you download or buy come with an installer. The installer
NSIS is a tool for developers to create such installers. NSIS allows you to create everything from basic installers that just copy files to very complex installers that handle a lot of advanced tasks such as writing registry keys, settings environment variables, downloading the latest files from the internet, customizing the configuration file and more. NSIS is very flexible and its scripting language is easy to learn.
NSIS compiles all of the files and the installation script into one executable file, so your application will be easy to distribute. NSIS adds only about 34KB of code of its own (for the default configuration) to the data. NSIS has the smallest overhead available and still have a lot of options thanks to its powerful scripting language and support of external plug-ins.
NSIS compiles all of the files and the installation script into one executable file, so your application will be easy to distribute. NSIS adds only about 34KB of code of its own (for the default configuration) to the data. NSIS has the smallest overhead available and still have a lot of options thanks to its powerful scripting language and support of external plug-ins.
\H{tutscriptfiles} Script Files
@ -31,7 +31,7 @@ A NSIS script can contain Installer Attributes and Sections/Functions. You can a
\S1{installerattributes} Installer Attributes
Installer Attributes determine the behavior and the look and feel of your installer. With these attributes you can define what pages are shown in which order, texts that will show during the installation, the number of installation types etc. Most of these commands can only be set and are not changeable during runtime.
Installer Attributes determine the behavior and the look and feel of your installer. With these attributes you can define what pages are shown in which order, texts that will shown during the installation, the number of installation types etc. Most of these commands can only be set and are not changeable during runtime.
The most basic attributes are Name (\k{aname}), InstallDir (\k{ainstalldir}) and DirText (\k{adirtext}).
@ -61,7 +61,7 @@ Functions, just like sections, can contain code. The difference between sections
User functions are called by the user from within sections or other functions using the Call instruction (\k{call}). User functions will not execute unless you call them. After the code of the function will be executed the installer will continue executing the instructions that came after the Call instruction, unless you have aborted the installation inside the function. User functions are very useful if you have a set of instructions that need to be executed at several locations in the installers. If you put the code into a function you can save the copying time and you can maintain the code more easily.
Callback functions are called by the installer upon certain defined events such as when the installer starts. Callback are optional. If for example you want to welcome the user to your installer you will define a function called .onInit. The NSIS compiler will recongnize this function as a callback function by the name and will call it when the installer starts.
Callback functions are called by the installer upon certain defined events such as when the installer starts. Callbacks are optional. If for example you want to welcome the user to your installer you will define a function called .onInit. The NSIS compiler will recongnize this function as a callback function by the name and will call it when the installer starts.
\c Function .onInit
\c MessageBox MB_YESNO "This will install My Program. Do you wish to continue?" IDYES gogogo