Skip to content

Commit 3ccd538

Browse files
committed
Prepare docs for pre-built Windows binaries
1 parent 71ac813 commit 3ccd538

File tree

6 files changed

+45
-14
lines changed

6 files changed

+45
-14
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
[target.aarch64-pc-windows-msvc]
2+
rustflags = ["-C", "target-feature=+crt-static"]
3+
4+
[target.i686-pc-windows-msvc]
5+
rustflags = ["-C", "target-feature=+crt-static"]
6+
17
[target.x86_64-pc-windows-msvc]
28
rustflags = ["-C", "target-feature=+crt-static"]

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "melt"
3-
version = "2.1.2"
3+
version = "2.1.3"
44
authors = ["Fenhl <fenhl@fenhl.net>"]
55
edition = "2021"
66
repository = "https://github.com/fenhl/melt"

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,11 @@ A snowflake consists of 4 pieces of information: Timestamp, data center ID, work
1010

1111
# Installation
1212

13-
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.)
14-
2. Install Rust:
15-
* On Windows, download and run [rustup-init.exe](https://win.rustup.rs/) and follow its instructions.
16-
* On other platforms, please see [the Rust website](https://www.rust-lang.org/tools/install) for instructions.
17-
3. Open a command line:
18-
* On Windows, right-click the start button, then click “Terminal”, “Windows PowerShell”, or “Command Prompt”.
19-
* On other platforms, look for an app named “Terminal” or similar.
20-
4. In the command line, run the following command. Depending on your computer, this may take a while.
21-
22-
```
23-
cargo install --git=https://github.com/fenhl/melt --branch=main
24-
```
13+
Please see the install instructions for your operating system:
14+
15+
* [Windows](https://github.com/fenhl/melt/blob/main/assets/doc/install-windows.md)
16+
17+
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).
2518

2619
# Usage
2720

assets/doc/build.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Building from source
2+
3+
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:
4+
5+
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.)
6+
2. Install Rust:
7+
* On Windows, download and run [rustup-init.exe](https://win.rustup.rs/) and follow its instructions.
8+
* On other platforms, please see [the Rust website](https://www.rust-lang.org/tools/install) for instructions.
9+
3. Open a command line:
10+
* On Windows, right-click the start button, then click “Terminal”, “Windows PowerShell”, or “Command Prompt”.
11+
* On other platforms, look for an app named “Terminal” or similar.
12+
4. In the command line, run the following command. Depending on your computer, this may take a while.
13+
14+
```
15+
cargo install --git=https://github.com/fenhl/melt --branch=main
16+
```

assets/doc/install-windows.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
1. Press <kbd>Windows</kbd><kbd>I</kbd> open the Settings app
2+
2. Navigate to System → About
3+
3. In the “Device specifications” section, check what the second half of the “System type” says, and download the appropriate file:
4+
5+
* [x86-based processor](https://github.com/fenhl/melt/releases/latest/download/melt-x86.exe)
6+
* [x64-based processor](https://github.com/fenhl/melt/releases/latest/download/melt-x64.exe)
7+
8+
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).
9+
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`
10+
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
11+
6. Press <kbd>Windows</kbd><kbd>R</kbd>, enter `SystemPropertiesAdvanced`, and click OK
12+
7. In the System Properties window that opens, click “Environment Variables…”
13+
8. In the “User variables for (your username)” section, find the `Path` variable, and click Edit
14+
9. Click “New” and paste the path copied in step 5
15+
10. Save your changes by clicking OK in all 3 System Properties windows
16+
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 commit comments

Comments
 (0)