Archive: Check if file exists compile time


Check if file exists compile time
Hi,

Is it possible to check if a file exists at compile time with NSIS?

I would like to like this functionality to make branding easier: if a file exists then use it, otherwise use a default file.

Thanks!


You will have to create an external application / NSIS Installer that sets a define.


Thanks,

Do you have any reference to a document describing how to make such an application, how to set a define from it and how to call upon it?

One solution I see is to call upon it is with !system and to use the return value from it. Another way would be to make a plug-in DLL, but as I understand it these are distributed with the package and used at runtime (am I right?).


If you just want to include files use the /nonfatal options for File.

Otherwise I recommend you to execute an application using !system and let it write a header file you can include.


Excellent idea (creating the header file)! Thanks!