Choose Linux distro before allowing to change other build options in build instruction generator.
GitOrigin-RevId: b3f177e36b5098c55a9c7b32e4f0a2101c97ac16
This commit is contained in:
parent
876b6da298
commit
1a6161003c
35
build.html
35
build.html
@ -14,8 +14,7 @@ select.large { font-size: large; }
|
|||||||
<body onpopstate="onLoad(false)">
|
<body onpopstate="onLoad(false)">
|
||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div align="center">
|
<div id="languageSelectDiv" align="center">
|
||||||
<div id="languageSelectDiv">
|
|
||||||
<p>Choose a programming language, from which you want to use TDLib:</p>
|
<p>Choose a programming language, from which you want to use TDLib:</p>
|
||||||
<select id="languageSelect" onchange="onLanguageChanged(false)" autofocus="true" class="large">
|
<select id="languageSelect" onchange="onLanguageChanged(false)" autofocus="true" class="large">
|
||||||
<option>Choose a programming language:</option>
|
<option>Choose a programming language:</option>
|
||||||
@ -42,7 +41,6 @@ select.large { font-size: large; }
|
|||||||
<option>Other</option>
|
<option>Other</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="osSelectDiv" class="hide" align="center">
|
<div id="osSelectDiv" class="hide" align="center">
|
||||||
<p>Choose an operating system, on which you want to use TDLib:</p>
|
<p>Choose an operating system, on which you want to use TDLib:</p>
|
||||||
@ -52,10 +50,9 @@ select.large { font-size: large; }
|
|||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="buildOptionsDiv" class="hide" align="center">
|
<div id="linuxSelectDiv" class="hide" align="center">
|
||||||
<div id="linuxSelectDiv" class="hide">
|
|
||||||
<p>Choose a Linux distro, on which you want to use TDLib:</p>
|
<p>Choose a Linux distro, on which you want to use TDLib:</p>
|
||||||
<select id="linuxSelect" onchange="onOptionsChanged()" class="large">
|
<select id="linuxSelect" onchange="onOsChanged()" class="large">
|
||||||
<option>Choose a Linux distro:</option>
|
<option>Choose a Linux distro:</option>
|
||||||
<option>Alpine</option>
|
<option>Alpine</option>
|
||||||
<option>Debian 8</option>
|
<option>Debian 8</option>
|
||||||
@ -70,6 +67,7 @@ select.large { font-size: large; }
|
|||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="buildOptionsDiv" class="hide" align="center">
|
||||||
<div id="buildLtoDiv" class="hide">
|
<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>
|
<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>
|
</div>
|
||||||
@ -335,11 +333,27 @@ function onOsChanged() {
|
|||||||
document.getElementById('buildText').innerHTML = text;
|
document.getElementById('buildText').innerHTML = text;
|
||||||
|
|
||||||
if (!target) {
|
if (!target) {
|
||||||
|
document.getElementById('linuxSelectDiv').style.display = 'none';
|
||||||
document.getElementById('buildOptionsDiv').style.display = 'none';
|
document.getElementById('buildOptionsDiv').style.display = 'none';
|
||||||
document.getElementById('buildCommandsDiv').style.display = 'none';
|
document.getElementById('buildCommandsDiv').style.display = 'none';
|
||||||
return;
|
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';
|
document.getElementById('buildOptionsDiv').style.display = 'block';
|
||||||
|
|
||||||
onOptionsChanged();
|
onOptionsChanged();
|
||||||
@ -357,18 +371,11 @@ function onOptionsChanged() {
|
|||||||
var os_openbsd = os.includes('OpenBSD');
|
var os_openbsd = os.includes('OpenBSD');
|
||||||
var os_netbsd = os.includes('NetBSD');
|
var os_netbsd = os.includes('NetBSD');
|
||||||
|
|
||||||
var display_commands = 'block';
|
|
||||||
var linux_distro = 'none';
|
var linux_distro = 'none';
|
||||||
if (os_linux) {
|
if (os_linux) {
|
||||||
document.getElementById('linuxSelectDiv').style.display = 'block';
|
|
||||||
linux_distro = document.getElementById('linuxSelect').value;
|
linux_distro = document.getElementById('linuxSelect').value;
|
||||||
if (linux_distro.indexOf('Choose') === 0) {
|
|
||||||
display_commands = 'none';
|
|
||||||
}
|
}
|
||||||
} else {
|
document.getElementById('buildCommandsDiv').style.display = 'block';
|
||||||
document.getElementById('linuxSelectDiv').style.display = 'none';
|
|
||||||
}
|
|
||||||
document.getElementById('buildCommandsDiv').style.display = display_commands;
|
|
||||||
|
|
||||||
var use_clang = os_freebsd || os_openbsd;
|
var use_clang = os_freebsd || os_openbsd;
|
||||||
if (os_linux && linux_distro !== 'Alpine') {
|
if (os_linux && linux_distro !== 'Alpine') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user