Bug #16259 Updated: Windows version info in binaries

From: Date: Wed, 10 Apr 2002 00:26:20 +0000
Subject: Bug #16259 Updated: Windows version info in binaries
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4493@lists.php.net to get a copy of this message
ID: 16259 Updated by: yohgaki@php.net Reported By: Vladimir.Michl@hlubocky.del.cz Status: Closed Bug Type: Feature/Change Request Operating System: Windows PHP Version: 4.1.1 New Comment: Oops you are talking about os version. You can use "uname" if you use cygwin. (All unix and Mac OS X have that) Or you can check it with w32api, I suppose. Previous Comments: ------------------------------------------------------------------------ [2002-04-09 20:08:51] yohgaki@php.net PHP 4.2.0 has PHP_VERSION constant phpversion() is there for long time. Reopen if you are talking about other feature. ------------------------------------------------------------------------ [2002-04-09 18:07:27] jimw@php.net recategorizing as a change request. ------------------------------------------------------------------------ [2002-03-25 09:01:29] Vladimir.Michl@hlubocky.del.cz 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

« previous php.bugs (#4493) next »