mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-26 22:16:51 +01:00
Port build instructions generator changes.
This commit is contained in:
parent
f95d406da6
commit
5951bfbab8
29
build.html
29
build.html
@ -208,6 +208,7 @@
|
|||||||
<option>Ubuntu 18</option>
|
<option>Ubuntu 18</option>
|
||||||
<option>Ubuntu 20</option>
|
<option>Ubuntu 20</option>
|
||||||
<option>Ubuntu 22</option>
|
<option>Ubuntu 22</option>
|
||||||
|
<option>Ubuntu 24</option>
|
||||||
<option>Other</option>
|
<option>Other</option>
|
||||||
</select>
|
</select>
|
||||||
<p></p>
|
<p></p>
|
||||||
@ -260,7 +261,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="buildRootDiv" class="hide">
|
<div id="buildRootDiv" class="hide">
|
||||||
<label><input type="checkbox" id="buildRootCheckbox" onchange="onOptionsChanged()"/>Build from root user (unrecommended).</label>
|
<label><input type="checkbox" id="buildRootCheckbox" onchange="onOptionsChanged()"/>Build from root user (not recommended).</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p></p>
|
<p></p>
|
||||||
@ -446,7 +447,7 @@ function onOptionsChanged() {
|
|||||||
pre_text.push('Install Git, ' + compiler + ', make, CMake >= 3.0.2, OpenSSL-dev, zlib-dev, gperf using your package manager.');
|
pre_text.push('Install Git, ' + compiler + ', make, CMake >= 3.0.2, OpenSSL-dev, zlib-dev, gperf using your package manager.');
|
||||||
}
|
}
|
||||||
if (os_freebsd) {
|
if (os_freebsd) {
|
||||||
pre_text.push('Note that the following instruction is for FreeBSD 11.');
|
pre_text.push('Note that the following instruction is for FreeBSD 13.');
|
||||||
pre_text.push('Note that the following calls to <code>pkg</code> needs to be run as <code>root</code>.');
|
pre_text.push('Note that the following calls to <code>pkg</code> needs to be run as <code>root</code>.');
|
||||||
}
|
}
|
||||||
if (os_openbsd) {
|
if (os_openbsd) {
|
||||||
@ -496,6 +497,19 @@ function onOptionsChanged() {
|
|||||||
return '-10';
|
return '-10';
|
||||||
case 'Ubuntu 22':
|
case 'Ubuntu 22':
|
||||||
return '-14';
|
return '-14';
|
||||||
|
case 'Ubuntu 24':
|
||||||
|
return '-18';
|
||||||
|
default:
|
||||||
|
return ''; // use default version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLibcplusplusVersionSuffix() {
|
||||||
|
switch (linux_distro) {
|
||||||
|
case 'Ubuntu 20':
|
||||||
|
case 'Ubuntu 22':
|
||||||
|
case 'Ubuntu 24':
|
||||||
|
return getClangVersionSuffix();
|
||||||
default:
|
default:
|
||||||
return ''; // use default version
|
return ''; // use default version
|
||||||
}
|
}
|
||||||
@ -514,7 +528,7 @@ function onOptionsChanged() {
|
|||||||
commands.push(sudo + 'apk update');
|
commands.push(sudo + 'apk update');
|
||||||
commands.push(sudo + 'apk upgrade');
|
commands.push(sudo + 'apk upgrade');
|
||||||
var packages = 'alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake';
|
var packages = 'alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake';
|
||||||
commands.push(sudo + 'apk add --update ' + packages);
|
commands.push(sudo + 'apk add ' + packages);
|
||||||
break;
|
break;
|
||||||
case 'CentOS 7':
|
case 'CentOS 7':
|
||||||
case 'CentOS 8':
|
case 'CentOS 8':
|
||||||
@ -538,6 +552,7 @@ function onOptionsChanged() {
|
|||||||
case 'Ubuntu 18':
|
case 'Ubuntu 18':
|
||||||
case 'Ubuntu 20':
|
case 'Ubuntu 20':
|
||||||
case 'Ubuntu 22':
|
case 'Ubuntu 22':
|
||||||
|
case 'Ubuntu 24':
|
||||||
if (linux_distro.includes('Debian') && !use_root) {
|
if (linux_distro.includes('Debian') && !use_root) {
|
||||||
commands.push('su -');
|
commands.push('su -');
|
||||||
}
|
}
|
||||||
@ -553,9 +568,9 @@ function onOptionsChanged() {
|
|||||||
packages += ' cmake';
|
packages += ' cmake';
|
||||||
}
|
}
|
||||||
if (use_clang) {
|
if (use_clang) {
|
||||||
packages += ' clang' + getClangVersionSuffix() + ' libc++-dev';
|
packages += ' clang' + getClangVersionSuffix() + ' libc++' + getLibcplusplusVersionSuffix() + '-dev';
|
||||||
if (linux_distro === 'Debian 10+' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20' || linux_distro === 'Ubuntu 22') {
|
if (linux_distro === 'Debian 10+' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20' || linux_distro === 'Ubuntu 22' || linux_distro === 'Ubuntu 24') {
|
||||||
packages += ' libc++abi-dev';
|
packages += ' libc++abi' + getLibcplusplusVersionSuffix() + '-dev';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
packages += ' g++';
|
packages += ' g++';
|
||||||
@ -587,7 +602,7 @@ function onOptionsChanged() {
|
|||||||
commands.push('su -');
|
commands.push('su -');
|
||||||
}
|
}
|
||||||
commands.push('export PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r)/All');
|
commands.push('export PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r)/All');
|
||||||
var packages = 'git gperf cmake openssl gcc12-libs mozilla-rootcerts-openssl';
|
var packages = 'git gperf pcre2 cmake openssl gcc12-libs mozilla-rootcerts-openssl';
|
||||||
commands.push('pkg_add ' + packages);
|
commands.push('pkg_add ' + packages);
|
||||||
if (!use_root) {
|
if (!use_root) {
|
||||||
commands.push('exit');
|
commands.push('exit');
|
||||||
|
Loading…
Reference in New Issue
Block a user