diff --git a/config.w32 b/config.w32 index 7c407e848a4..c9f30d655a6 100644 --- a/config.w32 +++ b/config.w32 @@ -640,4 +640,133 @@ if (PHP_GRPC != "no") { "/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+ "/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+ "/I"+configure_module_dirname+"\\third_party\\zlib"); + + base_dir = get_define('BUILD_DIR'); + FSO.CreateFolder(base_dir+"\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\boringssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\census"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\census\\gen"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns\\native"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\deadline"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\client"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\message_compress"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\server"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\load_reporting"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\max_age"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\message_size"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\workarounds"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\alpn"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\client"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\client\\insecure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\client\\secure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server\\insecure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server\\secure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\channel"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\compression"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\debug"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\http"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\json"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\profiling"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\context"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\composite"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\fake"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\google_default"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\iam"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\jwt"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\oauth2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\plugin"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\ssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\util"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\support"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\surface"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\plugin_registry"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext\\grpc"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\aes"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\asn1"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\base64"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bio"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn\\asm"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\buf"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bytestring"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\chacha"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cipher"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cmac"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\conf"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\curve25519"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\des"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\dh"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\digest"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\dsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ec"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdh"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\engine"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\err"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\evp"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\hkdf"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\hmac"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\lhash"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\md4"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\md5"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\modes"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\newhope"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\obj"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pem"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pkcs8"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\poly1305"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rand"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rc4"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\sha"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\stack"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509v3"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\ssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\nanopb"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\zlib"); + _build_dirs = new Array(); + for (i = 0; i < build_dirs.length; i++) { + if (build_dirs[i].indexOf('grpc') == -1) { + _build_dirs[_build_dirs.length] = build_dirs[i]; + } + } + build_dirs = _build_dirs; + } diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index 993ef2de274..0d5d36d9cf4 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -35,6 +35,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.4.0" +#define PHP_GRPC_VERSION "1.4.0RC1" #endif /* VERSION_H */ diff --git a/templates/config.w32.template b/templates/config.w32.template index c822eae097a..4edef963f2c 100644 --- a/templates/config.w32.template +++ b/templates/config.w32.template @@ -28,4 +28,40 @@ "/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+ "/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+ "/I"+configure_module_dirname+"\\third_party\\zlib"); + <% + dirs = {} + for lib in libs: + if lib.name in php_config_m4.get('deps', []) and lib.name != 'ares': + for source in lib.src: + tmp = source + prev = '' + while (True): + idx = tmp.find('/'); + if (idx == -1): + break + dirs[prev + '\\\\' + tmp[:idx]] = 1 + prev += ('\\\\' + tmp[:idx]); + tmp = tmp[idx+1:] + + dirs['\\\\src'] = 1; + dirs['\\\\src\\\\php'] = 1; + dirs['\\\\src\\\\php\\\\ext'] = 1; + dirs['\\\\src\\\\php\\\\ext\\\\grpc'] = 1; + dirs = dirs.keys() + dirs.sort() + %> + base_dir = get_define('BUILD_DIR'); + FSO.CreateFolder(base_dir+"\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc"); + % for dir in dirs: + FSO.CreateFolder(base_dir+"\\ext\\grpc${dir}"); + % endfor + _build_dirs = new Array(); + for (i = 0; i < build_dirs.length; i++) { + if (build_dirs[i].indexOf('grpc') == -1) { + _build_dirs[_build_dirs.length] = build_dirs[i]; + } + } + build_dirs = _build_dirs; + } diff --git a/templates/src/php/ext/grpc/version.h.template b/templates/src/php/ext/grpc/version.h.template index 828ea69296c..10977a83c2a 100644 --- a/templates/src/php/ext/grpc/version.h.template +++ b/templates/src/php/ext/grpc/version.h.template @@ -37,6 +37,6 @@ #ifndef VERSION_H #define VERSION_H - #define PHP_GRPC_VERSION "${settings.php_version.php_composer()}" + #define PHP_GRPC_VERSION "${settings.php_version.php()}" #endif /* VERSION_H */