Skip to content

Commit

Permalink
Prepare docs for pre-built Windows binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl committed May 5, 2023
1 parent 71ac813 commit 3ccd538
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "melt"
version = "2.1.2"
version = "2.1.3"
authors = ["Fenhl <[email protected]>"]
edition = "2021"
repository = "https://github.com/fenhl/melt"
Expand Down
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,11 @@ A snowflake consists of 4 pieces of information: Timestamp, data center ID, work

# Installation

1. (Skip this step if you're not on Windows.) If you're on Windows, you'll first need to download and install [Visual Studio](https://visualstudio.microsoft.com/vs/) (the Community edition should work). On the “Workloads” screen of the installer, make sure “Desktop development with C++” is selected. (Note that [Visual Studio Code](https://code.visualstudio.com/) is not the same thing as Visual Studio. You need VS, not VS Code.)
2. Install Rust:
* On Windows, download and run [rustup-init.exe](https://win.rustup.rs/) and follow its instructions.
* On other platforms, please see [the Rust website](https://www.rust-lang.org/tools/install) for instructions.
3. Open a command line:
* On Windows, right-click the start button, then click “Terminal”, “Windows PowerShell”, or “Command Prompt”.
* On other platforms, look for an app named “Terminal” or similar.
4. In the command line, run the following command. Depending on your computer, this may take a while.

```
cargo install --git=https://github.com/fenhl/melt --branch=main
```
Please see the install instructions for your operating system:

* [Windows](https://github.com/fenhl/melt/blob/main/assets/doc/install-windows.md)

If your operating system is not listed here, or if you would like to manage updates of `melt` using [`cargo-update`](https://crates.io/crates/cargo-update), follow [the instructions for building from source](https://github.com/fenhl/melt/blob/main/assets/doc/build.md).

# Usage

Expand Down
16 changes: 16 additions & 0 deletions assets/doc/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Building from source

If [pre-built binaries](https://github.com/fenhl/melt#installation) are not available for your system, or if you would like to manage updates of `melt` using [`cargo-update`](https://crates.io/crates/cargo-update), follow these instructions:

1. (Skip this step if you're not on Windows.) If you're on Windows, you'll first need to download and install [Visual Studio](https://visualstudio.microsoft.com/vs/) (the Community edition should work). On the “Workloads” screen of the installer, make sure “Desktop development with C++” is selected. (Note that [Visual Studio Code](https://code.visualstudio.com/) is not the same thing as Visual Studio. You need VS, not VS Code.)
2. Install Rust:
* On Windows, download and run [rustup-init.exe](https://win.rustup.rs/) and follow its instructions.
* On other platforms, please see [the Rust website](https://www.rust-lang.org/tools/install) for instructions.
3. Open a command line:
* On Windows, right-click the start button, then click “Terminal”, “Windows PowerShell”, or “Command Prompt”.
* On other platforms, look for an app named “Terminal” or similar.
4. In the command line, run the following command. Depending on your computer, this may take a while.

```
cargo install --git=https://github.com/fenhl/melt --branch=main
```
16 changes: 16 additions & 0 deletions assets/doc/install-windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
1. Press <kbd>Windows</kbd><kbd>I</kbd> open the Settings app
2. Navigate to System → About
3. In the “Device specifications” section, check what the second half of the “System type” says, and download the appropriate file:

* [x86-based processor](https://github.com/fenhl/melt/releases/latest/download/melt-x86.exe)
* [x64-based processor](https://github.com/fenhl/melt/releases/latest/download/melt-x64.exe)

If your system type is not listed here, or if you would like to manage updates of `melt` using [`cargo-update`](https://crates.io/crates/cargo-update), follow [the instructions for building from source](https://github.com/fenhl/melt/blob/main/assets/doc/build.md).
4. Place the downloaded file into a folder where you keep your command-line programs (or create such a folder at a location of your choice), then rename the downloaded file to `melt.exe`
5. Click on the empty part of the path bar near the top of the File Explorer window, and copy the path to your clipboard
6. Press <kbd>Windows</kbd><kbd>R</kbd>, enter `SystemPropertiesAdvanced`, and click OK
7. In the System Properties window that opens, click “Environment Variables…”
8. In the “User variables for (your username)” section, find the `Path` variable, and click Edit
9. Click “New” and paste the path copied in step 5
10. Save your changes by clicking OK in all 3 System Properties windows
11. You can now use `melt` inside a command line, which can be opened by right-clicking the start button, then clicking “Terminal”, “Windows PowerShell”, or “Command Prompt”. See [the readme](https://github.com/fenhl/melt#usage) for usage instructions.

0 comments on commit 3ccd538

Please sign in to comment.