Skip to content

Commit 44af394

Browse files
committed
Add missing extensions and libraries
1 parent 8c8b3a8 commit 44af394

File tree

9 files changed

+437
-10
lines changed

9 files changed

+437
-10
lines changed

libraries/install_brotli.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
/**
4+
* ██████╗ ██████╗ ██████╗ ████████╗██╗ ██╗
5+
* ██╔══██╗██╔══██╗██╔═══██╗╚══██╔══╝██║ ██║
6+
* ██████╔╝██████╔╝██║ ██║ ██║ ██║ ██║
7+
* ██╔══██╗██╔══██╗██║ ██║ ██║ ██║ ██║
8+
* ██████╔╝██║ ██║╚██████╔╝ ██║ ███████╗██║
9+
* ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝
10+
*/
11+
12+
13+
$path = ARCH_PATH . $lib->name . '-' . $lib->version . '\\';
14+
$brotlilog = LOG . 'brotli.log';
15+
16+
17+
// Verify if libevent is installed
18+
if (is_dir($path) && is_file($path . 'build\lib\brotlicommon.lib') && is_file(DEPS_PATH . 'lib\brotlicommon.lib')) {
19+
draw_status($lib->name . '-' . $lib->version, "installed", Green);
20+
return;
21+
}
22+
23+
24+
// Download and unzip brotli
25+
$tmpfile = TMP.pathinfo($lib->download_url, PATHINFO_BASENAME);
26+
if(!download_file($lib->download_url, $tmpfile, pathinfo($tmpfile, PATHINFO_BASENAME))) exit_error();
27+
if(!unzip($tmpfile, ARCH_PATH)) exit_error();
28+
if(!is_dir($path)) exit_error("Library folder not found");
29+
30+
31+
// Compile brotli
32+
$label = "Compile " . $lib->name . '-' . $lib->version;
33+
draw_line($label, "running", Yellow);
34+
$bat = '@echo off'.RN;
35+
$bat .= 'cd ' . escapeshellarg($path).RN;
36+
$bat .= 'md build-win'.RN;
37+
$bat .= 'cd build-win'.RN;
38+
$bat .= 'cmake -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release ..'.RN;
39+
$bat .= 'DEVENV "brotli.sln" /rebuild "Release|x64"';
40+
$batfile = TMP . 'build_brotli.bat';
41+
file_put_contents($batfile, $bat);
42+
$ret = shell_exec_vs16($batfile, true);
43+
file_put_contents($brotlilog, $ret);
44+
45+
46+
// Verify if the build works
47+
if(!is_file($path . 'build-win\Release\brotlicommon.lib')) draw_status($label, "failed", Red, true, 'SEE: ' . $lelog);
48+
else draw_status($label, "complete", Green);
49+
50+
51+
// Install brotli
52+
$label = "Install " . $lib->name . '-' . $lib->version;
53+
draw_line($label, "running", Yellow);
54+
$builddir = $path . 'build\\';
55+
56+
$files[$path . 'build-win\Release\brotlicommon.lib'] = 'lib\brotlicommon.lib';
57+
$files[$path . 'build-win\Release\brotlidec.lib'] = 'lib\brotlidec.lib';
58+
$files[$path . 'build-win\Release\brotlienc.lib'] = 'lib\brotlienc.lib';
59+
60+
foreach(glob($path . 'c\include\brotli\*.h') as $file)
61+
$files[$file] = 'include\brotli\\' . basename($file);
62+
63+
if(!create_build($builddir, $files)) draw_status($label, "failed", Red, true);
64+
if(!install_deps($builddir)) draw_status($label, "failed", Red, true);
65+
else draw_status($label, "complete", Green);
66+
67+
delete_parent_deps($lib->name);

