ID: 16259 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open -Bug Type: *Compile Issues +Bug Type: Feature/Change Request Operating System: Windows PHP Version: 4.1.1 New Comment:
recategorizing as a change request. Previous Comments: ------------------------------------------------------------------------ [2002-03-25 09:01:29] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=16259&edit=1