~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to packaging/win32/ifexist.nsh

  • Committer: JazzyNico
  • Date: 2011-08-29 20:25:30 UTC
  • Revision ID: nicoduf@yahoo.fr-20110829202530-6deuoz11q90usldv
Code refactoring and merging with trunk (revision 10599).

Show diffs side-by-side

added added

removed removed

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