* Add --input-cryptkey argument
* Improve readability of argument parsing
* Make the compiler shut up
* Remove German translation again
* Revert switch expression
* Fix unused cryptkey
It seems to be late
Even though the case is justified, we shouldn't render whole setups unsupported because of that, as running as root, while discouraged, does not directly affect the program stability.
This is especially true on Windows boxes where there is a lot of setups running with administrators by default and users are not even aware of that, I don't have a good fix for them (apart from reinstallation), and because I do not, I should not expect from them to supply cmd-line arg they don't even understand why.
"Very early failures" include exclusively lack of being able to navigate to given --path, as everything else is postponed until we get core loggers up and running. We should print the information to the user and abort the program at the minimum in this case.
Until now ASF silently ignored those errors and proceeded like usual, this is unwanted, if --path is wrong then it's on user to fix it.
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?
We're using custom console mechanism in order to implement interactive console, on top of that CTRL+C would not work when using IPC: true due to the fact that it doesn't trigger shutdown sequence, fix both of those problems by listening to SIGINT and exiting with code 130 upon receiving one
Tested on Linux
* 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>