ID:               16259
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: Windows
 PHP Version:      4.1.1
-Assigned To:      
+Assigned To:      jtate
 New Comment:

I'm on it.  It'll be in CVS today.


Previous Comments:
------------------------------------------------------------------------

[2002-04-09 20:37:28] [EMAIL PROTECTED]

He means version info a in Version Info Resource.
(Right click on php.exe, properties, Version tab).
Re-opening as this is a valid feature request.
Can one of the windows build guys add this into the
relevant projects?
It will need doing for cgi, cli and isapi DLLs, as well
as the php4ts.dll.

------------------------------------------------------------------------

[2002-04-09 20:26:19] [EMAIL PROTECTED]

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.













------------------------------------------------------------------------

[2002-04-09 20:08:51] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

recategorizing as a change request.

------------------------------------------------------------------------

[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

Reply via email to