Commit Graph

149 Commits

Author SHA1 Message Date
RoosterDragon
323204014c Flush logs when crashing.
When the process is running, we use a finally block to call Log.Dispose and flush any outstanding logs to disk before the process exits. This works when we handle any exception in a matching catch block.

When the exception is unhandled, then the finally block will not run and instead the process will just exit. To fix this, flush the logs inside a catch block instead before rethrowing the error. This ensures we get logs even when crashing.
2024-08-16 17:49:35 +03:00
RoosterDragon
c8efc5fdd7 Fix CA1854 2023-11-16 09:29:17 +02:00
RoosterDragon
f4af5c1764 Fix CA1852 2023-06-06 11:51:47 +03:00
RoosterDragon
5254348819 Fix IDE0056 2023-04-08 16:51:51 +03:00
RoosterDragon
9dd4f938da Cache reflection calls when running utility lints and commands.
Reduces runtime of --check-yaml command to 70% of original.
2023-04-05 00:25:32 +02:00
Moath Altarawneh
44be6cea94 Update Program.cs
a small change to line 174 to use an easier way to format the string 👍
2023-01-14 13:02:28 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Matthias Mailänder
f6d13baf4b Use inline strings. 2022-09-26 11:05:15 +03:00
Matthias Mailänder
90a2b677f1 Exit with error code on invalid commands and arguments. 2022-09-26 11:05:15 +03:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
penev92
0d24ccc47a Fixed unnecessary zero-length array allocations
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
2022-01-20 22:10:28 +01:00
Matthias Mailänder
07815143f1 Fix CA1825 warnings on empty array initialisation. 2021-12-06 13:19:28 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
teinarss
605181efe4 Update Log to use worker thread 2021-04-03 22:53:30 +01:00
Paul Chote
6ad5b9ebc4 Allow the game root directory to be moved away from the binaries. 2020-11-24 17:53:48 +01:00
Paul Chote
1cc1f93fb0 Rename Platform.GameDir to Platform.EngineDir. 2020-11-24 17:53:48 +01:00
Paul Chote
888915b53b Use Platform.GameDir explicitly in hardcoded paths. 2020-11-22 16:42:46 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
215aa6fa60 Remove support for loading mods from the support dir. 2017-04-21 17:55:15 +01:00
Taryn Hill
4d5f9e0de7 Server: Get mod search paths from env MOD_SEARCH_PATHS 2017-04-03 17:58:44 -05:00
Taryn Hill
d095ccf668 Utility: Get mod search paths from env MOD_SEARCH_PATHS 2017-04-02 18:49:03 -05:00
Paul Chote
00b7b14f2e Fix utility mod listing. 2017-02-17 20:53:17 +00:00
Paul Chote
7d758202c5 Rework mod searching/enumeration. 2017-02-12 13:21:11 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
3261516b51 Support loading mods from arbitrary locations. 2016-08-08 22:36:08 +01:00
Paul Chote
3df9efb95d Rework mod enumeration / caching.
- Replaced ModMetadata.AllMods with Game.Mods.
- Store / reference mod Manifest instead of ModMetadata.
- Removes engine dependency on ModContent class.
2016-08-08 22:36:07 +01:00
Paul Chote
45a596953e Add a Utility class and update command interface. 2016-08-08 22:23:16 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
6c6826c3f3 Fix mod assembly loading on Windows. 2016-02-07 23:38:12 +00:00
RoosterDragon
5f13fa0343 Fix serialization of custom exceptions. 2016-01-01 04:51:55 +00:00
Pavel Penev
1b88d24cfa Unstatic GlobalFileSystem and rename it to FileSystem
Add a ModFiles field on ModData and move all access to the file system to go through that.
2015-12-14 03:42:22 +02:00
Taryn Hill
9ab5eacdee Cache the command entered in a variable in Utility.Program.cs for easier reading. 2015-10-23 20:55:18 -05:00
Taryn Hill
780f905959 Fix misleading Utility message
We were reporting that the entered command did not exist
by assuming that any ArgumentException indicated this.

Now we will throw and catch a NoSuchCommandException.
2015-10-23 20:55:13 -05:00
Herve-M
1485dd1675 Add basic arguments validation 2015-10-03 17:21:21 +02:00
Dmitri Suvorov
d625cbe1de Updated commands layout 2015-07-05 02:38:09 +03:00
Dmitri Suvorov
2bc6bd74be Display commands in alphabetical order 2015-07-05 02:37:55 +03:00
Dmitri Suvorov
6e4ab810d8 Fixed multiple enumeration of IEnumerable 2015-07-04 18:22:28 +03:00
Dmitri Suvorov
ad97fe850f Removed redundant using 2015-07-04 18:18:11 +03:00
Dmitri Suvorov
88ffa3836e Removed unused method GetNamedArg 2015-07-04 18:16:31 +03:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Hellhake
90c948ebc3 Fix StyleCop warnings in OpenRA.Utility 2015-01-02 16:08:07 +01:00
RoosterDragon
b28d999131 Made SheetBuilder rely on global settings rather than global renderer.
Additionally exposed an InitializeSettings method on game to initialize the global settings so that other classes can set up all the secret dependencies on the global settings required.
2014-12-22 17:39:19 +00:00
Guido L.
0806cca133 Prevent the creation of Logfiles in the Game Directory 2014-11-20 12:59:02 +01:00
ihptru
f971ff11ca fixes crash in minimap generator for some of maps 2014-10-30 22:35:01 +03:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
Alexander Fast
08890b0994 Added IUtilityCommand and move default commands into Mods.Common. 2014-09-21 10:15:50 +12:00