diff --git a/.cargo/config.toml b/.cargo/config.toml index ac2b23f..b97a95e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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"] diff --git a/Cargo.lock b/Cargo.lock index c64628d..4a85222 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -364,7 +364,7 @@ dependencies = [ [[package]] name = "melt" -version = "2.1.2" +version = "2.1.3" dependencies = [ "chrono", "chrono-tz", diff --git a/Cargo.toml b/Cargo.toml index 39f668d..3e5f0b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "melt" -version = "2.1.2" +version = "2.1.3" authors = ["Fenhl "] edition = "2021" repository = "https://github.com/fenhl/melt" diff --git a/README.md b/README.md index 539aaf9..91c5f20 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/assets/doc/build.md b/assets/doc/build.md new file mode 100644 index 0000000..7e72a13 --- /dev/null +++ b/assets/doc/build.md @@ -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 + ``` diff --git a/assets/doc/install-windows.md b/assets/doc/install-windows.md new file mode 100644 index 0000000..d5bec91 --- /dev/null +++ b/assets/doc/install-windows.md @@ -0,0 +1,16 @@ +1. Press WindowsI 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 WindowsR, 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.