mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-26 22:16:51 +01:00
Add CentOS to build instructions generator.
This commit is contained in:
parent
5ca1c098bc
commit
eafc9d2caa
28
build.html
28
build.html
@ -32,6 +32,8 @@ select.large { font-size: large; }
|
||||
<select id="linuxSelect" onchange="onOsChanged(false)" class="large">
|
||||
<option>Choose a Linux distro:</option>
|
||||
<option>Alpine</option>
|
||||
<option>CentOS 7</option>
|
||||
<option>CentOS 8</option>
|
||||
<option>Debian 8</option>
|
||||
<option>Debian 9</option>
|
||||
<option>Debian 10</option>
|
||||
@ -174,7 +176,7 @@ function onOptionsChanged() {
|
||||
document.getElementById('buildCommandsDiv').style.display = 'block';
|
||||
|
||||
var use_clang = os_freebsd || os_openbsd;
|
||||
if (os_linux && linux_distro !== 'Alpine') {
|
||||
if (os_linux && linux_distro !== 'Alpine' && !linux_distro.includes('CentOS')) {
|
||||
document.getElementById('buildCompilerDiv').style.display = 'block';
|
||||
use_clang = document.getElementById('buildCompilerRadioClang').checked;
|
||||
} else {
|
||||
@ -309,6 +311,7 @@ function onOptionsChanged() {
|
||||
|
||||
var commands = [];
|
||||
|
||||
var cmake = 'cmake';
|
||||
if (os_mac) {
|
||||
commands.push('xcode-select --install');
|
||||
commands.push('/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"');
|
||||
@ -321,6 +324,21 @@ function onOptionsChanged() {
|
||||
var packages = 'alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake';
|
||||
commands.push(sudo + 'apk add --update ' + packages);
|
||||
break;
|
||||
case 'CentOS 7':
|
||||
case 'CentOS 8':
|
||||
commands.push(sudo + 'yum update -y');
|
||||
var packages = 'gcc-c++ make git zlib-devel openssl-devel';
|
||||
if (linux_distro === 'CentOS 7') {
|
||||
commands.push(sudo + 'yum install -y centos-release-scl-rh epel-release');
|
||||
commands.push(sudo + 'yum install -y devtoolset-9-gcc devtoolset-9-gcc-c++');
|
||||
cmake = 'cmake3';
|
||||
packages += ' gperf';
|
||||
} else {
|
||||
commands.push(sudo + 'dnf --enablerepo=PowerTools install gperf');
|
||||
}
|
||||
packages += ' ' + cmake;
|
||||
commands.push(sudo + 'yum install -y ' + packages);
|
||||
break;
|
||||
case 'Debian 8':
|
||||
case 'Debian 9':
|
||||
case 'Debian 10':
|
||||
@ -463,19 +481,21 @@ function onOptionsChanged() {
|
||||
prefix = 'CC=/usr/bin/clang' + clang_version_suffix + ' CXX=/usr/bin/clang++' + clang_version_suffix + ' ';
|
||||
} else if (linux_distro === 'Ubuntu 14') {
|
||||
prefix = 'CC=/usr/bin/gcc-4.9 CXX=/usr/bin/g++-4.9 ';
|
||||
} else if (linux_distro === 'CentOS 7') {
|
||||
prefix = 'CC=/opt/rh/devtoolset-9/root/usr/bin/gcc CXX=/opt/rh/devtoolset-9/root/usr/bin/g++ ';
|
||||
}
|
||||
}
|
||||
return prefix + 'cmake ' + options.join(' ') + ' ..';
|
||||
return prefix + cmake + ' ' + options.join(' ') + ' ..';
|
||||
}
|
||||
commands.push(getCmakeInitCommand(cmake_init_options));
|
||||
|
||||
if (os_openbsd) {
|
||||
commands.push('cmake --build . --target prepare_cross_compiling');
|
||||
commands.push(cmake + ' --build . --target prepare_cross_compiling');
|
||||
commands.push('cd ../td');
|
||||
commands.push('php-7.2 SplitSource.php');
|
||||
commands.push('cd ../build');
|
||||
}
|
||||
let build_command = 'cmake --build . --target install';
|
||||
let build_command = cmake + ' --build . --target install';
|
||||
if (use_msvc) {
|
||||
if (!is_debug_build) {
|
||||
commands.push(build_command + ' --config Release');
|
||||
|
2
td
2
td
@ -1 +1 @@
|
||||
Subproject commit f9a600c401ba20af7e07ee60e12b1de28dd2e14c
|
||||
Subproject commit 7a0b88441a980171624f4727fd5f52d9db078730
|
Loading…
Reference in New Issue
Block a user