-
Choose an operating system, on which you want to use the Telegram Bot API server:
+
+
- Choose an operating system on which you want to use the Telegram Bot API server:
-
Choose a Linux distro, on which you want to use the Telegram Bot API server:
+
+
- Choose a Linux distro on which you want to use the Telegram Bot API server:
+
@@ -78,6 +245,13 @@ select.large { font-size: large; }
+
+ Choose host architecture:
+ + + +
+
+ + + +
Choose for which bitness you want to build the Telegram Bot API server:
@@ -92,13 +266,16 @@ select.large { font-size: large; }
- @@ -92,13 +266,16 @@ select.large { font-size: large; }
+
-
Hidden text
+
@@ -194,6 +371,8 @@ function onOptionsChanged() {
var use_powershell = false;
var use_cmd = false;
var use_csh = false;
+ var homebrew_install_dir = '';
+ var os_mac_host_name = '';
if (os_windows) {
document.getElementById('buildShellDiv').style.display = 'block';
use_powershell = document.getElementById('buildShellRadioPowerShell').checked;
@@ -206,6 +385,18 @@ function onOptionsChanged() {
} else {
document.getElementById('buildShellBsdDiv').style.display = 'none';
}
+ if (os_mac) {
+ document.getElementById('buildMacOsHostDiv').style.display = 'block';
+ if (document.getElementById('buildMacOsHostRadioAppleSilicon').checked) {
+ homebrew_install_dir = '/opt/homebrew';
+ os_mac_host_name = 'Apple silicon';
+ } else {
+ homebrew_install_dir = '/usr/local';
+ os_mac_host_name = 'Intel';
+ }
+ } else {
+ document.getElementById('buildMacOsHostDiv').style.display = 'none';
+ }
var use_msvc = os_windows;
var use_vcpkg = os_windows;
@@ -249,10 +440,9 @@ function onOptionsChanged() {
pre_text.push('Download and install Microsoft Visual Studio. Enable C++ support while installing.');
pre_text.push('Download and install CMake; choose "Add CMake to the system PATH" option while installing.');
pre_text.push('Download and install Git.');
- pre_text.push('Download and install gperf. Add the path to gperf.exe to the PATH environment variable.');
}
if (os_linux && linux_distro === 'Other') {
- var compiler = use_clang ? 'clang >= 3.4' : 'g++ >= 4.9.2';
+ var compiler = use_clang ? 'clang >= 3.4, libc++' : 'g++ >= 4.9.2';
pre_text.push('Install Git, ' + compiler + ', make, CMake >= 3.0.2, OpenSSL-dev, zlib-dev, gperf using your package manager.');
}
if (os_freebsd) {
@@ -264,7 +454,7 @@ function onOptionsChanged() {
pre_text.push('Note that building requires a lot of memory, so you may need to increase allowed per-process memory usage in /etc/login.conf or build from root.');
}
if (os_netbsd) {
- pre_text.push('Note that the following instruction is for NetBSD 8.0 and default SH shell.');
+ pre_text.push('Note that the following instruction is for NetBSD 8+ and default SH shell.');
}
var terminal_name = (function () {
@@ -304,6 +494,8 @@ function onOptionsChanged() {
return '-6.0';
case 'Ubuntu 20':
return '-10';
+ case 'Ubuntu 22':
+ return '-14';
default:
return ''; // use default version
}
@@ -314,7 +506,7 @@ function onOptionsChanged() {
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)"');
+ commands.push('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"');
commands.push('brew install gperf cmake openssl');
} else if (os_linux && linux_distro !== 'Other') {
switch (linux_distro) {
@@ -334,18 +526,18 @@ function onOptionsChanged() {
cmake = 'cmake3';
packages += ' gperf';
} else {
- commands.push(sudo + 'dnf --enablerepo=PowerTools install gperf');
+ 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':
+ case 'Debian 8/9':
+ case 'Debian 10+':
case 'Ubuntu 14':
case 'Ubuntu 16':
case 'Ubuntu 18':
case 'Ubuntu 20':
+ case 'Ubuntu 22':
if (linux_distro.includes('Debian') && !use_root) {
commands.push('su -');
}
@@ -362,7 +554,7 @@ function onOptionsChanged() {
}
if (use_clang) {
packages += ' clang' + getClangVersionSuffix() + ' libc++-dev';
- if (linux_distro === 'Debian 10' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20') {
+ if (linux_distro === 'Debian 10+' || linux_distro === 'Ubuntu 18' || linux_distro === 'Ubuntu 20' || linux_distro === 'Ubuntu 22') {
packages += ' libc++abi-dev';
}
} else {
@@ -394,8 +586,8 @@ function onOptionsChanged() {
if (!use_root) {
commands.push('su -');
}
- commands.push('export PKG_PATH=ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/8.0_2019Q2/All');
- var packages = 'git gperf cmake openssl gcc5-libs';
+ 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';
commands.push('pkg_add ' + packages);
if (!use_root) {
commands.push('exit');
@@ -410,9 +602,9 @@ function onOptionsChanged() {
commands.push('cd vcpkg');
commands.push(local + 'bootstrap-vcpkg.bat');
if (build_64bit) {
- commands.push(local + 'vcpkg.exe install openssl:x64-windows zlib:x64-windows');
+ commands.push(local + 'vcpkg.exe install gperf:x64-windows openssl:x64-windows zlib:x64-windows');
} else {
- commands.push(local + 'vcpkg.exe install openssl:x86-windows zlib:x86-windows');
+ commands.push(local + 'vcpkg.exe install gperf:x86-windows openssl:x86-windows zlib:x86-windows');
}
commands.push('cd ..');
}
@@ -438,7 +630,7 @@ function onOptionsChanged() {
cmake_init_options = getBacicCmakeInitOptions();
if (os_mac) {
- cmake_init_options.push('-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/');
+ cmake_init_options.push('-DOPENSSL_ROOT_DIR=' + homebrew_install_dir + '/opt/openssl/');
}
cmake_init_options.push('-DCMAKE_INSTALL_PREFIX:PATH=' + install_dir);
if (use_vcpkg) {
@@ -488,6 +680,26 @@ function onOptionsChanged() {
}
commands.push((use_powershell ? 'dir ' : 'ls -l ') + install_dir + '/bin/tdlight-telegram-bot-api*');
document.getElementById('buildCommands').innerHTML = 'Hidden text
Empty commands
+
- ' + commands.join('
- ') + '