Skip to content

Commit fc644e7

Browse files
committed
We now support android, update install info
1 parent 45057d3 commit fc644e7

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

www/index.html

-13
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@
3636
</p>
3737
</div>
3838

39-
<div id="platform-instructions-android" class="instructions" style="display: none;">
40-
<p>It looks like you are running Android.</p>
41-
<p>
42-
rustup does not run on Android directly (yet),
43-
but it does make it easy to cross-compile <em>to</em> Android.
44-
Install rustup on a supported host platform and
45-
<a href="https://github.com/rust-lang-nursery/rustup.rs/#cross-compilation">
46-
follow the cross-compilation instructions
47-
</a>
48-
to build Rust applications for Android.
49-
</p>
50-
</div>
51-
5239
<div id="platform-instructions-unknown" class="instructions" style="display: none;">
5340
<!-- unrecognized platform: ask for help -->
5441
<p>I don't recognize your platform.</p>

www/rustup.js

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
var platform_override = null;
22

3-
function android_or_unix() {
4-
return (navigator.appVersion.indexOf("Android") != -1) ? "android" : "unix";
5-
}
6-
73
function detect_platform() {
84
"use strict";
95

@@ -14,11 +10,12 @@ function detect_platform() {
1410
var os = "unknown";
1511

1612
if (navigator.platform == "Linux x86_64") {os = "unix";}
17-
if (navigator.platform == "Linux i686") {os = android_or_unix();}
13+
if (navigator.platform == "Linux i686") {os = "unix";}
1814
if (navigator.platform == "Linux i686 on x86_64") {os = "unix";}
19-
if (navigator.platform == "Linux aarch64") {os = android_or_unix();}
20-
if (navigator.platform == "Linux armv6l") {os = android_or_unix();}
21-
if (navigator.platform == "Linux armv7l") {os = android_or_unix();}
15+
if (navigator.platform == "Linux aarch64") {os = "unix";}
16+
if (navigator.platform == "Linux armv6l") {os = "unix";}
17+
if (navigator.platform == "Linux armv7l") {os = "unix";}
18+
if (navigator.platform == "Linux armv8l") {os = "unix";}
2219
if (navigator.platform == "Linux ppc64") {os = "unix";}
2320
if (navigator.platform == "Linux mips") {os = "unix";}
2421
if (navigator.platform == "Linux mips64") {os = "unix";}
@@ -47,22 +44,18 @@ function adjust_for_platform() {
4744

4845
var unix_div = document.getElementById("platform-instructions-unix");
4946
var win_div = document.getElementById("platform-instructions-win");
50-
var android_div = document.getElementById("platform-instructions-android");
5147
var unknown_div = document.getElementById("platform-instructions-unknown");
5248
var default_div = document.getElementById("platform-instructions-default");
5349

5450
unix_div.style.display = "none";
5551
win_div.style.display = "none";
56-
android_div.style.display = "none";
5752
unknown_div.style.display = "none";
5853
default_div.style.display = "none";
5954

6055
if (platform == "unix") {
6156
unix_div.style.display = "block";
6257
} else if (platform == "win") {
6358
win_div.style.display = "block";
64-
} else if (platform == "android") {
65-
android_div.style.display = "block";
6659
} else if (platform == "unknown") {
6760
unknown_div.style.display = "block";
6861
} else {
@@ -80,8 +73,6 @@ function cycle_platform() {
8073
} else if (platform_override == "win") {
8174
platform_override = "unix";
8275
} else if (platform_override == "unix") {
83-
platform_override = "android";
84-
} else if (platform_override == "android") {
8576
platform_override = "default";
8677
}
8778
adjust_for_platform();

0 commit comments

Comments
 (0)