aboutsummaryrefslogtreecommitdiffhomepage
path: root/build.html
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2020-10-28 23:25:57 +0300
committerlevlam <levlam@telegram.org>2020-10-28 23:25:57 +0300
commit1a6161003c3f79bc564e92a46d50e7f0cbe43fbd (patch)
tree2fed6d38956af4cbf2ebf3c1eeedaaf87fb5ebd0 /build.html
parent876b6da2989b590c019d51992ac213a38ce7e603 (diff)
Choose Linux distro before allowing to change other build options in build instruction generator.
GitOrigin-RevId: b3f177e36b5098c55a9c7b32e4f0a2101c97ac16
Diffstat (limited to 'build.html')
-rw-r--r--build.html113
1 files changed, 60 insertions, 53 deletions
diff --git a/build.html b/build.html
index 98a740bb5..b97a77958 100644
--- a/build.html
+++ b/build.html
@@ -14,34 +14,32 @@ select.large { font-size: large; }
<body onpopstate="onLoad(false)">
<div class="main">
- <div align="center">
- <div id="languageSelectDiv">
- <p>Choose a programming language, from which you want to use TDLib:</p>
- <select id="languageSelect" onchange="onLanguageChanged(false)" autofocus="true" class="large">
- <option>Choose a programming language:</option>
- <option>Python</option>
- <option>JavaScript</option>
- <option>Go</option>
- <option>Java</option>
- <option>Kotlin</option>
- <option>C#</option>
- <option>C++</option>
- <option>Swift</option>
- <option>Objective-C</option>
- <option>Object Pascal</option>
- <option>Dart</option>
- <option>Rust</option>
- <option>Erlang</option>
- <option>PHP</option>
- <option>Lua</option>
- <option>Ruby</option>
- <option>Clojure</option>
- <option>D</option>
- <option>Elixir</option>
- <option>C</option>
- <option>Other</option>
- </select>
- </div>
+ <div id="languageSelectDiv" align="center">
+ <p>Choose a programming language, from which you want to use TDLib:</p>
+ <select id="languageSelect" onchange="onLanguageChanged(false)" autofocus="true" class="large">
+ <option>Choose a programming language:</option>
+ <option>Python</option>
+ <option>JavaScript</option>
+ <option>Go</option>
+ <option>Java</option>
+ <option>Kotlin</option>
+ <option>C#</option>
+ <option>C++</option>
+ <option>Swift</option>
+ <option>Objective-C</option>
+ <option>Object Pascal</option>
+ <option>Dart</option>
+ <option>Rust</option>
+ <option>Erlang</option>
+ <option>PHP</option>
+ <option>Lua</option>
+ <option>Ruby</option>
+ <option>Clojure</option>
+ <option>D</option>
+ <option>Elixir</option>
+ <option>C</option>
+ <option>Other</option>
+ </select>
</div>
<div id="osSelectDiv" class="hide" align="center">
@@ -52,24 +50,24 @@ select.large { font-size: large; }
<p></p>
</div>
- <div id="buildOptionsDiv" class="hide" align="center">
- <div id="linuxSelectDiv" class="hide">
- <p>Choose a Linux distro, on which you want to use TDLib:</p>
- <select id="linuxSelect" onchange="onOptionsChanged()" class="large">
- <option>Choose a Linux distro:</option>
- <option>Alpine</option>
- <option>Debian 8</option>
- <option>Debian 9</option>
- <option>Debian 10</option>
- <option>Ubuntu 14</option>
- <option>Ubuntu 16</option>
- <option>Ubuntu 18</option>
- <option>Ubuntu 20</option>
- <option>Other</option>
- </select>
- <p></p>
- </div>
+ <div id="linuxSelectDiv" class="hide" align="center">
+ <p>Choose a Linux distro, on which you want to use TDLib:</p>
+ <select id="linuxSelect" onchange="onOsChanged()" class="large">
+ <option>Choose a Linux distro:</option>
+ <option>Alpine</option>
+ <option>Debian 8</option>
+ <option>Debian 9</option>
+ <option>Debian 10</option>
+ <option>Ubuntu 14</option>
+ <option>Ubuntu 16</option>
+ <option>Ubuntu 18</option>
+ <option>Ubuntu 20</option>
+ <option>Other</option>
+ </select>
+ <p></p>
+ </div>
+ <div id="buildOptionsDiv" class="hide" align="center">
<div id="buildLtoDiv" class="hide">
<label><input type="checkbox" id="buildLtoCheckbox" onchange="onOptionsChanged()"/>Enable Link Time Optimization (requires CMake >= 3.9.0). It can significantly reduce binary size and increase performance, but sometimes it can lead to build failures.</label>
</div>
@@ -335,11 +333,27 @@ function onOsChanged() {
document.getElementById('buildText').innerHTML = text;
if (!target) {
+ document.getElementById('linuxSelectDiv').style.display = 'none';
document.getElementById('buildOptionsDiv').style.display = 'none';
document.getElementById('buildCommandsDiv').style.display = 'none';
return;
}
+ var os_linux = os.includes('Linux');
+ if (os_linux) {
+ document.getElementById('linuxSelectDiv').style.display = 'block';
+
+ var linux_distro = document.getElementById('linuxSelect').value;
+ if (linux_distro.includes('Choose ')) {
+ document.getElementById('buildTextDiv').style.display = 'none';
+ document.getElementById('buildOptionsDiv').style.display = 'none';
+ document.getElementById('buildCommandsDiv').style.display = 'none';
+ return;
+ }
+ } else {
+ document.getElementById('linuxSelectDiv').style.display = 'none';
+ }
+
document.getElementById('buildOptionsDiv').style.display = 'block';
onOptionsChanged();
@@ -357,18 +371,11 @@ function onOptionsChanged() {
var os_openbsd = os.includes('OpenBSD');
var os_netbsd = os.includes('NetBSD');
- var display_commands = 'block';
var linux_distro = 'none';
if (os_linux) {
- document.getElementById('linuxSelectDiv').style.display = 'block';
linux_distro = document.getElementById('linuxSelect').value;
- if (linux_distro.indexOf('Choose') === 0) {
- display_commands = 'none';
- }
- } else {
- document.getElementById('linuxSelectDiv').style.display = 'none';
}
- document.getElementById('buildCommandsDiv').style.display = display_commands;
+ document.getElementById('buildCommandsDiv').style.display = 'block';
var use_clang = os_freebsd || os_openbsd;
if (os_linux && linux_distro !== 'Alpine') {