Search code examples
svnnsis

Get SVN revision number into NSIS script


I'd like to capture the svn revision of my code automatically when I build an installer using NSIS. I see I can get the revision number by calling "svnversion" at the command line, but how can I map that to a ${define} in my NSIS script at build time?


Solution

  • You can execute any command at compile time with !system and then get/parse the output with !searchparse, !define /file or !include.

    Another alternative is the $Revision$ svn keyword (See this question for more)