36
36
37
37
namespace Pickle \Package \PHP \Command \Release \Windows ;
38
38
39
+ use Closure ;
39
40
use Exception ;
40
41
use Pickle \Base \Archive ;
41
42
use Pickle \Base \Interfaces ;
42
- use Pickle \Package ;
43
43
use Pickle \Package \PHP \Util \PackageJson ;
44
44
use Pickle \Package \Util \Header ;
45
45
@@ -51,7 +51,7 @@ class Binary implements Interfaces\Package\Release
51
51
protected $ pkg ;
52
52
53
53
/**
54
- * @var \ Closure
54
+ * @var Closure
55
55
*/
56
56
protected $ cb ;
57
57
@@ -69,7 +69,7 @@ class Binary implements Interfaces\Package\Release
69
69
* Constructor.
70
70
*
71
71
* @param string $path
72
- * @param \ Closure $cb
72
+ * @param Closure $cb
73
73
* @param bool $noConvert
74
74
*/
75
75
public function __construct ($ path , $ cb = null , $ noConvert = false )
@@ -99,6 +99,7 @@ public function create(array $args = [])
99
99
$ tmp_dir = $ build ->getTempDir ();
100
100
101
101
$ tmp = $ build ->getLog ('configure ' );
102
+ $ m = null ;
102
103
if (preg_match (',Build dir: \\s+([ \\: \\- \\.0-9a-zA-Z \\\\_]+), ' , $ tmp , $ m )) {
103
104
if (preg_match (',^[a-z] \\: \\\\,i ' , $ m [1 ]) && is_dir ($ m [1 ])) {
104
105
/* Parsed the fully qualified path */
@@ -109,7 +110,7 @@ public function create(array $args = [])
109
110
}
110
111
} else {
111
112
$ build_dir = $ info ['arch ' ] == 'x86 ' ? $ tmp_dir : $ tmp_dir . DIRECTORY_SEPARATOR . 'x64 ' ;
112
- $ build_dir .= DIRECTORY_SEPARATOR . ($ is_release ? 'Release ' : 'Debug ' );
113
+ $ build_dir .= DIRECTORY_SEPARATOR . (( $ info [ ' is_release ' ] ?? true ) ? 'Release ' : 'Debug ' );
113
114
$ build_dir .= ($ info ['thread_safe ' ] ? '_TS ' : '' );
114
115
}
115
116
@@ -191,6 +192,7 @@ public function getMultiExtensionNames()
191
192
multiple DLLs be built. */
192
193
$ config_w32_path = $ this ->build ->getPackage ()->getSourceDir () . DIRECTORY_SEPARATOR . 'config.w32 ' ;
193
194
$ config_w32 = file_get_contents ($ config_w32_path );
195
+ $ m = null ;
194
196
if (preg_match_all ("/EXTENSION \\s* \\( \\s*('| \")([a-z0-9_]+)('| \") \\s*,/Sm " , $ config_w32 , $ m , PREG_SET_ORDER )) {
195
197
foreach ($ m as $ r ) {
196
198
if (!in_array ($ r [2 ], $ ext_names )) {
0 commit comments