Create Mods.Common
Create a small base for Mods.Common and update solution and makefile to use it
This commit is contained in:
17
Makefile
17
Makefile
@@ -109,17 +109,27 @@ rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
|
||||
PROGRAMS += rsdl2 rnull
|
||||
renderers: $(rsdl2_TARGET) $(rnull_TARGET)
|
||||
|
||||
# Mods Common
|
||||
mod_common_SRCS := $(shell find OpenRA.Mods.Common/ -iname '*.cs')
|
||||
mod_common_TARGET = mods/common/OpenRA.Mods.Common.dll
|
||||
mod_common_KIND = library
|
||||
mod_common_DEPS = $(game_TARGET)
|
||||
mod_common_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS)
|
||||
PROGRAMS += mod_common
|
||||
mod_common: $(mod_common_TARGET)
|
||||
|
||||
##### Official Mods #####
|
||||
|
||||
STD_MOD_LIBS = $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll
|
||||
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
|
||||
|
||||
|
||||
# Red Alert
|
||||
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
|
||||
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
|
||||
mod_ra_KIND = library
|
||||
mod_ra_DEPS = $(STD_MOD_DEPS) $(irc_TARGET)
|
||||
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(irc_TARGET)
|
||||
mod_ra_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) $(irc_TARGET)
|
||||
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(irc_TARGET)
|
||||
PROGRAMS += mod_ra
|
||||
mod_ra: $(mod_ra_TARGET)
|
||||
|
||||
@@ -260,7 +270,7 @@ tools: editor tsbuild crashdialog
|
||||
|
||||
package: dependencies core editor crashdialog docs version
|
||||
|
||||
mods: mod_ra mod_cnc mod_d2k mod_ts
|
||||
mods: mod_common mod_ra mod_cnc mod_d2k mod_ts
|
||||
|
||||
all: cli-dependencies core tools
|
||||
|
||||
@@ -307,6 +317,7 @@ install-core: default
|
||||
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
|
||||
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)/mods"
|
||||
@$(CP_R) mods/common "$(DATA_INSTALL_DIR)/mods/"
|
||||
@$(INSTALL_PROGRAM) $(mod_common_TARGET) "$(DATA_INSTALL_DIR)/mods/common"
|
||||
@$(CP_R) mods/cnc "$(DATA_INSTALL_DIR)/mods/"
|
||||
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) "$(DATA_INSTALL_DIR)/mods/cnc"
|
||||
@$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
|
||||
|
||||
57
OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
Normal file
57
OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenRA.Mods.Common</RootNamespace>
|
||||
<AssemblyName>OpenRA.Mods.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||
<Project>{0dfb103f-2962-400f-8c6d-e2c28ccba633}</Project>
|
||||
<Name>OpenRA.Game</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ServerTraits\ColorValidator.cs" />
|
||||
<Compile Include="ServerTraits\MasterServerPinger.cs" />
|
||||
<Compile Include="ServerTraits\PlayerPinger.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>mkdir "$(SolutionDir)mods/common/"
|
||||
copy "$(TargetPath)" "$(SolutionDir)mods/common/"
|
||||
cd "$(SolutionDir)thirdparty/"
|
||||
copy "FuzzyLogicLibrary.dll" "$(SolutionDir)"
|
||||
cd "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Network;
|
||||
using OpenRA.Server;
|
||||
using S = OpenRA.Server.Server;
|
||||
|
||||
namespace OpenRA.Mods.RA.Server
|
||||
namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
public class ColorValidator : ServerTrait, IClientJoined
|
||||
{
|
||||
@@ -16,7 +16,7 @@ using System.Text;
|
||||
using OpenRA.Server;
|
||||
using S = OpenRA.Server.Server;
|
||||
|
||||
namespace OpenRA.Mods.RA.Server
|
||||
namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
public class MasterServerPinger : ServerTrait, ITick, INotifySyncLobbyInfo, IStartGame, IEndGame
|
||||
{
|
||||
@@ -12,7 +12,7 @@ using System;
|
||||
using OpenRA.Server;
|
||||
using S = OpenRA.Server.Server;
|
||||
|
||||
namespace OpenRA.Mods.RA.Server
|
||||
namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
public class PlayerPinger : ServerTrait, ITick
|
||||
{
|
||||
@@ -294,7 +294,6 @@
|
||||
<Compile Include="Scripting\Properties\GuardProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\PlayerProperties.cs" />
|
||||
<Compile Include="Power\ScalePowerWithHealth.cs" />
|
||||
<Compile Include="ServerTraits\ColorValidator.cs" />
|
||||
<Compile Include="Warheads\DestroyResourceWarhead.cs" />
|
||||
<Compile Include="Warheads\CreateEffectWarhead.cs" />
|
||||
<Compile Include="Warheads\CreateResourceWarhead.cs" />
|
||||
@@ -350,7 +349,6 @@
|
||||
<Compile Include="SelfHealing.cs" />
|
||||
<Compile Include="Sellable.cs" />
|
||||
<Compile Include="ServerTraits\LobbyCommands.cs" />
|
||||
<Compile Include="ServerTraits\MasterServerPinger.cs" />
|
||||
<Compile Include="ShroudPalette.cs" />
|
||||
<Compile Include="SmokeTrailWhenDamaged.cs" />
|
||||
<Compile Include="SpawnMPUnits.cs" />
|
||||
@@ -434,7 +432,6 @@
|
||||
<Compile Include="Activities\RepairBridge.cs" />
|
||||
<Compile Include="BridgeHut.cs" />
|
||||
<Compile Include="Lint\CheckSequences.cs" />
|
||||
<Compile Include="ServerTraits\PlayerPinger.cs" />
|
||||
<Compile Include="Widgets\Logic\SpawnSelectorTooltipLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ClientTooltipLogic.cs" />
|
||||
<Compile Include="Widgets\ColorMixerWidget.cs" />
|
||||
@@ -586,6 +583,10 @@
|
||||
<Project>{85B48234-8B31-4BE6-AF9C-665CC6866841}</Project>
|
||||
<Name>OpenRA.Irc</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
|
||||
<Project>{fe6c8cc0-2f07-442a-b29f-17617b3b7fc6}</Project>
|
||||
<Name>OpenRA.Mods.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
@@ -620,4 +621,4 @@ copy "FuzzyLogicLibrary.dll" "$(SolutionDir)"
|
||||
cd "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -16,6 +16,7 @@ using OpenRA.Graphics;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Server;
|
||||
using S = OpenRA.Server.Server;
|
||||
using OpenRA.Mods.Common.Server;
|
||||
|
||||
namespace OpenRA.Mods.RA.Server
|
||||
{
|
||||
|
||||
@@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Irc", "OpenRA.Irc\Op
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Sdl2", "OpenRA.Renderer.Sdl2\OpenRA.Renderer.Sdl2.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common Lua scripts", "Common Lua scripts", "{FCA943AB-E622-415E-8A61-639D97F62EEC}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
mods\common\lua\actor.lua = mods\common\lua\actor.lua
|
||||
@@ -79,6 +81,8 @@ Global
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|x86.Build.0 = Debug|x86
|
||||
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|x86.Build.0 = Debug|x86
|
||||
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|x86.Build.0 = Debug|x86
|
||||
{2881135D-4D62-493E-8F83-5EEE92CCC6BE}.Debug|x86.ActiveCfg = Debug|x86
|
||||
|
||||
@@ -69,6 +69,7 @@ Chrome:
|
||||
|
||||
Assemblies:
|
||||
mods/ra/OpenRA.Mods.RA.dll
|
||||
mods/common/OpenRA.Mods.Common.dll
|
||||
mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
mods/d2k/OpenRA.Mods.D2k.dll
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ Chrome:
|
||||
|
||||
Assemblies:
|
||||
mods/ra/OpenRA.Mods.RA.dll
|
||||
mods/common/OpenRA.Mods.Common.dll
|
||||
mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
mods/d2k/OpenRA.Mods.D2k.dll
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ Chrome:
|
||||
|
||||
Assemblies:
|
||||
mods/ra/OpenRA.Mods.RA.dll
|
||||
mods/common/OpenRA.Mods.Common.dll
|
||||
mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
mods/d2k/OpenRA.Mods.D2k.dll
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ Chrome:
|
||||
|
||||
Assemblies:
|
||||
mods/ra/OpenRA.Mods.RA.dll
|
||||
mods/common/OpenRA.Mods.Common.dll
|
||||
mods/d2k/OpenRA.Mods.D2k.dll
|
||||
mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
mods/ts/OpenRA.Mods.TS.dll
|
||||
|
||||
Reference in New Issue
Block a user