nsis64 / Docs / src / functions.but

gol...@212acab6-… 205abbe 























\H{functions} Functions

Functions are similar to Sections in that they contain zero or more instructions. User functions are not called by the installer directly, instead they are called from Sections using the \R{call}{Call} instruction. Callback functions will be called by the installer when a certain event occurs.

Functions must be declared outside of Sections or other Functions.

\S1{ffunctioncommands} Function Commands

\S2{ffunction} Function

\c [function_name]

Begins and opens a new function. \R{ffunction}{Function} names beginning with "." (e.g. ".Whatever") are generally reserved for callback functions. \R{ffunction}{Function} names beginning with "un." are functions that will be generated in the Uninstaller. Hence, normal install Sections and functions cannot call uninstall functions, and the Uninstall Section and uninstall functions cannot call normal functions.

\c Function func
\c   # some commands
\c FunctionEnd
\c
\c Section
\c   Call func
\c SectionEnd

\S2{ffunctionend} FunctionEnd

This command closes the current open function.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.