From: Derick Rethans Date: Sat, 21 Jul 2007 11:24:53 +0000 (+0000) Subject: - MFH: Allow the use of a user defined template.rc file to override the X-Git-Tag: php-5.2.4RC1~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51431a766038235156fc7752cc0ac6eaca7ff5c6;p=php - MFH: Allow the use of a user defined template.rc file to override the default ones. This makes it possible to include the extension's version inside the version properties of the generated extension DLL instead of the PHP version the extension is build against. --- diff --git a/win32/build/confutils.js b/win32/build/confutils.js index f5e33f13a8..72c5b0a735 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.60.2.1.2.6 2007-03-19 03:15:48 edink Exp $ +// $Id: confutils.js,v 1.60.2.1.2.7 2007-07-21 11:24:53 derick Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -860,7 +860,19 @@ function generate_version_info_resource(makefiletarget, creditspath) if (makefiletarget.match(new RegExp("\\.exe$"))) { logo = " /D WANT_LOGO "; } - + + /** + * Use user supplied template.rc if it exists + */ + if (FSO.FileExists(creditspath + '\\template.rc')) { + MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": " + creditspath + "\\template.rc"); + MFO.WriteLine("\t$(RC) /fo $(BUILD_DIR)\\" + resname + logo + + ' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"' + makefiletarget + + '\\"" /d PRODUCT_NAME="\\"' + res_prod_name + '\\"" /d THANKS_GUYS="\\"' + + thanks + '\\"" ' + creditspath + '\\template.rc'); + return resname; + } + MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": win32\\build\\template.rc"); MFO.WriteLine("\t$(RC) /fo $(BUILD_DIR)\\" + resname + logo + ' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"' + makefiletarget +