libraries/install_libffi.php

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
3+
/**
4+
* ██╗ ██╗██████╗ ███████╗███████╗██╗
5+
* ██║ ██║██╔══██╗██╔════╝██╔════╝██║
6+
* ██║ ██║██████╔╝█████╗ █████╗ ██║
7+
* ██║ ██║██╔══██╗██╔══╝ ██╔══╝ ██║
8+
* ███████╗██║██████╔╝██║ ██║ ██║
9+
* ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═╝
10+
*/
11+
12+
13+
$path = ARCH_PATH . $lib->name . '-' . $lib->version . '\\';
14+
$ffilog = LOG . 'libffi.log';
15+
16+
17+
// Verify if libffi is installed
18+
if (is_dir($path) && is_file($path . 'win32\vs16_x64\x64\Release\libffi.lib') && is_file(DEPS_PATH . 'lib\libffi.lib')) {
19+
draw_status($lib->name . '-' . $lib->version, "installed", Green);
20+
return;
21+
}
22+
23+
24+
// Download and unzip libffi
25+
$tmpfile = TMP.pathinfo($lib->download_url, PATHINFO_BASENAME);
26+
if(!download_file($lib->download_url, $tmpfile, pathinfo($tmpfile, PATHINFO_BASENAME))) exit_error();
27+
if(!unzip($tmpfile, ARCH_PATH)) exit_error();
28+
if(!is_dir($path)) exit_error("Can't find untar results");
29+
if(!unzip(__DIR__ . '\libffi-msvc.zip', $path)) exit_error("Can't unzip msvc project");
30+
if(!@rename($path . 'win32\vs16_x64\fficonfig.h', $path . 'fficonfig.h')) exit_error("Can't rename fficonfig.h");
31+
if(!@rename($path . 'win32\vs16_x64\ffi.h', $path . 'include\ffi.h')) exit_error("Can't rename ffi.h");
32+
33+
34+
// Compile libffi
35+
$label = "Compile " . $lib->name . '-' . $lib->version;
36+
draw_line($label, "running", Yellow);
37+
$bat = '@echo off'.RN;
38+
$bat .= 'cd ' . escapeshellarg($path . 'win32\vs16_x64').RN;
39+
$bat .= 'DEVENV libffi-msvc.sln /rebuild "Release|x64"'.RN;
40+
$batfile = TMP . 'build_libffi.bat';
41+
file_put_contents($batfile, $bat);
42+
$ret = shell_exec_vs16($batfile);
43+
file_put_contents($ffilog, $ret);
44+
45+
46+
// Verify if the build works
47+
if(!is_file($path . 'win32\vs16_x64\x64\Release\libffi.lib')) draw_status($label, "failed", Red, true, 'SEE: ' . $ffilog);
48+
else draw_status($label, "complete", Green);
49+
50+
51+
// Install libffi
52+
$label = "Install " . $lib->name . '-' . $lib->version;
53+
draw_line($label, "running", Yellow);
54+
$builddir = $path . 'build\\';
55+
56+
$files[$path . 'win32\vs16_x64\x64\Release\libffi.lib'] = 'lib\libffi.lib';
57+
$files[$path . 'fficonfig.h'] = 'include\fficonfig.h';
58+
$files[$path . 'include\ffi.h'] = 'include\ffi.h';
59+
$files[$path . 'src\x86\ffitarget.h'] = 'include\ffitarget.h';
60+
61+
if(!create_build($builddir, $files)) draw_status($label, "failed", Red, true);
62+
if(!install_deps($builddir)) draw_status($label, "failed", Red, true);
63+
else draw_status($label, "complete", Green);
64+
65+
delete_parent_deps($lib->name);

libraries/install_libuv.php

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
3+
/**
4+
* ██╗ ██╗██████╗ ██╗ ██╗██╗ ██╗
5+
* ██║ ██║██╔══██╗██║ ██║██║ ██║
6+
* ██║ ██║██████╔╝██║ ██║██║ ██║
7+
* ██║ ██║██╔══██╗██║ ██║╚██╗ ██╔╝
8+
* ███████╗██║██████╔╝╚██████╔╝ ╚████╔╝
9+
* ╚══════╝╚═╝╚═════╝ ╚═════╝ ╚═══╝
10+
*/
11+
12+
13+
$path = ARCH_PATH . $lib->name . '-' . $lib->version . '\\';
14+
$uvlog = LOG . 'libuv.log';
15+
16+
17+
// Verify if libuv is installed
18+
if (is_dir($path) && is_file($builddir . 'lib\libuv.lib') && is_file(DEPS_PATH . 'lib\libuv.lib')) {
19+
draw_status($lib->name . '-' . $lib->version, "installed", Green);
20+
return;
21+
}
22+
23+
24+
// Download and unzip libuv
25+
$tmpfile = TMP.pathinfo($lib->download_url, PATHINFO_BASENAME);
26+
if(!download_file($lib->download_url, $tmpfile, pathinfo($tmpfile, PATHINFO_BASENAME))) exit_error();
27+
if(!unzip($tmpfile, ARCH_PATH)) exit_error();
28+
if(!is_dir($path)) exit_error("Can't find unzip results");
29+
30+
31+
// Compile libuv
32+
$label = "Compile " . $lib->name . '-' . $lib->version;
33+
draw_line($label, "running", Yellow);
34+
$bat = '@echo off'.RN;
35+
$bat .= 'cd ' . escapeshellarg($path).RN;
36+
$bat .= 'mkdir build-win'.RN;
37+
$bat .= 'cd build-win'.RN;
38+
$bat .= 'cmake -G "Visual Studio 16 2019" ..'.RN;
39+
$bat .= 'devenv libuv.sln /rebuild "Release|x64" /project uv_a'.RN;
40+
$batfile = TMP . 'build_libuv.bat';
41+
file_put_contents($batfile, $bat);
42+
$ret = shell_exec_vs16($batfile);
43+
file_put_contents($uvlog, $ret);
44+
45+
46+
// Verify if the build works
47+
if(!is_file($path . 'build-win\Release\libuv.lib')) draw_status($label, "failed", Red, true, 'SEE: ' . $uvlog);
48+
else draw_status($label, "complete", Green);
49+
50+
51+
// Install libuv
52+
$label = "Install " . $lib->name . '-' . $lib->version;
53+
draw_line($label, "running", Yellow);
54+
$builddir = $path . 'build\\';
55+
56+
$files[$path . 'build-win\Release\libuv.lib'] = 'lib\libuv.lib';
57+
$files[$path . 'include\uv.h'] = 'include\uv.h';
58+
59+
foreach(glob($path . 'include\uv\*.h') as $file)
60+
$files[$file] = 'include\uv\\' . pathinfo($file, PATHINFO_BASENAME);
61+
62+
if(!create_build($builddir, $files)) draw_status($label, "failed", Red, true);
63+
if(!install_deps($builddir)) draw_status($label, "failed", Red, true);
64+
else draw_status($label, "complete", Green);
65+
66+
delete_parent_deps($lib->name);

