Add Nuget packages for all dependencies

This commit is contained in:
teinarss
2020-03-01 15:24:36 +01:00
committed by atlimit8
parent cc35512472
commit e13fd693c3
29 changed files with 228 additions and 669 deletions

View File

@@ -34,12 +34,13 @@ env:
# call OpenRA to check for YAML errors
# Run the NUnit tests
script:
- travis_retry make all-dependencies
- make all
- test "$TRAVIS_OS_NAME" == "linux" && make check || echo "Skipping check"
- test "$TRAVIS_OS_NAME" == "linux" && make check-scripts || echo "Skipping scripts check"
- test "$TRAVIS_OS_NAME" == "linux" && make test || echo "Skipping tests"
- test "$TRAVIS_OS_NAME" == "linux" && make nunit || echo "Skipping nunit tests"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mono ~/.nuget/packages/nunit.consolerunner/3.11.1/tools/nunit3-console.exe --noresult OpenRA.Test.dll;
fi
# Only watch the development branch and tagged release.
branches:

View File

@@ -8,15 +8,9 @@ Windows
Compiling OpenRA requires the following dependencies:
* [Windows PowerShell >= 4.0](http://microsoft.com/powershell) (included by default in recent Windows 10 versions)
* [.NET Framework 4.6.1 (Developer Pack)](https://dotnet.microsoft.com/download/dotnet-framework/net461) (or via Visual Studio 2017)
* [.NET Framework 4.7.2 (Developer Pack)](https://dotnet.microsoft.com/download/dotnet-framework/net472) (or via Visual Studio 2017)
* [.NET Core 2.2 SDK](https://dotnet.microsoft.com/download/dotnet-core/2.2) (or via Visual Studio 2017)
Type `make dependencies` in a command terminal to download pre-compiled native libraries for:
* [SDL 2](http://www.libsdl.org/download-2.0.php)
* [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm)
* [zlib](http://gnuwin32.sourceforge.net/packages/zlib.htm)
* [OpenAL](http://kcat.strangesoft.net/openal.html)
* [liblua 5.1](http://luabinaries.sourceforge.net/download.html)
To compile OpenRA, open the `OpenRA.sln` solution in the main folder, build it from the command-line with MSBuild or use the Makefile analogue command `make all` scripted in PowerShell syntax.
@@ -25,11 +19,17 @@ Run the game with `launch-game.cmd`. It can be handed arguments that specify the
Linux
=====
Mono, version 5.4 or later, is required to compile OpenRA. You can add the [upstream mono repository](https://www.mono-project.com/download/stable/#download-lin) for your distro to obtain the latest version if your system packages are not sufficient.
Mono, version 5.18 or later, is required to compile OpenRA. You can add the [upstream mono repository](https://www.mono-project.com/download/stable/#download-lin) for your distro to obtain the latest version if your system packages are not sufficient.
Use `make dependencies` to map the native libraries to your system and fetch the remaining CLI dependencies to place them at the appropriate places.
To compile OpenRA, run `make` from the command line. After this one can run the game with `./launch-game.sh`. It is also possible to specify the mod you wish to run from the command line, e.g. with `./launch-game.sh Game.Mod=ts` if you wish to try the experimental Tiberian Sun mod.
To compile OpenRA, run `make all` from the command line. After this one can run the game with `./launch-game.sh`. It is also possible to specify the mod you wish to run from the command line, e.g. with `./launch-game.sh Game.Mod=ts` if you wish to try the experimental Tiberian Sun mod.
The default behaviour on the x86_64 architecture is to download several pre-compiled native libraries using the Nuget packaging manager. If you prefer to use system libraries, compile instead using `make TARGETPLATFORM=unix-generic`.
If you choose to use system libraries, or your system is not x86_64, you will need to install the following using your system package manager:
* [SDL 2](http://www.libsdl.org/download-2.0.php)
* [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm)
* [OpenAL](http://kcat.strangesoft.net/openal.html)
* [liblua 5.1](http://luabinaries.sourceforge.net/download.html)
Type `sudo make install` for system-wide installation. Run `sudo make install-linux-shortcuts` to get startup scripts, icons and desktop files. You can then run the Red Alert by executing the `openra-ra` command, the Dune 2000 mod by running the `openra-d2k` command and Tiberian Dawn by the `openra-cnc` command. Alternatively, you can also run these mods by clicking on their desktop shortcuts if you ran `sudo make install-linux-shortcuts`.
@@ -95,18 +95,17 @@ The EPEL repository is required in order for the following command to run proper
sudo yum install "pkgconfig(mono)" SDL2 freetype "lua = 5.1" openal-soft xdg-utils zenity
```
OSX
macOS
=====
Before compiling OpenRA you must install the following dependencies:
* [Mono >= 5.4](https://www.mono-project.com/download/stable/#download-mac)
* [Mono >= 5.18](https://www.mono-project.com/download/stable/#download-mac)
Use `make dependencies` to download pre-compiled native libraries for:
* [SDL 2](http://www.libsdl.org/download-2.0.php)
* [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm)
* [OpenAL](http://kcat.strangesoft.net/openal.html)
* [liblua 5.1](http://luabinaries.sourceforge.net/download.html)
To compile OpenRA, run `make` from the command line. Run with `./launch-game.sh`.
To compile OpenRA, run `make` from the command line.
The default behaviour is to download several pre-compiled native libraries using the Nuget packaging manager. If you prefer to use system libraries, compile instead using `make TARGETPLATFORM=unix-generic`. If you choose to use system libraries you will need to install:
* [SDL 2](http://www.libsdl.org/download-2.0.php) (`brew install sdl2`)
* [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm) (`brew install freetype`)
* [OpenAL](http://kcat.strangesoft.net/openal.html) (`brew install openal-soft`)
* [liblua 5.1](http://luabinaries.sourceforge.net/download.html) (`brew install lua@5.1`)
Run with `./launch-game.sh`.

153
Makefile
View File

@@ -3,15 +3,13 @@
# to compile, run:
# make [DEBUG=true]
#
# to check unit tests (requires NUnit version >= 2.6), run:
# make nunit [NUNIT_CONSOLE=<path-to/nunit[2]-console>] [NUNIT_LIBS_PATH=<path-to-libs-dir>] [NUNIT_LIBS=<nunit-libs>]
# Use NUNIT_CONSOLE if nunit[3|2]-console was not downloaded by `make dependencies` nor is it in bin search paths
# Use NUNIT_LIBS_PATH if NUnit libs are not in search paths. Include trailing /
# Use NUNIT_LIBS if NUnit libs have different names (such as including a prefix or suffix)
# to compile using system libraries for native dependencies, run:
# make [DEBUG=true] TARGETPLATFORM=unix-generic
#
# to check the official mods for erroneous yaml files, run:
# make test
#
# to check the official mod dlls for StyleCop violations, run:
# to check the engine and official mod dlls for code style violations, run:
# make check
#
# to install, run:
@@ -22,6 +20,7 @@
#
# to install the engine and common mod files (omitting the default mods):
# make install-engine
# make install-dependencies
# make install-common-mod-files
#
# to uninstall, run:
@@ -40,11 +39,11 @@
WHITELISTED_OPENRA_ASSEMBLIES = OpenRA.Game.exe OpenRA.Utility.exe OpenRA.Platforms.Default.dll OpenRA.Mods.Common.dll OpenRA.Mods.Cnc.dll OpenRA.Mods.D2k.dll OpenRA.Game.dll
# These are explicitly shipped alongside our core files by the packaging script
WHITELISTED_THIRDPARTY_ASSEMBLIES = ICSharpCode.SharpZipLib.dll FuzzyLogicLibrary.dll Eluant.dll rix0rrr.BeaconLib.dll Open.Nat.dll SDL2-CS.dll OpenAL-CS.dll
WHITELISTED_THIRDPARTY_ASSEMBLIES = ICSharpCode.SharpZipLib.dll FuzzyLogicLibrary.dll Eluant.dll BeaconLib.dll Open.Nat.dll SDL2-CS.dll OpenAL-CS.Core.dll
# These are shipped in our custom minimal mono runtime and also available in the full system-installed .NET/mono stack
# This list *must* be kept in sync with the files packaged by the AppImageSupport and OpenRALauncherOSX repositories
WHITELISTED_CORE_ASSEMBLIES = mscorlib.dll System.dll System.Configuration.dll System.Core.dll System.Numerics.dll System.Security.dll System.Xml.dll Mono.Security.dll
WHITELISTED_CORE_ASSEMBLIES = mscorlib.dll System.dll System.Configuration.dll System.Core.dll System.Numerics.dll System.Security.dll System.Xml.dll Mono.Security.dll netstandard.dll
NUNIT_LIBS_PATH :=
NUNIT_LIBS := $(NUNIT_LIBS_PATH)nunit.framework.dll
@@ -81,24 +80,31 @@ MSBUILD = msbuild -verbosity:m -nologo
# Enable 32 bit builds while generating the windows installer
WIN32 = false
# dependencies
ifndef TARGETPLATFORM
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_S),Darwin)
TARGETPLATFORM = osx-x64
else
ifeq ($(UNAME_M),x86_64)
TARGETPLATFORM = linux-x64
else
TARGETPLATFORM = unix-generic
endif
endif
endif
# program targets
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
# dependencies
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
os-dependencies = osx-dependencies
else
os-dependencies = linux-dependencies
endif
check-scripts:
@echo
@echo "Checking for Lua syntax errors..."
@luac -p $(shell find mods/*/maps/* -iname '*.lua')
@luac -p $(shell find lua/* -iname '*.lua')
check: dependencies
check:
@echo
@echo "Compiling in debug mode..."
@$(MSBUILD) -t:build -p:Configuration=Debug
@@ -112,26 +118,6 @@ check: dependencies
@echo "Checking for incorrect conditional trait interface overrides..."
@mono --debug OpenRA.Utility.exe all --check-conditional-trait-interface-overrides
NUNIT_CONSOLE := $(shell test -f thirdparty/download/nunit3-console.exe && echo mono thirdparty/download/nunit3-console.exe || \
which nunit3-console 2>/dev/null || which nunit2-console 2>/dev/null || which nunit-console 2>/dev/null)
nunit: core
@echo
@echo "Checking unit tests..."
@if [ "$(NUNIT_CONSOLE)" = "" ] ; then \
echo 'nunit[3|2]-console not found!'; \
echo 'Was "make dependencies" called or is NUnit installed?'>&2; \
echo 'See "make help".'; \
exit 1; \
fi
@if $(NUNIT_CONSOLE) --help | head -n 1 | grep -E "NUnit version (1|2\.[0-5])";then \
echo 'NUnit version >= 2.6 required'>&2; \
echo 'Try "make dependencies" first to use NUnit from NuGet.'>&2; \
echo 'See "make help".'; \
exit 1; \
fi
@$(NUNIT_CONSOLE) --noresult OpenRA.Test.nunit
test: core
@echo
@echo "Testing Tiberian Sun mod MiniYAML..."
@@ -148,52 +134,21 @@ test: core
########################## MAKE/INSTALL RULES ##########################
#
all: dependencies core
all: core
core:
@command -v $(firstword $(MSBUILD)) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
@$(MSBUILD) -t:build -p:Configuration="Release-x86"
else
@$(MSBUILD) -t:build -p:Configuration=Release
@command -v $(firstword $(MSBUILD)) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.18."; exit 1)
@$(MSBUILD) -t:Build -restore -p:Configuration=Release -p:TargetPlatform=$(TARGETPLATFORM)
ifeq ($(TARGETPLATFORM), unix-generic)
@./configure-system-libraries.sh
endif
@./fetch-geoip.sh
clean:
@ $(MSBUILD) -t:clean
@-$(RM_F) *.config IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
@-$(RM_F) *.exe *.dll *.dylib ./OpenRA*/*.dll *.pdb mods/**/*.dll mods/**/*.pdb *.resources
@-$(RM_F) *.exe *.dll *.dll.config *.so *.dylib ./OpenRA*/*.dll *.pdb mods/**/*.dll mods/**/*.pdb *.resources
@-$(RM_RF) ./*/bin ./*/obj
@-$(RM_RF) ./thirdparty/download
distclean: clean
cli-dependencies:
@./thirdparty/fetch-thirdparty-deps.sh
@ $(CP_R) thirdparty/download/*.dll .
@ $(CP_R) thirdparty/download/*.dll.config .
@ test -f OpenRA.Game/obj/project.assets.json || $(MSBUILD) -t:restore
linux-dependencies: cli-dependencies linux-native-dependencies
linux-native-dependencies:
@./thirdparty/configure-native-deps.sh
windows-dependencies: cli-dependencies
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
@./thirdparty/fetch-thirdparty-deps-windows.sh x86
else
@./thirdparty/fetch-thirdparty-deps-windows.sh x64
endif
osx-dependencies: cli-dependencies
@./thirdparty/fetch-thirdparty-deps-osx.sh
@ $(CP_R) thirdparty/download/osx/*.dylib .
@ $(CP_R) thirdparty/download/osx/*.dll.config .
dependencies: $(os-dependencies)
all-dependencies: cli-dependencies windows-dependencies osx-dependencies
@ $(MSBUILD) -t:clean
version: VERSION mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml
@echo "$(VERSION)" > VERSION
@@ -203,10 +158,33 @@ version: VERSION mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mo
rm $${i}.tmp; \
done
install: dependencies core install-core
install: core install-core
install-linux-shortcuts: install-linux-scripts install-linux-icons install-linux-desktop
install-dependencies:
ifeq ($(TARGETPLATFORM), $(filter $(TARGETPLATFORM),win-x86 win-x64))
@-echo "Installing OpenRA dependencies to $(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) soft_oal.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SDL2.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) freetype6.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) lua51.dll "$(DATA_INSTALL_DIR)"
endif
ifeq ($(TARGETPLATFORM), linux-x64)
@-echo "Installing OpenRA dependencies to $(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) soft_oal.so "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SDL2.so "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) freetype6.so "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) lua51.so "$(DATA_INSTALL_DIR)"
endif
ifeq ($(TARGETPLATFORM), osx-x64)
@-echo "Installing OpenRA dependencies to $(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) soft_oal.dylib "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SDL2.dylib "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) freetype6.dylib "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) lua51.dylib "$(DATA_INSTALL_DIR)"
endif
install-engine:
@-echo "Installing OpenRA engine to $(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
@@ -215,7 +193,9 @@ install-engine:
@$(INSTALL_PROGRAM) OpenRA.Utility.exe "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) OpenRA.Platforms.Default.dll "$(DATA_INSTALL_DIR)"
ifneq ($(TARGETPLATFORM), $(filter $(TARGETPLATFORM),win-x86 win-x64))
@$(INSTALL_DATA) OpenRA.Platforms.Default.dll.config "$(DATA_INSTALL_DIR)"
endif
@$(INSTALL_DATA) VERSION "$(DATA_INSTALL_DIR)/VERSION"
@$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
@$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING"
@@ -229,7 +209,7 @@ install-engine:
@$(INSTALL_PROGRAM) ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Open.Nat.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) rix0rrr.BeaconLib.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) BeaconLib.dll "$(DATA_INSTALL_DIR)"
install-common-mod-files:
@-echo "Installing OpenRA common mod files to $(DATA_INSTALL_DIR)"
@@ -354,23 +334,28 @@ uninstall:
help:
@echo 'to compile, run:'
@echo ' make [DEBUG=false]'
@echo ' make [DEBUG=true]'
@echo
@echo 'to check unit tests (requires NUnit version >= 2.6), run:'
@echo ' make nunit [NUNIT_CONSOLE=<path-to/nunit[3|2]-console>] [NUNIT_LIBS_PATH=<path-to-libs-dir>] [NUNIT_LIBS=<nunit-libs>]'
@echo ' Use NUNIT_CONSOLE if nunit[3|2]-console was not downloaded by `make dependencies` nor is it in bin search paths'
@echo ' Use NUNIT_LIBS_PATH if NUnit libs are not in search paths. Include trailing /'
@echo ' Use NUNIT_LIBS if NUnit libs have different names (such as including a prefix or suffix)'
@echo 'to compile using system libraries for native dependencies, run:'
@echo ' make [DEBUG=true] TARGETPLATFORM=unix-generic'
@echo
@echo 'to check the official mods for erroneous yaml files, run:'
@echo ' make test'
@echo
@echo 'to check the engine and official mod dlls for code style violations, run:'
@echo ' make test'
@echo
@echo 'to install, run:'
@echo ' make [prefix=/foo] [bindir=/bar/bin] install'
@echo
@echo 'to install Linux startup scripts, desktop files and icons'
@echo ' make install-linux-shortcuts [DEBUG=false]'
@echo
@echo ' to install the engine and common mod files (omitting the default mods):'
@echo ' make install-engine'
@echo ' make install-dependencies'
@echo ' make install-common-mod-files'
@echo
@echo 'to uninstall, run:'
@echo ' make uninstall'
@echo
@@ -383,4 +368,4 @@ help:
.SUFFIXES:
.PHONY: check-scripts check nunit test all core clean distclean cli-dependencies linux-dependencies linux-native-dependencies windows-dependencies osx-dependencies dependencies all-dependencies version install install-linux-shortcuts install-engine install-common-mod-files install-default-mods install-core install-linux-icons install-linux-desktop install-linux-mime install-linux-appdata install-man-page install-linux-scripts uninstall help
.PHONY: check-scripts check test all core clean version install install-linux-shortcuts install-dependencies install-engine install-common-mod-files install-default-mods install-core install-linux-icons install-linux-desktop install-linux-mime install-linux-appdata install-man-page install-linux-scripts uninstall help

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -16,9 +16,14 @@
<ExternalConsole>false</ExternalConsole>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<Configurations>Release;Debug;Release-x86</Configurations>
<Configurations>Release;Debug</Configurations>
<ManagedExeLauncher Condition="('$(OS)' != 'Windows_NT')">mono </ManagedExeLauncher>
</PropertyGroup>
<PropertyGroup>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('Windows'))">win-x64</TargetPlatform>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('Linux'))">linux-x64</TargetPlatform>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('OSX'))">osx-x64</TargetPlatform>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
<Compile Include="**/*.cs" Exclude="$(DefaultItemExcludes)" />
@@ -27,7 +32,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release-x86'">
<PropertyGroup Condition="'$(TargetPlatform)' == 'win-x86'">
<Prefer32bit>true</Prefer32bit>
</PropertyGroup>
<PropertyGroup Condition="'$(RunConfiguration)' == 'Red Alert'">
@@ -47,22 +52,15 @@
<StartArguments>Game.Mod=ts</StartArguments>
</PropertyGroup>
<ItemGroup>
<Reference Include="Open.Nat">
<HintPath>..\thirdparty\download\Open.Nat.dll</HintPath>
</Reference>
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\thirdparty\download\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>False</Private>
</Reference>
<ProjectReference Include="..\OpenRA.PostProcess\OpenRA.PostProcess.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<None Include="App.config" />
<PackageReference Include="OpenRA-Eluant" Version="1.0.17" />
<PackageReference Include="OpenRA-Open.NAT" Version="1.0.0" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
<AdditionalFiles Include="Properties/launchSettings.json" />
</ItemGroup>

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>5</LangVersion>
@@ -21,10 +21,6 @@
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
<Private>False</Private>
</Reference>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Private>False</Private>
</ProjectReference>
@@ -32,6 +28,7 @@
<Private>False</Private>
</ProjectReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>5</LangVersion>
@@ -20,29 +20,14 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="FuzzyLogicLibrary">
<HintPath>..\thirdparty\download\FuzzyLogicLibrary.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="rix0rrr.BeaconLib">
<HintPath>..\thirdparty\download\rix0rrr.BeaconLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\thirdparty\download\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Private>False</Private>
</ProjectReference>
<PackageReference Include="OpenRA-FuzzyLogicLibrary" Version="1.0.1" />
<PackageReference Include="rix0rrr.BeaconLib" Version="1.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>5</LangVersion>
@@ -20,12 +20,6 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Private>False</Private>
@@ -34,6 +28,7 @@
<Private>False</Private>
</ProjectReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<LangVersion>5</LangVersion>
@@ -12,6 +12,11 @@
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('Windows'))">win-x64</TargetPlatform>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('Linux'))">linux-x64</TargetPlatform>
<TargetPlatform Condition="$([MSBuild]::IsOsPlatform('OSX'))">osx-x64</TargetPlatform>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
<Compile Include="**/*.cs" Exclude="$(DefaultItemExcludes)" />
@@ -20,20 +25,13 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
</Reference>
<Reference Include="SDL2-CS">
<HintPath>..\thirdparty\download\SDL2-CS.dll</HintPath>
</Reference>
<Reference Include="OpenAL-CS">
<HintPath>..\thirdparty\download\OpenAL-CS.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
<PackageReference Include="OpenRA-Freetype6" Version="1.0.4" />
<PackageReference Include="OpenRA-OpenAL-CS" Version="1.0.16" />
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.26" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">
@@ -43,8 +41,8 @@
</ItemGroup>
</Target>
<ItemGroup>
<Content Include="OpenRA.Platforms.Default.dll.config">
<Content Include="OpenRA.Platforms.Default.dll.config" Condition="'$(TargetPlatform)' != 'win-x64' And '$(TargetPlatform)' != 'win-x86'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
</Project>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<dllmap dll="freetype6" os="!windows" target="libfreetype.so.6" />
<dllmap dll="freetype6" os="openbsd" target="libfreetype.so" />
<dllmap dll="freetype6" os="osx" target="libfreetype.6.dylib" />
<dllmap dll="freetype6" os="!windows" target="freetype6.so" />
<dllmap dll="freetype6" os="osx" target="freetype6.dylib" />
</configuration>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -14,7 +14,7 @@
<ExternalConsole>false</ExternalConsole>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<Configurations>Debug;Release;Release-x86</Configurations>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
@@ -24,11 +24,12 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release-x86'">
<PropertyGroup Condition="'$(TargetPlatform)' == 'win-x86'">
<Prefer32bit>true</Prefer32bit>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -14,7 +14,7 @@
<ExternalConsole>false</ExternalConsole>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<Configurations>Release;Debug;Release-x86</Configurations>
<Configurations>Release;Debug</Configurations>
<ManagedExeLauncher Condition="('$(OS)' != 'Windows_NT')">mono </ManagedExeLauncher>
</PropertyGroup>
<ItemGroup>
@@ -25,7 +25,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release-x86'">
<PropertyGroup Condition="'$(TargetPlatform)' == 'win-x86'">
<Prefer32bit>true</Prefer32bit>
</PropertyGroup>
<ItemGroup>
@@ -34,6 +34,7 @@
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">
@@ -46,4 +47,4 @@
<Exec Command="$(ManagedExeLauncher)&quot;$(TargetDir)OpenRA.PostProcess.exe&quot; &quot;$(TargetPath)&quot; -LAA" />
<Touch Files="$(IntermediateOutputPath)\$(TargetFileName).processed" AlwaysCreate="true" />
</Target>
</Project>
</Project>

View File

@@ -1,6 +0,0 @@
<NUnitProject>
<Settings activeconfig="Debug"/>
<Config name="Debug" binpath="mods/common">
<assembly path="OpenRA.Test.dll"/>
</Config>
</NUnitProject>

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>5</LangVersion>
<DebugSymbols>true</DebugSymbols>
@@ -19,24 +19,19 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\thirdparty\download\nunit.framework.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
<ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
<Private>False</Private>
</ProjectReference>
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit.Console" Version="3.11.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -14,7 +14,7 @@
<ExternalConsole>false</ExternalConsole>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>..\OpenRA.ruleset</CodeAnalysisRuleSet>
<Configurations>Release;Debug;Release-x86</Configurations>
<Configurations>Release;Debug</Configurations>
<ManagedExeLauncher Condition="('$(OS)' != 'Windows_NT')">mono </ManagedExeLauncher>
</PropertyGroup>
<ItemGroup>
@@ -25,7 +25,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release-x86'">
<PropertyGroup Condition="'$(TargetPlatform)' == 'win-x86'">
<Prefer32bit>true</Prefer32bit>
</PropertyGroup>
<ItemGroup>
@@ -34,6 +34,7 @@
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../stylecop.json" />
</ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">
@@ -46,4 +47,4 @@
<Exec Command="$(ManagedExeLauncher)&quot;$(TargetDir)OpenRA.PostProcess.exe&quot; &quot;$(TargetPath)&quot; -LAA" />
<Touch Files="$(IntermediateOutputPath)\$(TargetFileName).processed" AlwaysCreate="true" />
</Target>
</Project>
</Project>

View File

@@ -25,63 +25,44 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Release-x86|Any CPU = Release-x86|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.Build.0 = Release|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release|Any CPU.Build.0 = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Release-x86|Any CPU.Build.0 = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release|Any CPU.Build.0 = Release|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU
{F33337BE-CB69-4B24-850F-07D23E408DDF}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU
{76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Any CPU.Build.0 = Release|Any CPU
{76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU
{76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release|Any CPU.Build.0 = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Release-x86|Any CPU.Build.0 = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Any CPU.Build.0 = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release-x86|Any CPU.Build.0 = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.Build.0 = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.Build.0 = Release|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Release|Any CPU.Build.0 = Release|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}.Release-x86|Any CPU.Build.0 = Release|Any CPU
{EE63AF7E-92EA-48FB-81E2-53D7D92F8050}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE63AF7E-92EA-48FB-81E2-53D7D92F8050}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE63AF7E-92EA-48FB-81E2-53D7D92F8050}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE63AF7E-92EA-48FB-81E2-53D7D92F8050}.Release|Any CPU.Build.0 = Release|Any CPU
{EE63AF7E-92EA-48FB-81E2-53D7D92F8050}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU
{EE63AF7E-92EA-48FB-81E2-53D7D92F8050}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -9,43 +9,8 @@ environment:
install:
cache:
- thirdparty\download -> thirdparty\fetch-thirdparty-deps.ps1
before_build:
- make dependencies
build:
project: OpenRA.sln
verbosity: minimal
after_build:
- ps: |
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True")
{
cov-build.exe --dir cov-int make all
nuget.exe install PublishCoverity -ExcludeVersion
PublishCoverity\tools\PublishCoverity.exe compress -o coverity.zip -i cov-int
$version = Get-Date -format s
PublishCoverity\tools\PublishCoverity.exe publish `
-t "$env:CoverityProjectToken" `
-e "$env:CoverityNotificationEmail" `
-r "$env:APPVEYOR_REPO_NAME" `
-z coverity.zip `
-d "AppVeyor scheduled build ($env:APPVEYOR_BUILD_VERSION)." `
--codeVersion "$version"
}
before_test:
- ps: |
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True")
{
choco install resharper-clt -y
dupFinder /output=dupReport.xml /show-text OpenRA.sln
choco install xmlstarlet -y
xml transform dupFinder.xslt dupReport.xml > dupReport.html
choco install pandoc -y
}
build_script:
- make all
test_script:
- nunit3-console OpenRA.Test.dll --result=myresults.xml;format=AppVeyor
@@ -67,7 +32,7 @@ after_test:
- ps: cp packaging\windows\Dune2000.ico .
- if defined APPVEYOR_REPO_TAG_NAME set VERSION=%APPVEYOR_REPO_TAG_NAME%
- if not defined APPVEYOR_REPO_TAG_NAME set VERSION=%APPVEYOR_REPO_COMMIT:~0,7%
- '"C:\Program Files (x86)\NSIS\makensis.exe" /DSRCDIR="%APPVEYOR_BUILD_FOLDER%" /DDEPSDIR="%APPVEYOR_BUILD_FOLDER%\thirdparty\download\windows" /DTAG="git-%VERSION%" /DSUFFIX=" (dev)" /V3 packaging/windows/OpenRA.nsi'
- '"C:\Program Files (x86)\NSIS\makensis.exe" /DSRCDIR="%APPVEYOR_BUILD_FOLDER%" /DTAG="git-%VERSION%" /DSUFFIX=" (dev)" /V3 packaging/windows/OpenRA.nsi'
- move /Y %APPVEYOR_BUILD_FOLDER%\packaging\windows\OpenRA.Setup.exe %APPVEYOR_BUILD_FOLDER%\OpenRA-%VERSION%.exe
artifacts:

51
configure-system-libraries.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/sh
# Patch *.dll.config files to use system libraries, working around issues with directories and naming schemes
####
# This file must stay /bin/sh and POSIX compliant for macOS and BSD portability.
# Copy-paste the entire script into http://shellcheck.net to check.
####
patch_config()
{
LABEL=$1
SEARCHDIRS=$2
CONFIG=$3
REPLACE=$4
SEARCH=$5
# Exit early if the file has already been patched
grep -q "target=\"${REPLACE}\"" "${CONFIG}" || return 0
printf "Searching for %s... " "${LABEL}"
for DIR in ${SEARCHDIRS} ; do
for LIB in ${SEARCH}; do
if [ -f "${DIR}/${LIB}" ]; then
echo "${LIB}"
sed "s|target=\"${REPLACE}\"|target=\"${DIR}/${LIB}\"|" "${CONFIG}" > "${CONFIG}.temp"
mv "${CONFIG}.temp" "${CONFIG}"
return 0
fi
done
done
echo "FAILED"
echo "OpenRA expects to find a file matching \"${SEARCH}\" in one of the following locations:"
echo "${SEARCHDIRS}"
exit 1
}
if [ "$(uname -s)" = "Darwin" ]; then
SEARCHDIRS="/usr/local/lib /usr/local/opt/openal-soft/lib"
patch_config "Lua 5.1" "${SEARCHDIRS}" Eluant.dll.config lua51.dylib liblua5.1.dylib
patch_config SDL2 "${SEARCHDIRS}" SDL2-CS.dll.config SDL2.dylib libSDL2-2.0.0.dylib
patch_config OpenAL "${SEARCHDIRS}" OpenAL-CS.Core.dll.config soft_oal.dylib libopenal.1.dylib
patch_config FreeType "${SEARCHDIRS}" OpenRA.Platforms.Default.dll.config freetype6.dylib libfreetype.6.dylib
else
SEARCHDIRS="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/arm-linux-gnueabihf /usr/lib/aarch64-linux-gnu /usr/lib/powerpc64le-linux-gnu /usr/lib/mipsel-linux-gnu /usr/local/lib /opt/lib /opt/local/lib /app/lib"
patch_config "Lua 5.1" "${SEARCHDIRS}" Eluant.dll.config lua51.so "liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
patch_config SDL2 "${SEARCHDIRS}" SDL2-CS.dll.config SDL2.so "libSDL2-2.0.so.0 libSDL2-2.0.so libSDL2.so"
patch_config OpenAL "${SEARCHDIRS}" OpenAL-CS.Core.dll.config soft_oal.so "libopenal.so.1 libopenal.so"
patch_config FreeType "${SEARCHDIRS}" OpenRA.Platforms.Default.dll.config freetype6.so "libfreetype.so.6 libfreetype.so"
fi

View File

@@ -10,8 +10,6 @@ function All-Command
return
}
Dependencies-Command
dotnet build /p:Configuration=Release /nologo
if ($lastexitcode -ne 0)
{
@@ -101,27 +99,6 @@ function Version-Command
}
}
function Dependencies-Command
{
cd thirdparty
./fetch-thirdparty-deps.ps1
cp download/*.dll ..
cp download/windows/*.dll ..
cd ..
Write-Host "Dependencies copied." -ForegroundColor Cyan
if ((CheckForDotnet) -eq 1)
{
return
}
dotnet restore /nologo
if ($lastexitcode -ne 0)
{
Write-Host "Project restoration failed." -ForegroundColor Red
}
}
function Test-Command
{
if ((CheckForUtility) -eq 1)
@@ -244,7 +221,6 @@ if ($args.Length -eq 0)
Write-Host "Command list:"
Write-Host ""
Write-Host " all, a Builds the game and its development tools."
Write-Host " dependencies, d Copies the game's dependencies into the main game folder."
Write-Host " version, v Sets the version strings for the default mods to the"
Write-Host " latest version for the current Git branch."
Write-Host " clean, c Removes all built and copied files. Use the 'all' and"
@@ -270,7 +246,6 @@ if ($command.Length -gt 1)
switch ($execute)
{
{"all", "a" -contains $_} { All-Command }
{"dependencies", "d" -contains $_} { Dependencies-Command }
{"version", "v" -contains $_} { Version-Command }
{"clean", "c" -contains $_} { Clean-Command }
{"test", "t" -contains $_} { Test-Command }

View File

@@ -7,7 +7,7 @@ command -v python >/dev/null 2>&1 || { echo >&2 "Linux packaging requires python
command -v tar >/dev/null 2>&1 || { echo >&2 "Linux packaging requires tar."; exit 1; }
command -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 "Linux packaging requires curl or wget."; exit 1; }
DEPENDENCIES_TAG="20200222"
DEPENDENCIES_TAG="20200328"
if [ $# -eq "0" ]; then
echo "Usage: $(basename "$0") version [outputdir]"
@@ -48,24 +48,21 @@ pushd "${SRCDIR}" > /dev/null || exit 1
make clean
# linux-dependencies target will trigger the lua detection script, which we don't want during packaging
make cli-dependencies
sed "s/@LIBLUA51@/liblua5.1.so.0/" thirdparty/Eluant.dll.config.in > Eluant.dll.config
make core
make core TARGETPLATFORM=linux-x64
make version VERSION="${TAG}"
make install-engine prefix="usr" DESTDIR="${BUILTDIR}/"
make install-common-mod-files prefix="usr" DESTDIR="${BUILTDIR}/"
make install-dependencies TARGETPLATFORM=linux-x64 prefix="usr" DESTDIR="${BUILTDIR}/"
popd > /dev/null || exit 1
# Add native libraries
echo "Downloading dependencies"
if command -v curl >/dev/null 2>&1; then
curl -s -L -O https://github.com/OpenRA/AppImageSupport/releases/download/${DEPENDENCIES_TAG}/libs.tar.bz2 || exit 3
curl -s -L -O https://github.com/OpenRA/AppImageSupport/releases/download/${DEPENDENCIES_TAG}/mono.tar.bz2 || exit 3
curl -s -L -O https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage || exit 3
else
wget -cq https://github.com/OpenRA/AppImageSupport/releases/download/${DEPENDENCIES_TAG}/libs.tar.bz2 || exit 3
wget -cq https://github.com/OpenRA/AppImageSupport/releases/download/${DEPENDENCIES_TAG}/mono.tar.bz2 || exit 3
wget -cq https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage || exit 3
fi
@@ -74,23 +71,24 @@ chmod a+x appimagetool-x86_64.AppImage
echo "Building AppImage"
mkdir libs
pushd libs
tar xf ../libs.tar.bz2
tar xf ../mono.tar.bz2
install -d "${BUILTDIR}/usr/bin"
install -d "${BUILTDIR}/etc/mono/4.5"
install -d "${BUILTDIR}/usr/lib/mono/4.5"
install -d "${BUILTDIR}/usr/lib/mono/4.5/Facades"
install -Dm 0755 usr/bin/mono "${BUILTDIR}/usr/bin/"
install -Dm 0644 /etc/mono/config "${BUILTDIR}/etc/mono/"
install -Dm 0644 /etc/mono/4.5/machine.config "${BUILTDIR}/etc/mono/4.5"
for f in $(ls usr/lib/mono/4.5/Facades/*.dll); do install -Dm 0644 "$f" "${BUILTDIR}/usr/lib/mono/4.5/Facades/"; done
for f in $(ls usr/lib/mono/4.5/*.dll usr/lib/mono/4.5/*.exe); do install -Dm 0644 "$f" "${BUILTDIR}/usr/lib/mono/4.5/"; done
for f in $(ls usr/lib/*.so usr/lib/*.so.*); do install -Dm 0755 "$f" "${BUILTDIR}/usr/lib/"; done
for f in $(ls usr/lib/*.so); do install -Dm 0755 "$f" "${BUILTDIR}/usr/lib/"; done
popd
rm -rf libs libs.tar.bz2
rm -rf libs mono.tar.bz2
build_appimage() {
MOD_ID=${1}

View File

@@ -13,7 +13,7 @@
# MACOS_DEVELOPER_PASSWORD: App-specific password for the developer account
#
LAUNCHER_TAG="osx-launcher-20200316"
LAUNCHER_TAG="osx-launcher-20200328"
if [ $# -ne "2" ]; then
echo "Usage: $(basename "$0") tag outputdir"
@@ -92,10 +92,10 @@ echo "Building core files"
pushd "${SRCDIR}" > /dev/null || exit 1
make clean
make osx-dependencies
make core
make core TARGETPLATFORM=osx-x64
make version VERSION="${TAG}"
make install-core gameinstalldir="/Contents/Resources/" DESTDIR="${BUILTDIR}/OpenRA.app"
make install-dependencies TARGETPLATFORM=osx-x64 gameinstalldir="/Contents/Resources/" DESTDIR="${BUILTDIR}/OpenRA.app"
popd > /dev/null || exit 1
populate_bundle "OpenRA - Red Alert.app" "ra" "Red Alert"

View File

@@ -129,15 +129,15 @@ Section "Game" GAME
File "${SRCDIR}\TiberianDawn.ico"
File "${SRCDIR}\Dune2000.ico"
File "${SRCDIR}\SDL2-CS.dll"
File "${SRCDIR}\OpenAL-CS.dll"
File "${SRCDIR}\OpenAL-CS.Core.dll"
File "${SRCDIR}\global mix database.dat"
File "${SRCDIR}\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP"
File "${SRCDIR}\eluant.dll"
File "${SRCDIR}\rix0rrr.BeaconLib.dll"
File "${DEPSDIR}\soft_oal.dll"
File "${DEPSDIR}\SDL2.dll"
File "${DEPSDIR}\freetype6.dll"
File "${DEPSDIR}\lua51.dll"
File "${SRCDIR}\BeaconLib.dll"
File "${SRCDIR}\soft_oal.dll"
File "${SRCDIR}\SDL2.dll"
File "${SRCDIR}\freetype6.dll"
File "${SRCDIR}\lua51.dll"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
@@ -191,9 +191,9 @@ Section "-DotNet" DotNet
; https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "Release"
IfErrors error 0
IntCmp $0 394254 done error done
IntCmp $0 461808 done error done
error:
MessageBox MB_OK ".NET Framework v4.6.1 or later is required to run OpenRA."
MessageBox MB_OK ".NET Framework v4.7.2 or later is required to run OpenRA."
Abort
done:
SectionEnd
@@ -255,8 +255,8 @@ Function ${UN}Clean
Delete $INSTDIR\eluant.dll
Delete $INSTDIR\freetype6.dll
Delete $INSTDIR\SDL2-CS.dll
Delete $INSTDIR\OpenAL-CS.dll
Delete $INSTDIR\rix0rrr.BeaconLib.dll
Delete $INSTDIR\OpenAL-CS.Core.dll
Delete $INSTDIR\BeaconLib.dll
RMDir /r $INSTDIR\Support
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}"

View File

@@ -39,19 +39,21 @@ function build_platform()
{
echo "Building core files ($1)"
if [ "$1" = "x86" ]; then
TARGETPLATFORM="TARGETPLATFORM=win-x86"
IS_WIN32="WIN32=true"
USE_PROGRAMFILES32="-DUSE_PROGRAMFILES32=true"
else
IS_WIN32="WIN32=false"
TARGETPLATFORM="TARGETPLATFORM=win-x64"
USE_PROGRAMFILES32=""
fi
pushd "${SRCDIR}" > /dev/null || exit 1
make clean
make windows-dependencies "${IS_WIN32}"
make core "${IS_WIN32}"
make core "${TARGETPLATFORM}" "${IS_WIN32}"
make version VERSION="${TAG}"
make install-core gameinstalldir="" DESTDIR="${BUILTDIR}"
make install-core "${TARGETPLATFORM}" gameinstalldir="" DESTDIR="${BUILTDIR}"
make install-dependencies "${TARGETPLATFORM}" gameinstalldir="" DESTDIR="${BUILTDIR}"
popd > /dev/null || exit 1
echo "Compiling Windows launchers ($1)"

View File

@@ -1,3 +0,0 @@
<configuration>
<dllmap dll="lua51.dll" target="@LIBLUA51@" />
</configuration>

View File

@@ -1,32 +0,0 @@
#!/bin/sh
# Use BSD/Linux system dependencies where possible, but take into account different .so names.
####
# This file must stay /bin/sh and POSIX compliant for BSD portability.
# Copy-paste the entire script into http://shellcheck.net to check.
####
locations="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/arm-linux-gnueabihf /usr/lib/aarch64-linux-gnu /usr/lib/powerpc64le-linux-gnu /usr/lib/mipsel-linux-gnu /usr/local/lib /opt/lib /opt/local/lib /app/lib"
sonames="liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
if [ -f Eluant.dll.config ]; then
exit 0
fi
for location in $locations ; do
for soname in $sonames ; do
if [ -f "$location/$soname" ]; then
liblua51=$soname
echo "Detected Lua 5.1 library at $location/$soname"
break 2
fi
done
done
if [ -z "$liblua51" ]; then
echo "Lua 5.1 library detection failed."
exit 1
else
sed "s/@LIBLUA51@/${liblua51}/" thirdparty/Eluant.dll.config.in > Eluant.dll.config
echo "Eluant.dll.config has been created successfully."
fi

View File

@@ -1,32 +0,0 @@
#!/bin/bash
LAUNCHER_TAG="osx-launcher-20200316"
download_dir="${0%/*}/download/osx"
mkdir -p "$download_dir"
cd "$download_dir" || exit 1
if [ ! -f libSDL2.dylib ]; then
echo "Fetching OS X SDL2 library from GitHub."
curl -LOs https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/libSDL2.dylib
fi
if [ ! -f liblua.5.1.dylib ]; then
echo "Fetching OS X Lua 5.1 library from GitHub."
curl -LOs https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/liblua.5.1.dylib
fi
if [ ! -f Eluant.dll.config ]; then
echo "Fetching OS X Lua configuration file from GitHub."
curl -LOs https://raw.githubusercontent.com/OpenRA/OpenRALauncherOSX/${LAUNCHER_TAG}/Eluant.dll.config
fi
if [ ! -f libfreetype.6.dylib ]; then
echo "Fetching OS X FreeType library from GitHub."
curl -LOs https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/libfreetype.6.dylib
fi
if [ ! -f libopenal.1.dylib ]; then
echo "Fetching OS X OpenAL Soft library from GitHub."
curl -LOs https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/libopenal.1.dylib
fi

View File

@@ -1,65 +0,0 @@
#!/bin/bash
# Die on any error for Travis CI to automatically retry:
set -e
if [ $# -ne "1" ]; then
echo "Usage: $(basename "$0") (32|64)"
exit 1
fi
if [ "$1" != "x86" ] && [ "$1" != "x64" ]; then
echo "Usage: $(basename "$0") (32|64)"
exit 1
fi
download_dir="${0%/*}/download/windows"
mkdir -p "${download_dir}"
cd "${download_dir}" || exit 1
if [ ! -f SDL2.dll ]; then
echo "Fetching SDL2 from libsdl.org"
if [ "$1" = "x86" ]; then
curl -LOs https://www.libsdl.org/release/SDL2-2.0.10-win32-x86.zip
unzip SDL2-2.0.10-win32-x86.zip SDL2.dll
rm SDL2-2.0.10-win32-x86.zip
else
curl -LOs https://www.libsdl.org/release/SDL2-2.0.10-win32-x64.zip
unzip SDL2-2.0.10-win32-x64.zip SDL2.dll
rm SDL2-2.0.10-win32-x64.zip
fi
fi
if [ ! -f freetype6.dll ]; then
echo "Fetching FreeType2 from NuGet"
../../noget.sh SharpFont.Dependencies 2.6.0
if [ "$1" = "x86" ]; then
cp ./SharpFont.Dependencies/bin/msvc9/x86/freetype6.dll .
else
cp ./SharpFont.Dependencies/bin/msvc9/x64/freetype6.dll .
fi
rm -rf SharpFont.Dependencies
fi
if [ ! -f lua51.dll ]; then
echo "Fetching Lua 5.1 from NuGet"
../../noget.sh lua.binaries 5.1.5
if [ "$1" = "x86" ]; then
cp ./lua.binaries/bin/win32/dll8/lua5.1.dll ./lua51.dll
else
cp ./lua.binaries/bin/win64/dll8/lua5.1.dll ./lua51.dll
fi
rm -rf lua.binaries
fi
if [ ! -f soft_oal.dll ]; then
echo "Fetching OpenAL Soft from NuGet"
../../noget.sh OpenAL-Soft 1.16.0
if [ "$1" = "x86" ]; then
cp ./OpenAL-Soft/bin/Win32/soft_oal.dll ./soft_oal.dll
else
cp ./OpenAL-Soft/bin/Win64/soft_oal.dll ./soft_oal.dll
fi
rm -rf OpenAL-Soft
fi

View File

@@ -1,122 +0,0 @@
mkdir download/windows -Force >$null
cd download
if (!(Test-Path "nuget.exe"))
{
echo "Fetching NuGet."
# Work around PowerShell's Invoke-WebRequest not being available on some versions of PowerShell by using the BCL.
# To do that we need to work around further and use absolute paths because DownloadFile is not aware of PowerShell's current directory.
$target = Join-Path $pwd.ToString() "nuget.exe"
(New-Object System.Net.WebClient).DownloadFile("https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", $target)
}
if (!(Test-Path "ICSharpCode.SharpZipLib.dll"))
{
echo "Fetching ICSharpCode.SharpZipLib from NuGet."
./nuget.exe install SharpZipLib -Version 1.1.0 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp SharpZipLib/lib/net45/ICSharpCode.SharpZipLib.dll .
rmdir SharpZipLib -Recurse
}
if (!(Test-Path "nunit.framework.dll"))
{
echo "Fetching NUnit from NuGet."
./nuget.exe install NUnit -Version 3.0.1 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp NUnit/lib/net40/nunit.framework* .
rmdir NUnit -Recurse
}
if (!(Test-Path "windows/SDL2.dll"))
{
echo "Fetching SDL2 from libsdl.org"
# Download zip:
$zipFileName = "SDL2-2.0.10-win32-x64.zip"
$target = Join-Path $pwd.ToString() $zipFileName
(New-Object System.Net.WebClient).DownloadFile("https://www.libsdl.org/release/" + $zipFileName, $target)
# Extract zip:
$shell_app=new-object -com shell.application
$currentPath = (Get-Location).Path
$zipFile = $shell_app.namespace($currentPath + "\$zipFileName")
$destination = $shell_app.namespace($currentPath + "\windows")
$destination.Copyhere($zipFile.items())
# Remove junk files:
rm "$zipFileName"
rm -path "$currentPath\windows\README-SDL.txt"
}
if (!(Test-Path "Open.Nat.dll"))
{
echo "Fetching Open.Nat from NuGet."
./nuget.exe install Open.Nat -Version 2.1.0 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp Open.Nat/lib/net45/Open.Nat.dll .
rmdir Open.Nat -Recurse
}
if (!(Test-Path "windows/lua51.dll"))
{
echo "Fetching Lua 5.1 from NuGet."
./nuget.exe install lua.binaries -Version 5.1.5 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp lua.binaries/bin/win64/dll8/lua5.1.dll ./windows/lua51.dll
rmdir lua.binaries -Recurse
}
if (!(Test-Path "windows/freetype6.dll"))
{
echo "Fetching FreeType2 from NuGet."
./nuget.exe install SharpFont.Dependencies -Version 2.6.0 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp SharpFont.Dependencies/bin/msvc9/x64/freetype6.dll ./windows/freetype6.dll
rmdir SharpFont.Dependencies -Recurse
}
if (!(Test-Path "windows/soft_oal.dll"))
{
echo "Fetching OpenAL Soft from NuGet."
./nuget.exe install OpenAL-Soft -Version 1.16.0 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp OpenAL-Soft/bin/Win64/soft_oal.dll windows/soft_oal.dll
rmdir OpenAL-Soft -Recurse
}
if (!(Test-Path "FuzzyLogicLibrary.dll"))
{
echo "Fetching FuzzyLogicLibrary from NuGet."
./nuget.exe install FuzzyLogicLibrary -Version 1.2.0 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp FuzzyLogicLibrary/bin/Release/FuzzyLogicLibrary.dll .
rmdir FuzzyLogicLibrary -Recurse
}
if (!(Test-Path "rix0rrr.BeaconLib.dll"))
{
echo "Fetching rix0rrr.BeaconLib from NuGet."
./nuget.exe install rix0rrr.BeaconLib -Version 1.0.1 -ExcludeVersion -Verbosity quiet -Source nuget.org
cp rix0rrr.BeaconLib/lib/net40/rix0rrr.BeaconLib.dll .
rmdir rix0rrr.BeaconLib -Recurse
}
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
if (!(Test-Path "SDL2-CS.dll"))
{
echo "Fetching SDL2-CS from GitHub."
$target = Join-Path $pwd.ToString() "SDL2-CS.dll"
(New-Object System.Net.WebClient).DownloadFile("https://github.com/OpenRA/SDL2-CS/releases/download/20190907/SDL2-CS.dll", $target)
}
if (!(Test-Path "OpenAL-CS.dll"))
{
echo "Fetching OpenAL-CS from GitHub."
$target = Join-Path $pwd.ToString() "OpenAL-CS.dll"
(New-Object System.Net.WebClient).DownloadFile("https://github.com/OpenRA/OpenAL-CS/releases/download/20190907/OpenAL-CS.dll", $target)
}
if (!(Test-Path "Eluant.dll"))
{
echo "Fetching Eluant from GitHub."
$target = Join-Path $pwd.ToString() "Eluant.dll"
(New-Object System.Net.WebClient).DownloadFile("https://github.com/OpenRA/Eluant/releases/download/20160124/Eluant.dll", $target)
}
cd ..

View File

@@ -1,89 +0,0 @@
#!/bin/sh
####
# This file must stay /bin/sh and POSIX compliant for BSD portability.
# Copy-paste the entire script into http://shellcheck.net to check.
####
# Die on any error for Travis CI to automatically retry:
set -e
download_dir="${0%/*}/download"
mkdir -p "${download_dir}"
cd "${download_dir}" || exit 1
if [ ! -f ICSharpCode.SharpZipLib.dll ]; then
echo "Fetching ICSharpCode.SharpZipLib from NuGet"
../noget.sh SharpZipLib 1.1.0
cp ./SharpZipLib/lib/net45/ICSharpCode.SharpZipLib.dll .
rm -rf SharpZipLib
fi
if [ ! -f nunit.framework.dll ]; then
echo "Fetching NUnit from NuGet"
../noget.sh NUnit 3.0.1
cp ./NUnit/lib/net40/nunit.framework* .
rm -rf NUnit
fi
if [ ! -f nunit3-console.exe ]; then
echo "Fetching NUnit.Console from NuGet"
../noget.sh NUnit.Console 3.0.1
cp -R ./NUnit.Console/tools/* .
chmod +x nunit3-console.exe
rm -rf NUnit.Console
fi
if [ ! -f Open.Nat.dll ]; then
echo "Fetching Open.Nat from NuGet"
../noget.sh Open.Nat 2.1.0
if [ -d ./Open.NAT ]; then mv Open.NAT Open.Nat; fi
cp ./Open.Nat/lib/net45/Open.Nat.dll .
rm -rf Open.Nat
fi
if [ ! -f FuzzyLogicLibrary.dll ]; then
echo "Fetching FuzzyLogicLibrary from NuGet."
../noget.sh FuzzyLogicLibrary 1.2.0
cp ./FuzzyLogicLibrary/bin/Release/FuzzyLogicLibrary.dll .
rm -rf FuzzyLogicLibrary
fi
if [ ! -f SDL2-CS.dll ] || [ ! -f SDL2-CS.dll.config ]; then
echo "Fetching SDL2-CS from GitHub."
if command -v curl >/dev/null 2>&1; then
curl -s -L -O https://github.com/OpenRA/SDL2-CS/releases/download/20190907/SDL2-CS.dll
curl -s -L -O https://github.com/OpenRA/SDL2-CS/releases/download/20190907/SDL2-CS.dll.config
else
wget -cq https://github.com/OpenRA/SDL2-CS/releases/download/20190907/SDL2-CS.dll
wget -cq https://github.com/OpenRA/SDL2-CS/releases/download/20190907/SDL2-CS.dll.config
fi
fi
if [ ! -f OpenAL-CS.dll ] || [ ! -f OpenAL-CS.dll.config ]; then
echo "Fetching OpenAL-CS from GitHub."
if command -v curl >/dev/null 2>&1; then
curl -s -L -O https://github.com/OpenRA/OpenAL-CS/releases/download/20200316/OpenAL-CS.dll
curl -s -L -O https://github.com/OpenRA/OpenAL-CS/releases/download/20200316/OpenAL-CS.dll.config
else
wget -cq https://github.com/OpenRA/OpenAL-CS/releases/download/20200316/OpenAL-CS.dll
wget -cq https://github.com/OpenRA/OpenAL-CS/releases/download/20200316/OpenAL-CS.dll.config
fi
fi
if [ ! -f Eluant.dll ]; then
echo "Fetching Eluant from GitHub."
if command -v curl >/dev/null 2>&1; then
curl -s -L -O https://github.com/OpenRA/Eluant/releases/download/20160124/Eluant.dll
else
wget -cq https://github.com/OpenRA/Eluant/releases/download/20160124/Eluant.dll
fi
fi
if [ ! -f rix0rrr.BeaconLib.dll ]; then
echo "Fetching rix0rrr.BeaconLib from NuGet."
../noget.sh rix0rrr.BeaconLib 1.0.1
cp ./rix0rrr.BeaconLib/lib/net40/rix0rrr.BeaconLib.dll .
rm -rf rix0rrr.BeaconLib
fi

19
thirdparty/noget.sh vendored
View File

@@ -1,19 +0,0 @@
#!/bin/sh
# fallback without dependency resolution if nuget is not present on the system
####
# This file must stay /bin/sh and POSIX compliant for BSD portability.
# Copy-paste the entire script into http://shellcheck.net to check.
####
command -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 "Obtaining thirdparty dependencies requires curl or wget."; exit 1; }
archive="$1"
version="$2"
if command -v curl >/dev/null 2>&1; then
curl -o "$archive.zip" -Ls https://nuget.org/api/v2/package/"$archive"/"$version"
else
wget -cq https://nuget.org/api/v2/package/"$archive"/"$version" -O "$archive.zip"
fi
mkdir -p "$archive"
unzip -o -qq "$archive.zip" -d "$archive" && rm "$archive.zip"