FlightCore icon indicating copy to clipboard operation
FlightCore copied to clipboard

Figure out optimal control flow for launching Northstar

Open GeckoEidechse opened this issue 2 years ago • 5 comments

We got a few checks we need to perform before we can launch Northstar.

What is the best order to do them in to reduce number of branches in control flow? First OS then Steam/non-Steam? First Steam/non-Steam, then OS? Other things we need to check?

GeckoEidechse avatar Feb 11 '23 22:02 GeckoEidechse

Given that we can use a similar/same method of launching Northstar for both Windows and Linux when using Steam, I'd say we make that our first branch, from there we go:

graph TD
    start[Launch Northstar] --> steam{Steam version?}
    steam   -->|Yes| linux{Is Linux?}
    linux   -->|Yes| proton{NorthstarProton installed?}
    linux   -->|No | txt[Add run_northstar.txt]

    proton  -->|Yes| txt
    proton  -->|No | F[return with warning]

    txt     --> uri[open steam:// URI]
    uri     --> H[Cleanup]

    steam   -->|No | windows{Is Windows?}
    windows -->|No | F[return with warning]
    windows -->|Yes| ea{Origin/EA running}
    ea      -->|No | F[return with warning]
    ea      -->|Yes| exe[run NorthstarLauncher.exe]

GeckoEidechse avatar Feb 11 '23 23:02 GeckoEidechse

Since libthermite provides the capabilities to deal with NSProton, I think this would be better.

graph TD
    start[Launch Northstar] --> steam{Steam version?}
    steam   -->|Yes| linux{Is Linux?}
    linux   -->|Yes| proton{NorthstarProton installed?}
    linux   -->|No | txt[Add run_northstar.txt]

    proton  -->|Yes| check_proton[NorthstarProton configured?]
    proton  -->|No | install_proton[Install NorthstarProton]
    install_proton --> check_proton
    check_proton --> |Yes | txt
    check_proton --> |No  | F

    txt     --> uri[open steam:// URI]
    uri     --> H[Cleanup]

    steam   -->|No | windows{Is Windows?}
    windows -->|No | F[return with warning]
    windows -->|Yes| ea{Origin/EA running}
    ea      -->|No | F[return with warning]
    ea      -->|Yes| exe[run NorthstarLauncher.exe]

Jan200101 avatar Feb 11 '23 23:02 Jan200101

Hmm, I think we should already install NorthstarProton when installing Northstar and on clicking "Launch Northstar" only check if it's properly configured ^^

GeckoEidechse avatar Feb 11 '23 23:02 GeckoEidechse

Eh, maybe.

Without #154 it would be a pain for existing users.

Jan200101 avatar Feb 11 '23 23:02 Jan200101

I've been thinking about this again and I think this flow might be better

flowchart TD
    launch[Launch Northstar] --> windows{Is Windows?}

    windows -->|No | steam
    windows -->|Yes| ea{Origin/EA running?}
    ea      -->|Yes| exe[run NorthstarLauncher.exe]
    ea      -->|No | steam{Steam version?}

    linux -->|Yes| check_proton{NorthstarProton setup?}
    linux -->|No | run

    steam -->|No | F[return with warning]
    steam -->|Yes| linux{Is Linux?}
    check_proton --> |Yes | run[run through Steam]
    check_proton --> |No  | F

There is also the thought about relaxing the NorthstarProton checks and making them them a pop-up the user has to acknowledge

Jan200101 avatar Jun 23 '23 11:06 Jan200101