Reference/!include: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
mNo edit summary
m (wiki link, html <code> format)
 
Line 3: Line 3:
  [/NONFATAL] file
  [/NONFATAL] file


This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See [http://nsis.sourceforge.net/Reference/!addincludedir !addincludedir] for more information. If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See [[Reference/!addincludedir|!addincludedir]] for more information. If the <code>/NONFATAL</code> switch is used and no files are found, a warning will be issued instead of an error.


<highlight-nsis>!include WinMessages.nsh
<highlight-nsis>!include WinMessages.nsh

Latest revision as of 11:14, 22 November 2017

!include

[/NONFATAL] file

This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See !addincludedir for more information. If the /NONFATAL switch is used and no files are found, a warning will be issued instead of an error.

!include WinMessages.nsh
!include Library.nsh
!include C:\MyConfig.nsi
!include ..\MyConfig.nsh
!include /NONFATAL file_that_may_exist_or_not.nsh

Command introduced with NSIS v1.1d