-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from slonkazoid/main
improved linux & user flatpak support
- Loading branch information
1 parent
1d58436
commit e65ba03
Showing
8 changed files
with
446 additions
and
59 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 120, | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"singleQuote": false | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const os = require("node:os"); | ||
const fs = require("node:fs"); | ||
const path = require("node:path"); | ||
const process = require("node:process"); | ||
|
||
function getInjector(override) { | ||
if (override !== null && fs.existsSync(override)) return override; | ||
|
||
// resolve default path | ||
switch (os.platform()) { | ||
case "windows": | ||
return path.join(process.env.APPDATA, "moonlight-mod", DOWNLOAD_DIR, "injector.js"); | ||
case "darwin": | ||
return path.join(os.homedir(), "Library", "Application Support", "moonlight-mod", DOWNLOAD_DIR, "injector.js"); | ||
case "linux": | ||
default: | ||
return path.join( | ||
process.env.XDG_CONFIG_HOME ?? path.join(os.homedir(), ".config"), | ||
"moonlight-mod", | ||
DOWNLOAD_DIR, | ||
"injector.js" | ||
); | ||
} | ||
} | ||
|
||
const injector = getInjector(MOONLIGHT_INJECTOR); | ||
require(injector).inject(path.resolve(__dirname, `../${PATCHED_ASAR}`)); |
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
Oops, something went wrong.