From ca4e0342bf6166509014e25367bb4f1ea44b7719 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 30 Nov 2020 01:55:06 +0100 Subject: [PATCH] genminiupnpcstrings.vbs: generates rc_version.h as well see #512 --- miniupnpc/msvc/genminiupnpcstrings.vbs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/miniupnpc/msvc/genminiupnpcstrings.vbs b/miniupnpc/msvc/genminiupnpcstrings.vbs index 8a2d30a..4698cc7 100644 --- a/miniupnpc/msvc/genminiupnpcstrings.vbs +++ b/miniupnpc/msvc/genminiupnpcstrings.vbs @@ -5,6 +5,7 @@ Set FSO = CreateObject("Scripting.FileSystemObject") versionfile = "..\version" infile = "..\miniupnpcstrings.h.in" outfile = "..\miniupnpcstrings.h" +outfilerc = "..\rc_version.h" On Error Resume Next @@ -101,3 +102,11 @@ If Err.Number = 0 Then f_in.Close f_out.Close End If + +Set f_out = FSO.OpenTextFile(outfilerc, 2, True) ' 2 = Write +f_out.WriteLine "#define LIBMINIUPNPC_DOTTED_VERSION " & Chr(34) & version & Chr(34) +ver = Split(version, ".") +f_out.WriteLine "#define LIBMINIUPNPC_MAJOR_VERSION " & ver(0) +f_out.WriteLine "#define LIBMINIUPNPC_MINOR_VERSION " & ver(1) +f_out.WriteLine "#define LIBMINIUPNPC_MICRO_VERSION " & ver(2) +f_out.Close