libraries/install_libxpm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
// Download libx11 headers
6565
$libx11file = TMP.pathinfo($lib->libx11, PATHINFO_BASENAME);
66-
if(!download_file($lib->libx11, $libx11file, pathinfo($libx11file, PATHINFO_BASENAME))) exit_error("Can't download proto headers");
66+
if(!download_file($lib->libx11, $libx11file, pathinfo($libx11file, PATHINFO_BASENAME))) exit_error("Can't download libx11 headers");
6767

6868

6969
// Install libxpm

libraries/install_libzstd.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
/**
4+
* ██╗ ██╗██████╗ ███████╗███████╗████████╗██████╗
5+
* ██║ ██║██╔══██╗╚══███╔╝██╔════╝╚══██╔══╝██╔══██╗
6+
* ██║ ██║██████╔╝ ███╔╝ ███████╗ ██║ ██║ ██║
7+
* ██║ ██║██╔══██╗ ███╔╝ ╚════██║ ██║ ██║ ██║
8+
* ███████╗██║██████╔╝███████╗███████║ ██║ ██████╔╝
9+
* ╚══════╝╚═╝╚═════╝ ╚══════╝╚══════╝ ╚═╝ ╚═════╝
10+
*/
11+
12+
13+
$path = ARCH_PATH . $lib->name . '-' . $lib->version . '\\';
14+
$zstdlog = LOG . 'libzstd.log';
15+
16+
17+
// Verify if libzstd is installed
18+
if (is_dir($path) && is_file($path . 'build\VS2010\bin\x64_Release\libzstd_static.lib') && is_file(DEPS_PATH . 'lib\libzstd.lib')) {
19+
draw_status($lib->name . '-' . $lib->version, "installed", Green);
20+
return;
21+
}
22+
23+
24+
// Download and unzip libzstd
25+
$tmpfile = TMP.pathinfo($lib->download_url, PATHINFO_BASENAME);
26+
if(!download_file($lib->download_url, $tmpfile, pathinfo($tmpfile, PATHINFO_BASENAME))) exit_error();
27+
if(!$firstdir = zip_first_dir($tmpfile)) exit_error("Invalid zip archive");
28+
if(!unzip($tmpfile, ARCH_PATH)) exit_error();
29+
if(!rename_wait(ARCH_PATH . $firstdir, $path)) exit_error("Can't rename library path");
30+
31+
32+
// Compile libzstd
33+
$label = "Compile " . $lib->name . '-' . $lib->version;
34+
draw_line($label, "running", Yellow);
35+
$bat = '@echo off'.RN;
36+
$bat .= 'cd ' . escapeshellarg($path . 'build\VS2010').RN;
37+
$bat .= 'devenv zstd.sln /upgrade'.RN;
38+
$bat .= 'devenv zstd.sln /rebuild "Release|x64"'.RN;
39+
$batfile = TMP . 'build_libzstd.bat';
40+
file_put_contents($batfile, $bat);
41+
$ret = shell_exec_vs16($batfile, true);
42+
file_put_contents($zstdlog, $ret);
43+
44+
45+
// Verify if the build works
46+
if(!is_file($path . 'build\VS2010\bin\x64_Release\libzstd_static.lib')) draw_status($label, "failed", Red, true, 'SEE: ' . $zstdlog);
47+
else draw_status($label, "complete", Green);
48+
49+
50+
// Install libzstd
51+
$label = "Install " . $lib->name . '-' . $lib->version;
52+
draw_line($label, "running", Yellow);
53+
$builddir = $path . 'build-win\\';
54+
55+
$files[$path . 'build\VS2010\bin\x64_Release\libzstd_static.lib'] = 'lib\libzstd.lib';
56+
$files[$path . 'lib\zstd.h'] = 'include\zstd.h';
57+
$files[$path . 'lib\zdict.h'] = 'include\zdict.h';
58+
$files[$path . 'lib\zstd_errors.h'] = 'include\zstd_errors.h';
59+
60+
if(!create_build($builddir, $files)) draw_status($label, "failed", Red, true);
61+
if(!install_deps($builddir)) draw_status($label, "failed", Red, true);
62+
else draw_status($label, "complete", Green);
63+
64+
delete_parent_deps($lib->name);

