Skip to content

Commit

Permalink
Auto merge of #1037 - malbarbo:android-links, r=brson
Browse files Browse the repository at this point in the history
Update links and install page to include android support
  • Loading branch information
bors committed Apr 8, 2017
2 parents 904ecf0 + fc644e7 commit 129119c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,17 @@ $ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
If you prefer you can directly download `rustup-init` for the
platform of your choice:

- [aarch64-linux-android](https://static.rust-lang.org/rustup/dist/aarch64-linux-android/rustup-init)
- [aarch64-unknown-linux-gnu](https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init)
- [arm-linux-androideabi](https://static.rust-lang.org/rustup/dist/arm-linux-androideabi/rustup-init)
- [arm-unknown-linux-gnueabi](https://static.rust-lang.org/rustup/dist/arm-unknown-linux-gnueabi/rustup-init)
- [arm-unknown-linux-gnueabihf](https://static.rust-lang.org/rustup/dist/arm-unknown-linux-gnueabihf/rustup-init)
- [armv7-linux-androideabi](https://static.rust-lang.org/rustup/dist/armv7-linux-androideabi/rustup-init)
- [armv7-unknown-linux-gnueabihf](https://static.rust-lang.org/rustup/dist/armv7-unknown-linux-gnueabihf/rustup-init)
- [i686-apple-darwin](https://static.rust-lang.org/rustup/dist/i686-apple-darwin/rustup-init)
- [i686-pc-windows-gnu](https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe)
- [i686-pc-windows-msvc](https://static.rust-lang.org/rustup/dist/i686-pc-windows-msvc/rustup-init.exe)<sup>[](#vs2015)</sup>
- [i686-linux-android](https://static.rust-lang.org/rustup/dist/i686-linux-android/rustup-init)
- [i686-unknown-linux-gnu](https://static.rust-lang.org/rustup/dist/i686-unknown-linux-gnu/rustup-init)
- [x86_64-apple-darwin](https://static.rust-lang.org/rustup/dist/x86_64-apple-darwin/rustup-init)
- [x86_64-pc-windows-gnu](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe)
Expand Down
13 changes: 0 additions & 13 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@
</p>
</div>

<div id="platform-instructions-android" class="instructions" style="display: none;">
<p>It looks like you are running Android.</p>
<p>
rustup does not run on Android directly (yet),
but it does make it easy to cross-compile <em>to</em> Android.
Install rustup on a supported host platform and
<a href="https://github.com/rust-lang-nursery/rustup.rs/#cross-compilation">
follow the cross-compilation instructions
</a>
to build Rust applications for Android.
</p>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>I don't recognize your platform.</p>
Expand Down
19 changes: 5 additions & 14 deletions www/rustup.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
var platform_override = null;

function android_or_unix() {
return (navigator.appVersion.indexOf("Android") != -1) ? "android" : "unix";
}

function detect_platform() {
"use strict";

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

if (navigator.platform == "Linux x86_64") {os = "unix";}
if (navigator.platform == "Linux i686") {os = android_or_unix();}
if (navigator.platform == "Linux i686") {os = "unix";}
if (navigator.platform == "Linux i686 on x86_64") {os = "unix";}
if (navigator.platform == "Linux aarch64") {os = android_or_unix();}
if (navigator.platform == "Linux armv6l") {os = android_or_unix();}
if (navigator.platform == "Linux armv7l") {os = android_or_unix();}
if (navigator.platform == "Linux aarch64") {os = "unix";}
if (navigator.platform == "Linux armv6l") {os = "unix";}
if (navigator.platform == "Linux armv7l") {os = "unix";}
if (navigator.platform == "Linux armv8l") {os = "unix";}
if (navigator.platform == "Linux ppc64") {os = "unix";}
if (navigator.platform == "Linux mips") {os = "unix";}
if (navigator.platform == "Linux mips64") {os = "unix";}
Expand Down Expand Up @@ -47,22 +44,18 @@ function adjust_for_platform() {

var unix_div = document.getElementById("platform-instructions-unix");
var win_div = document.getElementById("platform-instructions-win");
var android_div = document.getElementById("platform-instructions-android");
var unknown_div = document.getElementById("platform-instructions-unknown");
var default_div = document.getElementById("platform-instructions-default");

unix_div.style.display = "none";
win_div.style.display = "none";
android_div.style.display = "none";
unknown_div.style.display = "none";
default_div.style.display = "none";

if (platform == "unix") {
unix_div.style.display = "block";
} else if (platform == "win") {
win_div.style.display = "block";
} else if (platform == "android") {
android_div.style.display = "block";
} else if (platform == "unknown") {
unknown_div.style.display = "block";
} else {
Expand All @@ -80,8 +73,6 @@ function cycle_platform() {
} else if (platform_override == "win") {
platform_override = "unix";
} else if (platform_override == "unix") {
platform_override = "android";
} else if (platform_override == "android") {
platform_override = "default";
}
adjust_for_platform();
Expand Down

0 comments on commit 129119c

Please sign in to comment.