display info about system used to build#5798
Closed
remicollet wants to merge 2 commits into
Closed
Conversation
Member
Author
|
@oerdnj does this make sense for you ? |
572d3d1 to
8682349
Compare
Member
Author
|
@cmb69 perhaps can also make sense to be defined/displayed for Windows builds ? |
Contributor
|
Yes, it could allow Debian to perhaps drop the patching of the version. |
Member
|
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 |
Member
Author
|
@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
Member
Author
|
@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. |
Member
|
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
Member
Author
Member
|
Thank you! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.