mirror of
https://github.com/rfvgyhn/min-ed-launcher.git
synced 2026-02-05 01:05:34 +00:00
remove support for reading launcher args from STDIN
removed because trying to read from STDIN in cases where it did and didn't have available data was more trouble than it was worth. Just use command substitution instead of piping to get launch params from other tools fixes #74
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@ -1,5 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## [unreleased]
|
||||
|
||||
### Breaking changes
|
||||
- Removed support for reading from STDIN. This will affect linux users launching via legendary.
|
||||
- Instead of piping legendary's arguments into min-ed-launcher, use command substitution instead
|
||||
|
||||
`WINEPREFIX=/your/wine/prefix /path/to/MinEdLauncher $(legendary launch --dry-run 9c203b6ed35846e8a4a9ff1e314f6593 2>&1 | grep "Launch parameters" | cut -d':' -f 3-) /autorun /edh4 /autoquit`
|
||||
|
||||
### Bug Fixes
|
||||
- Fixed an issue where the launcher would hang because no data was available in STDIN.
|
||||
|
||||
## [0.7.5] - 2022-11-21
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@ -121,9 +121,9 @@ Either configure the Epic client and use the provided Bootstrap exe or use [lege
|
||||
This method utilizes [legendary].
|
||||
|
||||
1. Ensure you've authenticated, installed Elite Dangerous via [legendary] and setup your wine prefix
|
||||
2. Use the `--dry-run` flag and pipe the arguments to `MinEdLauncher`
|
||||
2. Use the `--dry-run` flag and pass the arguments to `MinEdLauncher` via command substitution
|
||||
```sh
|
||||
legendary launch --dry-run 9c203b6ed35846e8a4a9ff1e314f6593 2> >(grep "Launch parameters") | cut -d':' -f 3- | WINEPREFIX=/your/wine/prefix /path/to/MinEdLauncher /autorun /edh /autoquit
|
||||
WINEPREFIX=/your/wine/prefix /path/to/MinEdLauncher $(legendary launch --dry-run 9c203b6ed35846e8a4a9ff1e314f6593 2>&1 | grep "Launch parameters" | cut -d':' -f 3-) /autorun /edh /autoquit
|
||||
```
|
||||
|
||||
#### Frontier
|
||||
|
||||
@ -5,7 +5,6 @@ open System.Collections
|
||||
open System.IO
|
||||
open System.Net.Http
|
||||
open System.Reflection
|
||||
open System.Text.RegularExpressions
|
||||
open System.Threading
|
||||
open FsConfig
|
||||
open FsToolkit.ErrorHandling
|
||||
@ -48,21 +47,6 @@ let logRuntimeInfo version args =
|
||||
Env: %s{envVars}
|
||||
"""
|
||||
|
||||
let applyStdin argv =
|
||||
if Console.IsInputRedirected then
|
||||
let input = Console.ReadLine()
|
||||
if input <> null then
|
||||
Log.debug $"STDIN: {input}"
|
||||
let stdin =
|
||||
Regex.Matches(input, @"[^\s""']+|""([^""]*)""|'([^']*)'", RegexOptions.Multiline)
|
||||
|> Seq.filter (fun m -> not <| String.IsNullOrEmpty(m.Value))
|
||||
|> Seq.map (fun m -> m.Value.Trim('\'', '"'))
|
||||
|> Seq.toArray
|
||||
Array.append stdin argv
|
||||
else
|
||||
argv
|
||||
else argv
|
||||
|
||||
[<EntryPoint>]
|
||||
let main argv =
|
||||
use cts = new CancellationTokenSource()
|
||||
@ -70,12 +54,11 @@ let main argv =
|
||||
try
|
||||
let assembly = Assembly.GetExecutingAssembly()
|
||||
let version = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion
|
||||
let args = applyStdin argv
|
||||
|
||||
logRuntimeInfo version args
|
||||
logRuntimeInfo version argv
|
||||
|
||||
let run =
|
||||
getSettings assembly args
|
||||
getSettings assembly argv
|
||||
|> TaskResult.bind (fun settings ->
|
||||
taskResult {
|
||||
Log.debug $"Settings: %A{settings}"
|
||||
|
||||
Reference in New Issue
Block a user