Old 30th May 2009, 01:36   #1
Junior Member
Join Date: May 2009
Posts: 1
!ifexists compile-time macro


I'm looking for functionality that allows NSIS compiler to check if files are present, and take actions accordingly.

Specifically, I'm using DirectX in my application, and different developers in my organization have different versions of the SDK installed.

We are using NSIS installers for internal builds.

I would like to check for all of the DX SDK versions in inverse order.

something along the lines

!ifndef DXSDK
!ifexists "$%ProgramFiles%\Microsoft DirectX SDK (November 2008)"
!define DXSDK "$%ProgramFiles%\Microsoft DirectX SDK (November 2008)"

!ifndef DXSDK
!ifexists "$%ProgramFiles%\Microsoft DirectX SDK (August 2008)"
!define DXSDK "$%ProgramFiles%\Microsoft DirectX SDK (August 2008)"

qdot is offline   Reply With Quote
Old 30th May 2009, 11:06   #2
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You need to write a define to the file and then check if it has been defined to determine if the file exists.

Afrow UK is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump