Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove additional redundant "press any key to exit" #45

Merged
merged 13 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@ test = false # no unit tests
name = "elan-init"
path = "src/elan-cli/main.rs"
test = false # no unit tests

[[bin]]
name = "elan"
path = "src/elan-cli/main.rs"
test = false # no unit tests
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ On some systems, `lean`/`leanpkg` will not work out of the box even if installed
*elan* is basically a fork of [rustup](https://github.com/rust-lang-nursery/rustup.rs). Apart from new features and adaptions to the Lean infrastructure, these are the basic changes to the original code:

* Replaced every mention of `rustup` with `elan`, `cargo` with `leanpkg`, and `rust(c)` with `lean`
* Removed Windows installer... for now?
* Merged `CARGO_HOME` and `RUSTUP_HOME`
* Removed options to configure host triple

# Build
lovettchris marked this conversation as resolved.
Show resolved Hide resolved

If you want to build elan from source, you will need to install [Rust](https://www.rust-lang.org/tools/install) and
Cargo and run the following:

```
cargo build
```

The built binaries will show up in `target/debug` folder. You can test that it works by running the following:

```
./target/debug/elan --help
```

# Build on Windows

The windows build requires a 64bit developer command prompt and a windows version of `perl.exe` which you can download
from [https://strawberryperl.com/](https://strawberryperl.com/). Make sure this downloaded perl.exe is the first thing
in your PATH so that the build does not try and use `c:\Program Files\Git\usr\bin\perl.exe`. The git provided version of
perl doesn't work for some reason.

Then you can run `cargo build` as shown above.
4 changes: 2 additions & 2 deletions src/elan-cli/elan_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pub fn cli() -> App<'static, 'static> {
.help("Standard library API documentation"))
.group(ArgGroup::with_name("page")
.args(&["book", "std"])))*/;

/*if cfg!(not(target_os = "windows")) {
app = app
.subcommand(SubCommand::with_name("man")
Expand All @@ -221,7 +221,7 @@ pub fn cli() -> App<'static, 'static> {
.long("toolchain")
.takes_value(true)));
}*/

app.subcommand(SubCommand::with_name("self")
.about("Modify the elan installation")
.setting(AppSettings::VersionlessSubcommands)
Expand Down
11 changes: 0 additions & 11 deletions src/elan-cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,6 @@ pub fn install(no_prompt: bool, verbose: bool,
if let Err(ref e) = install_res {
common::report_error(e);

// On windows, where installation happens in a console
// that may have opened just for this purpose, give
// the user an opportunity to see the error before the
// window closes.
if cfg!(windows) && !no_prompt {
println!("");
println!("Press the Enter key to continue.");
try!(common::read_line());
}

process::exit(1);
}

Expand Down Expand Up @@ -729,7 +719,6 @@ fn delete_elan_and_elan_home() -> Result<()> {
use winapi::shared::minwindef::DWORD;
use std::os::windows::ffi::OsStrExt;
use std::ptr;
use std::io;
use std::mem;

unsafe {
Expand Down