From b14728546b69329c54308a2761733f0bf9e779df Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 25 Apr 2016 22:30:04 +0000 Subject: [PATCH 1/9] www: Beef up platform detection a bit. Fixes #267 --- www/rustup.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/www/rustup.js b/www/rustup.js index 8626e26db0..52dde8382c 100644 --- a/www/rustup.js +++ b/www/rustup.js @@ -2,17 +2,24 @@ function detect_platform() { "use strict"; var os = "unknown"; - if (os == "unknown") { - if (navigator.platform == "Linux x86_64") {os = "unix";} - if (navigator.platform == "Linux i686") {os = "unix";} - if (navigator.platform == "Linux armv7l") { os = "unix";} + if (navigator.platform == "Linux x86_64") {os = "unix";} + if (navigator.platform == "Linux i686") {os = "unix";} + if (navigator.platform == "Linux i686 on x86_64") {os = "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 == "Win32") {os = "win";} + if (navigator.platform == "FreeBSD x86_64") {os = "unix";} + + if (navigator.platform == "Linux armv7l" + && navigator.appVersion.indexOf("Android") != -1 ) { + os = "android"; } // I wish I knew by now, but I don't. Try harder. if (os == "unknown") { if (navigator.appVersion.indexOf("Win")!=-1) {os = "win";} if (navigator.appVersion.indexOf("Mac")!=-1) {os = "unix";} - if (navigator.appVersion.indexOf("Linux")!=-1) {os = "unix";} } return os; From 9f0c2ced873aeacad53fff0174f841cb380e8757 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 26 Apr 2016 00:51:02 +0000 Subject: [PATCH 2/9] www: Various tweaks Adds link for additional installation methods. Indicates the officialness of the project. Improves Linux, FreeBSD, arm, Android platform detection. Adds unique installation text for Android. Removes most of the pitch to make more room. Fixes #269. Fixes #328 --- www/index.html | 36 +++++++++++++++++++++++------------- www/rustup.css | 11 +++++------ www/rustup.js | 4 ++++ 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/www/index.html b/www/index.html index 6e06026e5f..4d29960c6c 100644 --- a/www/index.html +++ b/www/index.html @@ -14,12 +14,8 @@

- This is the ultimate way to install + This is the ultimate way to install
the systems programming language Rust - the systems programming language
- that runs blazingly fast,
- prevents segfaults,
- and guarantees thread safety.

+ +
-

I don't recognize your platform.

+

I don't recognize your platform.

- rustup supports Windows, Linux, and Mac OS X. If you are - on one of these platforms and are seeing this then either - JavaScript is disabled or this website is drunk and + rustup runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If + you are on one of these platforms and are seeing this then either + JavaScript is disabled or this website is buggy and should be reported.

-

- WARNING: This is an early beta. Expect breakage. -

+

Need help?
Ask on #rust-beginners.

- More about rustup. + rustup is an official Rust project.
+ Read more about it.

diff --git a/www/rustup.css b/www/rustup.css index 39456e8fc6..97c625e0d0 100644 --- a/www/rustup.css +++ b/www/rustup.css @@ -61,6 +61,7 @@ body#idx p { body#idx > #platform-instructions-unix { margin-left: auto; margin-right: auto; + padding-bottom: 1em; width: 30em; } @@ -90,10 +91,8 @@ body#idx > #platform-instructions-unix { font-family: "Source Code Pro", monospace; } -#about { - font-size: 70%; - text-shadow: 1px 1px #242828; -} -#about > a { - text-shadow: 1px 1px #242828; +#warning { + color: red; + font-family: "Work Sans", monospace; } + diff --git a/www/rustup.js b/www/rustup.js index 52dde8382c..557a83bf29 100644 --- a/www/rustup.js +++ b/www/rustup.js @@ -31,6 +31,7 @@ function detect_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"); if (platform == "unix") { @@ -39,5 +40,8 @@ function detect_platform() { } else if (platform == "win") { win_div.style.display = "block"; unknown_div.style.display = "none"; + } else if (platform == "android") { + android_div.style.display = "block"; + unknown_div.style.display = "none"; } }()); From df49df20ff7a313a84c824c8263cd75ddd548fa3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 26 Apr 2016 21:25:50 +0000 Subject: [PATCH 3/9] Use a style more like rust-lang.org --- README.md | 12 +++++- www/index.html | 48 ++++++++++++++++------ www/rustup.css | 106 +++++++++++++++++++++++++++++-------------------- www/rustup.js | 68 +++++++++++++++++++++++++++++-- 4 files changed, 173 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 0934a98214..cebf0b342c 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ And it runs on all platforms Rust supports, especially Windows. * [Environment variables](#environment-variables) * [Other installation methods](#other-installation-methods) * [Security](#security) -* [How is this related to multirust?](#how-is-this-related-to-multirust) +* [FAQ](#faq) * [License](#license) * [Contributing](#contributing) @@ -419,7 +419,15 @@ variable. work. `rustup` performs all downloads over HTTPS, but does not yet validate signatures of downloads. -## How is this related to multirust? +## FAQ + +### Is this an official Rust project? + +Yes. rustup is an official Rust project. Once it is complete it will +be the recommended way to install Rust and www.rust-lang.org will be +updated to reflect that. + +### How is this related to multirust? rustup is the successor to [multirust]. rustup began as multirust-rs, a rewrite of multirust from shell script to Rust, by [Diggory Blake], diff --git a/www/index.html b/www/index.html index 4d29960c6c..a903fca0aa 100644 --- a/www/index.html +++ b/www/index.html @@ -2,7 +2,7 @@ - rustup.rs - Update your Rust + rustup.rs - The Rust toolchain installer @@ -13,17 +13,22 @@ + +

- This is the ultimate way to install
the systems programming language + rustup is the ultimate way to install
+ the systems programming language Rust

-