Skip to content

Commit d552787

Browse files
authored
we need to change source_path for shared build (#977)
2 parents 5d10433 + cb7eca9 commit d552787

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/SPC/ConsoleApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
final class ConsoleApplication extends Application
3636
{
37-
public const string VERSION = '2.7.8';
37+
public const string VERSION = '2.7.9';
3838

3939
public function __construct()
4040
{

src/SPC/builder/extension/maxminddb.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@
55
namespace SPC\builder\extension;
66

77
use SPC\builder\Extension;
8+
use SPC\store\FileSystem;
89
use SPC\util\CustomExt;
910

1011
#[CustomExt('maxminddb')]
1112
class maxminddb extends Extension
1213
{
1314
public function patchBeforeBuildconf(): bool
1415
{
15-
if (!is_link(SOURCE_PATH . '/php-src/ext/maxminddb')) {
16+
if (!is_dir(SOURCE_PATH . '/php-src/ext/maxminddb')) {
1617
$original = $this->source_dir;
17-
if (PHP_OS_FAMILY === 'Windows') {
18-
f_passthru('cd ' . SOURCE_PATH . '/php-src/ext && mklink /D maxminddb ' . $original . '\ext');
19-
} else {
20-
f_passthru('cd ' . SOURCE_PATH . '/php-src/ext && ln -s ' . $original . '/ext maxminddb');
21-
}
18+
FileSystem::copyDir($original . '/ext', SOURCE_PATH . '/php-src/ext/maxminddb');
19+
$this->source_dir = SOURCE_PATH . '/php-src/ext/maxminddb';
2220
return true;
2321
}
22+
$this->source_dir = SOURCE_PATH . '/php-src/ext/maxminddb';
2423
return false;
2524
}
2625
}

0 commit comments

Comments
 (0)