1 ; See http://nsis.sourceforge.net/Check_if_a_file_exists_at_compile_time for documentation\r
2 !macro !ifexist _FILE_NAME\r
3 !tempfile _TEMPFILE\r
4 !system `if exist "${_FILE_NAME}" echo !define _FILE_EXISTS > "${_TEMPFILE}"`\r
5 !include `${_TEMPFILE}`\r
6 !delfile `${_TEMPFILE}`\r
7 !undef _TEMPFILE\r
8 !ifdef _FILE_EXISTS\r
9 !undef _FILE_EXISTS\r
10 !macroend\r
11 !define !ifexist "!insertmacro !ifexist"\r
12 !macro !ifnexist _FILE_NAME\r
13 !tempfile _TEMPFILE\r
14 !system `if not exist "${_FILE_NAME}" echo !define _FILE_EXISTS > "${_TEMPFILE}"`\r
15 !include `${_TEMPFILE}`\r
16 !delfile `${_TEMPFILE}`\r
17 !undef _TEMPFILE\r
18 !ifdef _FILE_EXISTS\r
19 !undef _FILE_EXISTS\r
20 !macroend\r
21 !define !ifnexist "!insertmacro !ifnexist"\r