Skip to content

Commit

Permalink
chore: bump version to 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MeguminSama committed Feb 1, 2025
1 parent 023b2a8 commit 57deff5
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 61 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = ["crates/*"]
name = "moonlight-launcher"
description = "An easy-to-use launcher for moonlight"
authors = ["Rie Takahashi <[email protected]>"]
version = "0.1.2"
version = "0.1.3"
license = "GPL-3.0"
homepage = "https://github.com/meguminsama/moonlight-launcher"
repository = "https://github.com/meguminsama/moonlight-launcher"
Expand All @@ -15,7 +15,8 @@ edition = "2021"
[dependencies]
clap = "4.5.27"
dirs = "6.0.0"
electron-hook = "0.2.0-beta.14"
# electron-hook = "0.2.0-beta.14"
electron-hook = { path = "../electron-hook" }
flate2 = "1.0.35"
tar = "0.4.43"
tinyjson = "2.5.1"
Expand Down
108 changes: 55 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
# moonlight Launcher

Quickly and conveniently launch moonlight.

# Windows

Download and run [the latest installer](https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/moonlight-installer.exe) and pick the branches of Discord you want.

# Linux

## Stable

```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)"
```

## PTB
```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)" -- ptb
```

## Canary
```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)" -- canary
```

## Uninstalling
```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)" -- --uninstall <branch>
```

# MacOS

Working on it...


# Commandline Arguments

## Using a local (git) instance of a mod?

You can pass the `--local` flag with a path to the entrypoint. For example:

```
moonlight-stable --local $HOME/workspace/moonlight/injector.js
```

## Passing arguments through to discord?

Any arguments passed after `--` are passed through to Discord. For example:

```
moonlight-stable -- --start-minimized --enable-blink-features=MiddleClickAutoscroll
```
# moonlight Launcher

Quickly and conveniently launch moonlight.

# Windows

Download and run [the latest installer](https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/moonlight-installer.exe) and pick the branches of Discord you want.

# Linux

## Stable

```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)"
```

## PTB

```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)" -- ptb
```

## Canary

```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)" -- canary
```

## Uninstalling

```
sh -c "$(curl -fsSL https://github.com/MeguminSama/moonlight-launcher/releases/latest/download/install.sh)" -- --uninstall <branch>
```

# MacOS

Working on it...

# Commandline Arguments

## Using a local (git) instance of a mod?

You can pass the `--local` flag with a path to the entrypoint. For example:

```
moonlight-stable --local $HOME/workspace/moonlight/injector.js
```

## Passing arguments through to discord?

Any arguments passed after `--` are passed through to Discord. For example:

```
moonlight-stable -- --start-minimized --enable-blink-features=MiddleClickAutoscroll
```
23 changes: 21 additions & 2 deletions src/require.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
require("$ENTRYPOINT").inject(
require("path").resolve(__dirname, "../_app.asar")
// This redirects the relaunch function to launch the modloader executable instead of the original executable
// There is a bug on Linux where Discord does not relaunch. This is an electron bug, and I haven't figured out how to fix it yet.
// See: https://github.com/electron/electron/issues/41463
if (process.env.MODLOADER_EXECUTABLE) {
const { app } = require("electron");
const _relaunch = app.relaunch;

app.relaunch = function (options = {}) {
_relaunch.call(app, {
...options,
args: process.argv.slice(1),
execPath: process.env.MODLOADER_EXECUTABLE,
});
};
}

require(process.env.MODLOADER_MOD_ENTRYPOINT).inject(
require("path").resolve(
__dirname,
process.env.MODLOADER_ORIGINAL_ASAR_RELATIVE,
),
);

0 comments on commit 57deff5

Please sign in to comment.