2024-02-22 14:37:10 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\windows\library;
|
|
|
|
|
|
|
|
|
|
use SPC\store\FileSystem;
|
|
|
|
|
|
|
|
|
|
class curl extends WindowsLibraryBase
|
|
|
|
|
{
|
|
|
|
|
public const NAME = 'curl';
|
|
|
|
|
|
|
|
|
|
protected function build(): void
|
|
|
|
|
{
|
2024-07-14 01:43:41 +08:00
|
|
|
FileSystem::createDir(BUILD_BIN_PATH);
|
2024-03-05 21:43:09 +08:00
|
|
|
cmd()->cd($this->source_dir . '\winbuild')
|
2024-02-22 14:37:10 +08:00
|
|
|
->execWithWrapper(
|
2024-03-05 21:43:09 +08:00
|
|
|
$this->builder->makeSimpleWrapper('nmake'),
|
|
|
|
|
'/f Makefile.vc WITH_DEVEL=' . BUILD_ROOT_PATH . ' ' .
|
|
|
|
|
'WITH_PREFIX=' . BUILD_ROOT_PATH . ' ' .
|
|
|
|
|
'mode=static RTLIBCFG=static WITH_SSL=static WITH_NGHTTP2=static WITH_SSH2=static ENABLE_IPV6=yes WITH_ZLIB=static MACHINE=x64 DEBUG=no'
|
2024-02-22 14:37:10 +08:00
|
|
|
);
|
2024-03-05 21:43:09 +08:00
|
|
|
FileSystem::copyDir($this->source_dir . '\include\curl', BUILD_INCLUDE_PATH . '\curl');
|
2024-02-22 14:37:10 +08:00
|
|
|
}
|
|
|
|
|
}
|