Skip to content

Commit

Permalink
define build system and provider on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 authored and remicollet committed Jul 6, 2020
1 parent ad0d2e4 commit 6cef933
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ 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_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) {
get_version_numbers();
}
Expand Down

0 comments on commit 6cef933

Please sign in to comment.