Commit Graph

385 Commits

Author SHA1 Message Date
Paul Chote
c6af758ee5 Fix Makefile "version" rule. 2024-10-20 16:56:04 +03:00
Matthias Mailänder
dd9ab16401 Run unit tests on Linux. 2023-06-01 12:43:10 +02:00
Matthias Mailänder
445b736885 Replace sandbox wrapper scripts. 2023-05-20 13:19:48 +02:00
Gustas
ade27ad8b9 Fail CI on lint warnings 2023-05-19 17:25:03 +02:00
RoosterDragon
83561d639d Update LangVersion to C# 9.
mono was the bottleneck restricting our ability to use a newer C# version. mono 6.12 is currently available. Although poorly documented on their website, this supports C# 9. https://www.mono-project.com/docs/about-mono/versioning/#mono-source-versioning indicates mono 6.12 uses Roslyn 3.9.0. https://github.com/dotnet/roslyn/blob/main/docs/wiki/NuGet-packages.md#versioning indicates Roslyn 3.9.0 supports C# 9.

This unlocks C# 8 and C# 9 features previously unavailable to us.
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-80
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-9

A newer version of StyleCop is required to avoid rules tripping up on the new syntax. Currently only prerelease versions are available but their use is encouraged https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3420#issuecomment-994899135

Fix style rule violations on existing rules where the newer language version makes some existing casts redundant or allows use of the null coalescing assignment operator.
2023-04-05 15:27:41 +03:00
RoosterDragon
88ba974ea5 Reformat editorconfig
- Group style rules with their associated options in a way that matches the documentation. This makes it easier to pair rules and their options.
- Remove OpenRA.ruleset and move all rules into .editorconfig file.
- Centralise IDE0005 workaround in Directory.Build.props file.
2023-03-17 22:31:10 +01:00
penev92
a614375982 Fixed Makefile check of MacOS architecture 2023-02-05 00:19:05 +01:00
Paul Chote
363a0e1d1e Update native deps to include macOS and Linux arm64 binaries. 2022-12-23 12:54:06 +02:00
Matthias Mailänder
ee0d37f2b1 Add back the man page install 2022-10-05 22:01:04 +02:00
Matthias Mailänder
38a22ebd55 These are not Linux exclusive. 2022-10-05 22:01:04 +02:00
Unrud
bd6d69c5a1 Makefile: More robust check-scripts
Use **xargs** to pass results of **find** instead of word splitting. Word splitting fails when filenames contain white spaces (or if no files are found).
2022-07-05 16:07:01 +02:00
Paul Chote
a152bf7324 Replace custom mono defines with toolchain-provided defines. 2022-04-24 20:31:47 +02:00
abcdefg30
b12c15ea9d Update to .NET 6 2022-01-04 12:34:30 +01:00
Matthias Mailänder
58b105f0d4 Reorganize global .lua files. 2021-11-26 23:39:41 +01:00
penev92
e1e76411f7 Added a rule for unused usings to OpenRA.ruleset
Unfortunately due to bugs in the analyzers or something else, the IDE0005 doesn't work as expected. The "officially suggested" workaround is to enable XML documentation generation to trigger IDE0005 during compiling. Then we need to add three more rules to silence the warnings that come from the XML documentation generation. We also need to enable code style enforcing on build for all of this to work.
Known issue is that all of this produces a bunch (tens to hundreds) of obscure analyzer warnings on older versions of Visual Studio, but those seem to not be causing issues.
2021-10-15 13:12:33 +02:00
teinarss
279e7eb1c9 Disable Stylecop on debug config 2021-10-02 21:13:58 +02:00
Paul Chote
f8ed768e39 Change makefile/packaging "RUNTIME=dotnet" to "RUNTIME=net5". 2021-07-18 20:57:22 +02:00
Greg Solo
c39f7e521a Use shell param instead of duplicating the flow 2021-05-03 19:17:03 +01:00
Greg Solo
c9b9efe745 Setup debug make to support vscode debug 2021-05-03 19:17:03 +01:00
Unrud
11171ff649 Makefile: Fail target version when not a git repository 2021-03-13 15:57:17 +00:00
Unrud
8a90413b87 Use version from VERSION file
The `VERSION` variable doesn't work with a release tarball, because it requires git to be set correctly.
Instead this reads the version from the `VERSION` file.
2021-02-01 23:13:48 +01:00
Paul Chote
765944cfa2 Switch macOS and Linux default toolchain to .NET 5. 2021-01-16 22:58:05 +01:00
Paul Chote
15c926b6b9 Move DefineConstants="MONO" into OpenRA.Game.csproj. 2021-01-16 22:58:05 +01:00
Matthias Mailänder
8f0d53ffd9 Document the target platform parameter during install
as it otherwise copies the system binaries.
2021-01-16 20:02:19 +01:00
Matthias Mailänder
ddfa5a4d35 Get rid of unnecessary Makefile variables. 2021-01-16 20:02:19 +01:00
Matthias Mailänder
cbf2e2e2ef Don't contain the build root in the wrappers. 2021-01-16 20:02:19 +01:00
Paul Chote
868736fe1a Remove obsolete --check-runtime-assemblies utility command. 2021-01-09 19:53:22 +01:00
teinarss
5e74e58b22 Add support for dotnet core for Windows 2021-01-01 19:42:01 +01:00
Paul Chote
b1560ae69c Overhaul packaging scripts and helpers:
- Shared helpers extracted to functions.sh for use by upstream packaging,
  Mod SDK, and downstream packaging (via the Makefile targets).
