NorthstarLauncher icon indicating copy to clipboard operation
NorthstarLauncher copied to clipboard

Rework path and input/output handling

Open pg9182 opened this issue 3 years ago • 0 comments

Benefits:

  • Optionally run NS from any directory (this obviously won't be possible if using the ws2 proxy launcher, but it's still useful for other situations).
  • Allow everything to be read-only and shared except for the per-server data in a configurable location (for dedicated servers).
  • Make console input work on Wine (hopefully).
  • Make console output not be full of junk on Wine (hopefully).
  • Centralize path construction for NS data and resources.
  • Provide more flexibility for future improvements.

I'm currently thinking of implementing this by passing a config struct to the ns init function containing references to functions which resolve paths, read input, and write output. The bulk of the logic will still be in the DLL, and it will be possible to make the DLL standalone and inject it with other methods simply by having a default implementation there.

https://discord.com/channels/920776187884732556/943369531538173993/943574689035456512

... I'll also work on reworking the launcher exe to deal with paths and input/output and pass that config via a struct to the dll init function (although bob hasn't decided if he wants this in the end or not), making the dll use absolute paths for all ns stuff, and making it detect the titanfall path from either the current dir, the registry (for the installations using EAInstaller's touchup; i.e., steam and origin), or a command line flag / env var, which will allow use to have ns/tf2/ns mods/data in separate folders (greatly simplifying the install process, development, running multiple dedicated servers, and my container image entrypoint) (all of this is still tentative; it depends on how busy I am and whether tf2 itself works fine this way)

Note that I still haven't fully decided if I'm going to take this approach; I'm still in the phase of experimenting with possible solutions, and I'm also somewhat busy right now.

pg9182 avatar Feb 16 '22 18:02 pg9182