This is the code path for when something ignores the ddeexec registry
key and instead invokes EDMarketConnector.exe with the edmc://...
argument directly.
Our response is to try ShellExecute() to invoke the DDE path instead.
If the DDE path isn't set up (registry key
`Computer\HKEY_CLASSES_ROOT\edmc\shell\open\ddeexec` not present and
correct), then this will cause a loop of repeatedly invoking
EDMarketConnector.exe.
That key is inserted by the installer. The only reasons for it to not
be there would be something blocking the installer from creating it or
something removing it after install.
The .values() is on this, so it also needs to be a dict.
I also made the logging of "FC or Damaged Station?" consistent
throughout this file.
Yes, we'll keep these as logger.debug() for now.
* If it's None then set journal_dir_path to None as well. Setting '' or
nothing results in '.' (CWD), which could cause other issues.
* As we do this in three places, it's in a helper function.
* New JournalLockResult.JOURNALDIR_IS_NONE to signal this.
* Fix checking of return from obtain_lock() to specifically reference
JournalLockResult.ALREADY_LOCKED.
In the scenario of the default Journals location not even existing the
user needs might update it to a network mount. When they do so we
attempt, and fail, to unlock the old location, despite it not being
locked.
So now we have this boolean so we know if we should even attempt
unlocking.
This way we can tell the difference between:
1. This process obtained the lock.
2. Another process has the lock.
3. We couldn't get the lock due to not being able to open the lock file
read-write.
Case 3 is currently also returned if the configured journal directory
doesn't exist. This will be the case on any MacOS system that never had
the game running. Likely given the OS hasn't been supported for the
game in years now.
I'd `git show develop:journal_lock.py > journal_lock.py` a copy in
before, but forgot to commit it, and then removed it when checking out
another branch complained. D'oh!
I was testing the new Steam or Epic CAPI auth. My EGS account hasn't
yet been used, so has no commander attached. EDMC thinks the auth has
succeeded in this case, but hitting 'Update' causes it to error because
the returned data is empty.
So, add some checks for lack of 'commander' key and a specific message
"CAPI: No commander data returned" for status line.
Without this there's a KeyError exception thrown, causing the status
line to just get 'commander' in it, which isn't helpful.