- Assembly management separated from data and combined between engine
  and mods to prepare for pending .NET core requirements.
- Streamline Makefile targets.
- Clean up a lot of old technical debt.
2020-12-06 17:16:47 +01:00
Paul Chote
d35768e0f9 Rework Windows launchers:
- Use SDL2 message boxes instead of Winforms.
- Use a proper project instead of compiling a single file.
- Use assembly attributes instead of modifying strings in the source code.
- Remove generic OpenRA.exe launcher.
- Replace MakeLAA.exe with a python script.
2020-11-27 20:32:02 +01:00
Paul Chote
07a10069db Introduce new OpenRA.exe entrypoint and change OpenRA.Game to a library. 2020-11-27 20:32:02 +01:00
Paul Chote
20fe59e844 Output compiled binaries to ./bin. 2020-11-24 17:53:48 +01:00
Paul Chote
2c0d512727 Package and default to GLES via ANGLE on windows. 2020-10-12 12:24:22 +02:00
Matthias Mailänder
b56ddc1a08 Check global scripts for Lua errors. 2020-09-05 21:13:47 +01:00
Paul Chote
b03ab1212f Remove install-core target. 2020-09-01 18:48:54 +02:00
Paul Chote
c1f79b348a Generate platform-specific artwork from common source files. 2020-09-01 18:48:54 +02:00
teinarss
c2026dc254 Add Discord Rich Presence 2020-07-12 14:27:59 +02:00
Ivaylo Draganov
3ab4a584ab Remove trailing white-space from various files 2020-05-23 11:38:44 +02:00
teinarss
e13fd693c3 Add Nuget packages for all dependencies 2020-04-18 11:36:25 -05:00
Paul Chote
9c4faddc0f Switch GeoIP database from MaxMind to IP2Location.
The IP2Location data is licensed under CC BY-SA, which
allows us to distribute the database with releases.
2020-04-15 23:16:24 +02:00
Paul Chote
adf1c0b616 Remove GeoIP database from install/packaging scripts. 2019-12-31 17:28:30 +01:00
Paul Chote
e063e13ff4 Remove automatic GeoIP download from the build scripts.
The database file is now locked behind an account login.

https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
2019-12-31 17:28:30 +01:00
Jan Beich
fe48eede0e command -v with more than one argument is non-portable
On FreeBSD build fails, so check if `msbuild` exists without arguments.

$ gmake
command: wrong number of arguments
OpenRA requires the 'msbuild -verbosity:m -nologo' tool provided by Mono >= 5.4.
gmake: *** [Makefile:154: core] Error 1

# FreeBSD sh
$ command -v echo ls
command: wrong number of arguments

# dash
$ command -v echo ls
echo

# ksh, bash, zsh
$ command -v echo ls
echo
/bin/ls
2019-09-13 00:25:50 +02:00
Paul Chote
579d2c19e2 Add --check-conditional-trait-interface-overrides utility command.
This command is used by `make check` to detect traits that incorrectly
override interface methods that are required for conditions to work
correctly.
2019-07-14 00:41:59 +02:00
Paul Chote
845fca25d1 Change platform from x86 to Any CPU (preferring 64 bit)
A Release-x86 configuration allows x86 Windows installers to still be created.
2019-05-26 23:13:37 +02:00
Paul Chote
4756558f8a Merge man-page target into install-man-page 2019-05-17 19:02:46 +01:00
Paul Chote
c47c9d7ed6 Fix Makefile targets 2019-05-17 19:02:46 +01:00
Paul Chote
ba282865f1 Replace legacy StyleCop(Plus) with StyleCopAnalyzers
Analyzers are enabled in the Debug configuration
only to avoid unnecessary overheads when compiling
normally.
2019-05-09 20:40:08 +02:00
Paul Chote
1955cac84e Unify Windows and mono build systems.
The Makefile behaviour is recreated using the new and significantly
cleaner .NET Core csproj format.

fixheader.exe is promoted to OpenRA.PostProcess.exe and now runs
on all platforms.
2019-05-05 23:19:04 +02:00
Paul Chote
9cbf08201f Disable debug and enable optimizations by default.
This does not affect stacktraces produced during
a crash when run using `mono --debug`.
2019-03-30 20:17:17 +01:00