Commit Graph

430 Commits

Author SHA1 Message Date
Łukasz Domeradzki
53adc67be1 Misc 2025-06-22 17:46:18 +02:00
Łukasz Domeradzki
79c3ce14e8 Misc 2025-06-12 23:33:47 +02:00
Łukasz Domeradzki
61f876480a General code cleanups 2025-03-31 00:06:05 +02:00
Łukasz Domeradzki
8533659b74 Misc cleanup 2025-02-12 16:12:01 +01:00
Łukasz Domeradzki
2f658a3d4e Closes #3376 2025-02-12 16:11:10 +01:00
Łukasz Domeradzki
ac01cca55e Go back to swagger in regards to #3376, add cmdline switch to force openapi 2025-01-20 11:49:35 +01:00
Łukasz Domeradzki
9e207025c5 Happy new year 2025-01-05 02:40:56 +01:00
Łukasz Domeradzki
1b626caa53 .NET ⑨ (strongest version) (#3244)
* Initial .NET 9 bump

* Resolve selected .NET 9 analyzer warnings

* Fill TODO

* Fix build errors

* Misc

* Use new methods

* .NET 9 changes

* Dockerfiles no longer preview

* Misc

* Trimming works again

* Trimming works in docker too

* Test fix

* Update Directory.Build.props
2024-11-13 00:28:52 +01:00
Łukasz Domeradzki
92456aa838 Avoid terminating the process if not mandatory 2024-10-04 14:32:42 +02:00
Łukasz Domeradzki
d074f47659 Ignore unobserved HttpIOException 2024-10-04 14:27:02 +02:00
Łukasz Domeradzki
7b65c1aeb7 Add support for telling plugins if runtime is trimmed 2024-09-16 17:58:35 +02:00
Łukasz Domeradzki
773698a0d4 Closes #3264
THANKS @ezhevita
2024-08-05 02:37:50 +02:00
Łukasz Domeradzki
10986289e6 Make --process-required default, add ShutdownIfPossible instead 2024-04-17 12:02:26 +02:00
Łukasz Domeradzki
ae9dfca3b3 Closes #3156 (#3182)
* Closes #3156

* Misc

* Misc

* Rewrite update mechanism ONCE AGAIN, this time to eradicate FSW

* Make creating debug directory non-fatal again, like it used to be

* Deduplicate code

* Remove dead code

* Print update cleanup just once

* Address remaining feedback, go back to _old and _new

* One more nice improvement
2024-04-04 21:21:58 +02:00
Łukasz Domeradzki
1841cde776 Misc code enhancements 2024-04-04 02:15:16 +02:00
Archi
48a14136a9 Update all file headers, again 2024-03-17 02:35:40 +01:00
Archi
f98a159799 File header update 2024-03-17 00:06:13 +01:00
Łukasz Domeradzki
6b0bf0f9c1 Closes #3061 (#3145)
* Good start

* Misc

* Make ApiAuthenticationMiddleware use new json

* Remove first newtonsoft dependency

* Pull latest ASFB json enhancements

* Start reimplementing newtonsoft!

* One thing at a time

* Keep doing all kind of breaking changes which need to be tested later

* Add back ShouldSerialize() support

* Misc

* Eradicate remaining parts of newtonsoft

* WIP

* Workaround STJ stupidity in regards to derived types

STJ can't serialize derived type properties by default, so we'll use another approach in our serializable file function

* Make CI happy

* Bunch of further fixes

* Fix AddFreeLicense() after rewrite

* Add full support for JsonDisallowNullAttribute

* Optimize our json utilities even further

* Misc

* Add support for fields in disallow null

* Misc optimization

* Fix deserialization of GlobalCache in STD

* Fix non-public [JsonExtensionData]

* Fix IM missing method exception, correct db storage helpers

* Fix saving into generic databases

Thanks STJ

* Make Save() function abstract to force inheritors to implement it properly

* Correct ShouldSerializeAdditionalProperties to be a method

* Misc cleanup

* Code review

* Allow JSON comments in configs, among other

* Allow trailing commas in configs

Users very often add them accidentally, no reason to throw on them

* Fix confirmation ID

Probably needs further fixes, will need to check later

* Correct confirmations deserialization

* Use JsonNumberHandling

* Misc

* Misc

* [JsonDisallowNull] corrections

* Forbid [JsonDisallowNull] on non-nullable structs

* Not really but okay

* Add and use ToJson() helpers

* Misc

* Misc
2024-02-21 03:09:36 +01:00
Archi
f0ef4c6ba6 Implement basic crash protection
- On start, we create/load crash file, if previous startup was less than 5 minutes ago, we also increase the counter
- If counter reaches 5, we abort the process, that is, freeze the process by not loading anything other than auto-updates
- In order for user to recover from above, he needs to manually remove ASF.crash file
- If process exits normally without reaching counter of 5 yet, we remove crash file (reset the counter), normal exit includes SIGTERM, SIGINT, clicking [X], !exit, !restart, and anything else that allows ASF to gracefully quit
- If process exits abnormally, that includes SIGKILL, unhandled exceptions, as well as power outages and anything that prevents ASF from graceful quit, we keep crash file around
- Update procedure, as an exception, allows crash file removal even with counter of 5. This should allow crash file recovery for people that crashed before, without a need of manual removal.
2024-02-03 21:18:47 +01:00
Archi
05c5a7fc30 Closes #3128 2024-01-24 12:43:36 +01:00
Sebastian Göls
dbf7148fbe Happy new year! (#3121)
Co-authored-by: Sebastian Göls <sebastian.goels@salvagninigroup.com>
2024-01-08 11:33:28 +01:00
Archi
12c4b7e924 Apply frozen collections optimizations 2024-01-03 13:46:54 +01:00
Łukasz Domeradzki
36ae066c65 Closes #3073 (#3077)
* Initial implementation of announce with diff

* Add missing logic pieces

* Change in logic

* Fix checksums

* Add deduplication logic

* Update SetPart.cs

* Use standalone endpoint for diff

* Use different hashcode impl

* Update AssetForListing.cs

* Misc

* Push all the changes for this to finally work

* Use original index rather than self-calculated

ASFB makes some calculations based on index, it's better for us to have holes rather than hiding skipped items.

* Handle edge case of no assets after deduplication

* Remove dead code

* Address trim warnings

* Misc optimization
2023-11-29 00:08:16 +01:00
Archi
2291321173 Handle ASF_PATH first
ASF_CRYPTKEY_FILE might reference relative path, we should evaluate ASF_PATH first due to that.
2023-11-24 10:34:20 +01:00
Archi
f2ff2f4929 Closes #3060 2023-11-14 20:01:29 +01:00
Łukasz Domeradzki
b34f18497d .NET 8 (#3005)
* Initial .NET 8

* Make it compile in release mode ignoring warnings for now

* First round of improvements

* Second round of improvements

* Third round of improvements

* Use new throws

* Fix .NET Framework, YAY, thanks madness!

Madness devs are awesome

* Misc

* Misc

* AF_NETLINK might be required for some http calls

No clue why

* Fix service files

Doesn't do what it should

* Update CardsFarmer.cs

* New improvements

* Address feedback

* Misc

* Misc

* Misc refactor

* Misc
2023-11-14 19:12:33 +01:00
Archi
c84366f9ba Misc syntax improvements 2023-08-10 21:36:17 +02:00
Archi
12f1b5e3f4 Misc 2023-06-02 21:50:36 +02:00
renovate[bot]
d98054559d Update dependency NLog.Web.AspNetCore to v5.3.0 (#2907)
* Update dependency NLog.Web.AspNetCore to v5.3.0

* Address breaking changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Archi <JustArchi@JustArchi.net>
2023-06-02 16:13:54 +02:00
Łukasz Domeradzki
c89366b0a6 Closes #2827 (#2829) 2023-02-26 10:59:48 +01:00
Archi
8008a04354 Code cleanups and improvements
- Make use of new UnixFileMode, always one native method we need to maintain less
- Add madness support for it, because new feature of course
- Add optional netstandard target and required compatibility for it, so I can test netf-oriented changes easier
2023-02-09 02:25:11 +01:00
Łukasz Domeradzki
d3490b4e92 Add --minimized command-line argument (#2817)
* Add experimental support for --minimized on Windows

* Simplify the code
2023-02-08 16:11:50 +01:00
Archi
45d434e64e Misc 2023-01-13 10:43:45 +01:00
Łukasz Domeradzki
0261076021 Ignore QUIC exceptions (#2800)
* Ignore QUIC exceptions

See https://github.com/dotnet/runtime/issues/80111

* Update madness

* No i jaki jest twój problem ja się pytam
2023-01-13 10:40:37 +01:00
Archi
91730d6b8c Flush on failed shutdown sequence 2022-12-29 23:53:35 +01:00
Archi
0c340c9123 Misc
We don't need so long time, 5 seconds for starting a process with basic console output is enough
2022-12-29 23:03:40 +01:00
Archi
af8d41892c Misc 2022-12-17 21:18:44 +01:00
JustArchi
533bf45f35 Thanks netf 2022-10-10 22:57:34 +02:00
JustArchi
6227f84931 Misc cleanup 2022-10-10 22:50:36 +02:00
Sebastian Göls
5a182b7522 Add --input-cryptkey argument (#2714)
* 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
2022-10-07 19:32:58 +02:00
JustArchi
712b53cb72 Add log errors for crypt file edge cases 2022-09-08 20:08:39 +02:00
JustArchi
dc0502a671 Add support for ASF_CRYPTKEY_FILE 2022-09-08 19:53:36 +02:00
JustArchi
ff7f661197 Misc 2022-06-04 22:46:37 +02:00
Sebastian Göls
b83f8fc669 Update Program.cs (#2589) 2022-05-25 17:18:06 +02:00
Archi
9f68d17a28 Add initialization for Madness
This is probably not needed, but might come useful in the future.
2022-04-23 13:09:51 +02:00
Archi
0bbc85527a Allow cmdline arg for forbidding Steam parental generation 2022-04-06 14:16:26 +02:00
Archi
8620a90787 Remove all workarounds that should be no longer needed 2022-01-10 11:19:35 +01:00
Archi
1809028c77 Rider cleanup 2022-01-06 20:22:38 +01:00
Archi
81a92d6781 Misc 2021-12-20 18:27:54 +01:00
Archi
4f598d5c8f Latest Rider cleanups 2021-12-12 01:12:54 +01:00