libraries/install_mpdecimal.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
3+
/**
4+
* ███╗ ███╗██████╗ ██████╗ ███████╗ ██████╗██╗███╗ ███╗ █████╗ ██╗
5+
* ████╗ ████║██╔══██╗██╔══██╗██╔════╝██╔════╝██║████╗ ████║██╔══██╗██║
6+
* ██╔████╔██║██████╔╝██║ ██║█████╗ ██║ ██║██╔████╔██║███████║██║
7+
* ██║╚██╔╝██║██╔═══╝ ██║ ██║██╔══╝ ██║ ██║██║╚██╔╝██║██╔══██║██║
8+
* ██║ ╚═╝ ██║██║ ██████╔╝███████╗╚██████╗██║██║ ╚═╝ ██║██║ ██║███████╗
9+
* ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝ ╚═════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
10+
*/
11+
12+
13+
$path = ARCH_PATH . $lib->name . '-' . $lib->version . '\\';
14+
$mpdlog = LOG . 'mpdecimal.log';
15+
16+
17+
// Verify if mpdecimal is installed
18+
if (is_dir($path) && is_file($path . 'libmpdec\libmpdec-4.0.0.lib') && is_file(DEPS_PATH . 'lib\libmpdec_a.lib')) {
19+
draw_status($lib->name . '-' . $lib->version, "installed", Green);
20+
return;
21+
}
22+
23+
24+
// Download and unzip mpdecimal
25+
$tmpfile = TMP.pathinfo($lib->download_url, PATHINFO_BASENAME);
26+
if(!download_file($lib->download_url, $tmpfile, pathinfo($tmpfile, PATHINFO_BASENAME))) exit_error();
27+
if(!unzip($tmpfile, ARCH_PATH)) exit_error();
28+
if(!is_dir($path)) exit_error("Can't find untar results");
29+
if(!@copy($path . 'libmpdec\Makefile.vc', $path . 'libmpdec\Makefile')) exit_error("Can't copy Makefile");
30+
31+
32+
// Compile mpdecimal
33+
$label = "Compile " . $lib->name . '-' . $lib->version;
34+
draw_line($label, "running", Yellow);
35+
$bat = '@echo off'.RN;
36+
$bat .= 'cd ' . escapeshellarg($path . 'libmpdec').RN;
37+
$bat .= 'nmake clean'.RN;
38+
$bat .= 'nmake MACHINE=x64 DEBUG=0'.RN;
39+
$batfile = TMP . 'build_mpdecimal.bat';
40+
file_put_contents($batfile, $bat);
41+
$ret = shell_exec_vs16($batfile);
42+
file_put_contents($mpdlog, $ret);
43+
44+
45+
// Verify if the build works
46+
if(!is_file($path . 'libmpdec\libmpdec-4.0.0.lib')) draw_status($label, "failed", Red, true, 'SEE: ' . $mpdlog);
47+
else draw_status($label, "complete", Green);
48+
49+
50+
// Install mpdecimal
51+
$label = "Install " . $lib->name . '-' . $lib->version;
52+
draw_line($label, "running", Yellow);
53+
$builddir = $path . 'build\\';
54+
55+
$files[$path . 'libmpdec\libmpdec-4.0.0.lib'] = 'lib\libmpdec_a.lib';
56+
$files[$path . 'libmpdec\mpdecimal.h'] = 'include\mpdecimal.h';
57+
58+
if(!create_build($builddir, $files)) draw_status($label, "failed", Red, true);
59+
if(!install_deps($builddir)) draw_status($label, "failed", Red, true);
60+
else draw_status($label, "complete", Green);
61+
62+
delete_parent_deps($lib->name);

libraries/libffi-msvc.zip

90.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)