NorthstarLauncher icon indicating copy to clipboard operation
NorthstarLauncher copied to clipboard

Remove `ns_startup_args*.txt` functionality

Open F1F7Y opened this issue 1 year ago • 9 comments

Why

  1. We need to hook GetCommandLineA to support these .txt files, but before doing so we already read the commandline meaning some args dont work in the .txt.
  2. Current way of strstr ing GetCommandLineA can lead to false positives with arguments that start with the same prefix.

What

tier0.dll exports CommandLine() with which we can check the command line. We already have this mapped out and use in some cases so this is just improving code consistency.

How

  1. Do some sort of warning before removing functionality Print warning, discord announcement ?
  2. Add support in mod-managers Add support to directly passing arguments to the process when creating it
  3. Remove functionality in a minor verison increase Patch versions mainly serve for small fixes and small features, this is a pretty big change in behavior
  4. Possibly have some sort of warning that checks if the file exists after this is implemented

F1F7Y avatar Jul 18 '23 15:07 F1F7Y

@GeckoEidechse @BigSpice @0neGal

F1F7Y avatar Jul 18 '23 15:07 F1F7Y

I think enough time has passed and we should finally do this.

Jan200101 avatar Jan 08 '24 11:01 Jan200101

The only problem I have with this, is it's now more difficult to have a mod manager be able to change the launch options. As, unless it's launching the .exe's directly, it wont really be able to change the launch options very easily. Say if you're launching through Steam.

Unless I'm mistaken, and there's some easy way to do this?

0neGal avatar Jan 09 '24 15:01 0neGal

Unless I'm mistaken, and there's some easy way to do this?

See how FlightCore does it

Jan200101 avatar Jan 09 '24 15:01 Jan200101

See how FlightCore does it

According to this, FlightCore simply doesn't support changing launch arguments. Unless thats outdated?

0neGal avatar Jan 09 '24 16:01 0neGal

According to this, FlightCore simply doesn't support changing launch arguments. Unless thats outdated?

https://github.com/R2NorthstarTools/FlightCore/blob/5714309211d389c453c19bb77755855de33655fd/src-tauri/src/northstar/mod.rs#L260

Jan200101 avatar Jan 09 '24 16:01 Jan200101

Ah, I stand corrected, I wasn't aware you could add launch arguments to steam://run URIs

0neGal avatar Jan 09 '24 16:01 0neGal

bump

GeckoEidechse avatar Aug 12 '24 13:08 GeckoEidechse

Actually maybe we should do this together with a few other breaking changes that are coming up like with MAD (#757) and a potential mod folder restructure via #746

GeckoEidechse avatar Aug 12 '24 13:08 GeckoEidechse