It's still required to be a static readonly field, as we need it calculated in-advance due to renames/deletion of original binary.
Also I'll probably need madness for this, sigh.
Skipping a 20 KB stub in OS-specific non-windows builds and omitting a few very fast if checks isn't worth the code quality degradation that involves all of the ifdef options.
ifdefs should be reserved for stuff that either doesn't compile whatsoever in some specific configurations (NETFRAMEWORK), or is required to make logical decisions based on the compiler input (e.g. DEBUG for detecting debugging builds or ASF_VARIANT_* for hardcoding the platform identifier to use for auto-updates)
In all other situations, we should use OperatingSystem if condition, even if it's equal to hitting them on the platforms that are unlikely to hit them.
And I say unlikely, because nothing stops me from downloading a win-x64 build and running it like a generic one on windows, what you gonna do?
* Support lol-US locale for IPC requests
* Support sr-CS as well
* Apply feedback
* Apply feedback and Rider cleanup
* Less allocations make everyone happy
* Apply feedback
* Explain why we're doing this stupidity
* Uppercase Windows/Linux compat fix
* Go back to earlier version
* Refuse to run as root without explicit ignore
* Apply feedback
* Detect docker a bit better
* Guard more OS parts behind ifdefs
* Fix warnings
* Further fixes
* Add warnings about password security
* Warn about weak steam passwords even if they are encrypted
* Apply feedback
* Apply feedback
* Simplify code
* Move return criteria up a bit for increased performance
* Choose more fitting strings for localization
* Extract const value
* Fix incorrect null reference warning
* Switch prefix operator for postfix one
Co-authored-by: Łukasz Domeradzki <JustArchi@JustArchi.net>
* Add tests
* Disable CA1724
The type name Utilities conflicts in whole or in part with the namespace name 'Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities'.
* Tell users why their password is considered weak
* Apply feedback
* Merge resource comments
* Misc.
* Use library for password testing and Run testing in background
* Clean up
* OncSeparate forbidden phrases forfor IPC passwords (once again)
* Additionally check encryption key
* Add comment about {0}
Co-authored-by: Łukasz Domeradzki <JustArchi@JustArchi.net>
OnHeartBeat() is the least important function that is called every minute if required, not being able to enter the semaphore means some other action is already in progress, and while it makes sense for stuff like OnPersonaState() to wait for it, because it requires that, heartbeat can totally miss being executed, especially if the previous call didn't manage to finish yet.
It's not destructive as it is right now because tasks would be cancelled eventually when the server starts responding (due to if being removed right now), but it's entirely unnecessary burden.