Skip to content

Commit

Permalink
style!: rewrite yet again for ease of use
Browse files Browse the repository at this point in the history
  • Loading branch information
NiChrosia committed Jan 3, 2023
1 parent e818923 commit df1d513
Show file tree
Hide file tree
Showing 6 changed files with 429 additions and 241 deletions.
Binary file added minldr
Binary file not shown.
2 changes: 1 addition & 1 deletion mldr.nimble → minldr.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author = "NiChrosia"
description = "A simple version manager for Mindustry, using GitHub releases."
license = "MIT"
srcDir = "src"
bin = @["mldr"]
bin = @["minldr"]

# Dependencies

Expand Down
Binary file removed mldr
Binary file not shown.
53 changes: 18 additions & 35 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,30 @@
# Minloader
## Installation

### Quickstart
- Download your OS executable from the [latest release](https://github.com/NiChrosia/minloader/releases/latest).
- Add it to your PATH variable.

#### Installation
## Usage

1. Install [Nim](https://nim-lang.org/), either using [a zip of v1.6.10](https://nim-lang.org/download/nim-1.6.10_x64.zip), or [a version manager, choosenim](https://github.com/dom96/choosenim/releases/latest), if you haven't already.
2. Clone this repository with Git, using `git clone https://github.com/NiChrosia/minloader`, and navigate to it.
3. Run `nimble install` to install the executable.
### Downloading Mindustry

#### Usage
You can either directly download version jar files, or use the built-in state.

1. Run `minloader search` to get a list of Mindustry jars.
- Some versions towards the bottom don't have any assets, which is because the corresponding old releases don't either.
2. Download a jar using a command like `minloader download --tag:"v140.4" --asset:"Mindustry.jar" --destination:"./Mindustry.jar"`, except with your wanted tag and asset.
- `Mindustry.jar` and `desktop-release.jar` are generally the desktop versions.
- `server-release.jar` is always the server version.
3. Run the downloaded jar using something like `minloader run --jar:"Mindustry.jar" --directory:"./mindustry/"`
- Mindustry should now be running, and saving its data to the specified folder.
To directly download, use `minldr download [version] [desktop | server] [file]`, or the shorthand `minldr d [version] [d | s] [file]`. For example,
`minldr d v140.4 d ~/Downloads/v140.4-desktop.jar`

### Running Mindustry

```
minloader run --jar:"~/Downloads/v140.4-desktop.jar" --directory:"~/.local/share/Mindustry"
```

`--jar` takes any Mindustry jar, and runs it in `--directory`. This works with both the desktop version and a server.
To use the state, use `minldr install [version] [desktop | server]`, or the similar shorthand, `minldr i [version] [d | s]`. For example,
`minldr i v140.4 d`

### Finding versions

```
minloader search [--token:""]
```

Prints a list of all Mindustry releases with their downloadable assets. Used for `minloader download`.
### Running Mindustry

`--token` is an optional GitHub token argument that is used to bypass the low default ratelimit.
Full command: `minldr run [version] [desktop | server] [directory]`
Shorthand: `minldr r [version] [d | s] [directory]`
Example: `minldr r v140.4 d ~/.local/share/Mindustry/`, or for the default Windows folder, `~/AppData/Roaming/Mindustry/`.

### Downloading versions
For additional clarification, `[directory]` is the run directory, for either the desktop or server version.

```
minloader download --tag:"v140.4" --asset:"Mindustry.jar" --destination:"~/Downloads/v140.4-desktop.jar" [--token:""]
```
### Other commands

Downloads `--asset` of the release tagged `--tag` to `--destination`.
To see either available or installed versions, use `minldr list [available | installed]`, or `minldr l [a | i]`.

As before, `--token` is an optional GitHub token argument that is used to bypass the low default ratelimit.
To see the help pages, either simply call `minldr` for all of them, or `minldr [command]` for a specific command.
Loading

0 comments on commit df1d513

Please sign in to comment.