-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
023b2a8
commit 57deff5
Showing
4 changed files
with
81 additions
and
61 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
), | ||
); |