Closed GeckoEidechse closed 1 year ago
Huh, weird, I actually thought this was already being checked for... I'll have a look at this...
Maybe Viper and FlightCore check for it differently? All FlightCore does is check if NorthstarLauncher.exe
exists
/// Checks if Northstar process is running
pub fn check_northstar_running() -> bool {
let s = sysinfo::System::new_all();
for _process in s.processes_by_name("NorthstarLauncher.exe") {
// check here if this is your process
// dbg!(process);
return true;
}
false
}
https://github.com/R2NorthstarTools/FlightCore/blob/v1.8.2/src-tauri/src/lib.rs#L334-L343
We do that as well (in src/utils.js
)
Albeit just for whether the game or Northstar is running, and not NS specifically, however it needs refactoring, like many other things in utils.js
:p
I've now however come to the discovery that this function is not used on manual updates, and only on the automated ones... As the handleNorthstarUpdates()
function is a wrapper around updateNorthstar()
, the wrapper making these checks, and the latter simply does it irregardless of anything, which by itself is fine, we just shouldn't be calling it outside of the wrapper, but here we should've put handleNorthstarUpdates()
instead...
I'll be refactoring a lot of the updating process away from the unreadable and unmaintainable mess that it is right now, and then I'll implement a fix for this, and subsequently a release.
This is now fixed in the latest release (v1.7.1), an alert is now shown if you attempt to update the game whilst it or Northstar is running, which then prevents you from updating.
Describe the bug This bug was discovered in a ticket on the Northstar Discord server.
The TL;DR is that a user had a broken install due to mod conflicts, was adviced to delete
R2Northstar
then reinstall via their preferred method.They used Viper but it failed to install. Testing with FlightCore as well it revealed that Northstar appeared to still be running.
Screenshots sent by the user in question
Testing with FlightCore
Ultimately they managed to resolve the issue by restarting their computer which obviously killed any lingering Northstar process that would still have a lock on the directory.
To Reproduce Not sure if can be easily reproduced but if, it would probably be
Steps to reproduce the behavior:
Expected behavior Viper should perform a check if Northstar is running before attempting an install/update.
Screenshots See above
Version: Presumably newest as of time of writing.