-
Notifications
You must be signed in to change notification settings - Fork 7.9k
display info about system used to build #5798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@oerdnj does this make sense for you ? |
572d3d1
to
8682349
Compare
@cmb69 perhaps can also make sense to be defined/displayed for Windows builds ? |
Yes, it could allow Debian to perhaps drop the patching of the version. |
Maybe something like the following? win32/build/confutils.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 5d6ba3baac..713c0ad059 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -126,6 +126,13 @@ build_dirs = new Array();
extension_include_code = "";
extension_module_ptrs = "";
+(function () {
+ var wmiservice = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");
+ var oss = wmiservice.ExecQuery("Select * from Win32_OperatingSystem");
+ var os = oss.ItemIndex(0);
+ AC_DEFINE("PHP_BUILDER_SYSTEM", os.Caption + " [" + os.Version + "]", "Windows build system version");
+}());
+
if (!MODE_PHPIZE) {
get_version_numbers();
} Would give |
@oerdnj I also add PHP_BUILD_PROVIDER, to be able to check it (e.g. official debian packages vs your PPA) |
6f9ae33
to
a3d90ef
Compare
@cmb69 thanks for the Windows scriplet (applied). For the second macro, it really have to be defined "only" on the builder, defaut value doesn't make sense. |
Support for win32/build/confutils.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index de84ed9ae3..2f2c01e47d 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -131,6 +131,10 @@ extension_module_ptrs = "";
var oss = wmiservice.ExecQuery("Select * from Win32_OperatingSystem");
var os = oss.ItemIndex(0);
AC_DEFINE("PHP_BUILD_SYSTEM", os.Caption + " [" + os.Version + "]", "Windows build system version");
+ var build_provider = WshShell.Environment("Process").Item("PHP_BUILD_PROVIDER");
+ if (build_provider) {
+ AC_DEFINE("PHP_BUILD_PROVIDER", build_provider);
+ }
}());
if (!MODE_PHPIZE) { |
a3d90ef
to
87b1cb4
Compare
Thank you! :) |
Notice: for now PHP_UNAME is only defined on non -Windows OS, and only used as a fallback for missing system uname function, but a new macro seems cleaner
we can imagine using on downstream build
or
And thus:
$ php -i
I think such information may be useful for people doing some community support.