From: [EMAIL PROTECTED] Operating system: Windows PHP version: 4.1.1 PHP Bug Type: *Compile Issues Bug description: Windows version info in binaries
Hello, I see, that windows binaries of PHP does not include version info. It is useful, if people want discover, what version have on disk, without running php with phpinfo() function. Resource file (php.rc) may be (if not included correctly email me): -------------------------------------------------------- #include <winver.h> #define XSTRVER4(maj, min, rel, build) #maj "." #min "." #rel "." #build #define XSTRVER3(maj, min, rel) #maj "." #min "." #rel #define STRVER4(maj, min, rel, build) XSTRVER4(maj, min, rel, build) #define STRVER3(maj, min, rel) XSTRVER3(maj, min, rel) VS_VERSION_INFO VERSIONINFO FILEVERSION MAJORVER,MINORVER,RELEASEVER,BUILDNUMBER PRODUCTVERSION MAJORVER,MINORVER,RELEASEVER,0 FILEFLAGSMASK 0 FILEFLAGS 0 FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL FILESUBTYPE VFT2_UNKNOWN BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "PHP Team" VALUE "FileDescription", "PHP Script interpreter" VALUE "FileVersion", STRVER4(MAJORVER, MINORVER, RELEASEVER, BUILDNUMBER) VALUE "InternalName", "php" VALUE "LegalCopyright", "Copyright © 2002 PHP Team" VALUE "OriginalFilename", "php" VALUE "ProductName", "php" VALUE "ProductVersion", STRVER3(MAJORVER, MINORVER, RELEASEVER) VALUE "URL", "http://www.php.net" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END ----------------------------------------------------------- Under mingw this may be compiled into .o file: windres -DMAJORVER=$(MAJORVERSION) -DMINORVER=$(MINORVERSION) -DRELEASEVER=$(RELEASEVERSION) -DBUILDNUMBER=$(BUILDNUMBER) php.rc php-win32res.o If this .o file is linked into php.exe and all dlls, all this files will have version info. Under MSVC: rc -r /dMAJORVER=1 /dMINORVER=1 /dRELEASEVER=1 /dBUILDNUMBER=1 php.rc create php.res file, which may be linked into php.exe and all dlls for version info. Macros MAJORVER, MINORVER, RELEASEVER and BUILDNUMBER must be specified on command line to resource compiler for include PHP version to resource file. To version info version is created as MAJORVER.MINORVER.RELEASEVER.BUILDNUMBER -- Edit bug report at http://bugs.php.net/?id=16259&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16259&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16259&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16259&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16259&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16259&r=support Expected behavior: http://bugs.php.net/fix.php?id=16259&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16259&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16259&r=submittedtwice