Provides automatic installation scripts for OpenRA with Tiberian Sun & Red Alert 2 + Dune 2 (Windows, Linux)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

257 lines
11 KiB

8 years ago
  1. --- a/Makefile
  2. +++ b/Makefile
  3. @@ -42,7 +42,7 @@
  4. ############################## TOOLCHAIN ###############################
  5. #
  6. -CSC = mcs -sdk:4.0
  7. +CSC = mcs
  8. CSFLAGS = -nologo -warn:4 -codepage:utf8 -unsafe -warnaserror
  9. DEFINE = TRACE
  10. COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/Mono.Nat.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/MaxMind.GeoIP2.dll thirdparty/download/Eluant.dll thirdparty/download/SmarIrc4net.dll
  11. --- a/OpenRA.Mods.RA2/OpenRA.Mods.RA2.csproj
  12. +++ b/OpenRA.Mods.RA2/OpenRA.Mods.RA2.csproj
  13. @@ -1,33 +1,74 @@
  14. <?xml version="1.0" encoding="utf-8"?>
  15. -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
  16. +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  17. <PropertyGroup>
  18. - <ProjectGuid>{7E1263D2-BA04-48D0-85DB-26C68B782608}</ProjectGuid>
  19. <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  20. <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  21. + <ProductVersion>10.0.0</ProductVersion>
  22. + <SchemaVersion>2.0</SchemaVersion>
  23. + <ProjectGuid>{7E1263D2-BA04-48D0-85DB-26C68B782608}</ProjectGuid>
  24. <OutputType>Library</OutputType>
  25. <RootNamespace>OpenRA.Mods.RA2</RootNamespace>
  26. <AssemblyName>OpenRA.Mods.RA2</AssemblyName>
  27. - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  28. - <OutputPath>..</OutputPath>
  29. </PropertyGroup>
  30. - <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
  31. + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
  32. + <DebugSymbols>true</DebugSymbols>
  33. + <OutputPath>bin\Debug\</OutputPath>
  34. + <DefineConstants>TRACE;DEBUG</DefineConstants>
  35. <PlatformTarget>x86</PlatformTarget>
  36. + <ErrorReport>prompt</ErrorReport>
  37. + <CustomCommands>
  38. + <CustomCommands>
  39. + <Command type="AfterBuild" command="cp ${TargetFile} ../mods/ra2" workingdir="${ProjectDir}" />
  40. + <Command type="AfterBuild" command="cp ${TargetFile}.mdb ../mods/ra2" workingdir="${ProjectDir}" />
  41. + </CustomCommands>
  42. + </CustomCommands>
  43. + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  44. + <DebugType>full</DebugType>
  45. + <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  46. </PropertyGroup>
  47. - <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
  48. - <DebugSymbols>True</DebugSymbols>
  49. - <DebugType>Full</DebugType>
  50. - <Optimize>False</Optimize>
  51. - <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
  52. - <DefineConstants>DEBUG;TRACE</DefineConstants>
  53. - </PropertyGroup>
  54. - <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
  55. - <DebugSymbols>False</DebugSymbols>
  56. - <DebugType>None</DebugType>
  57. - <Optimize>True</Optimize>
  58. - <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
  59. + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
  60. + <DebugSymbols>true</DebugSymbols>
  61. + <OutputPath>bin\Release\</OutputPath>
  62. <DefineConstants>TRACE</DefineConstants>
  63. + <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  64. + <DebugType>pdbonly</DebugType>
  65. + <PlatformTarget>x86</PlatformTarget>
  66. + <ErrorReport>prompt</ErrorReport>
  67. + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  68. + <Optimize>true</Optimize>
  69. + <CustomCommands>
  70. + <CustomCommands>
  71. + <Command type="AfterBuild" command="cp ${TargetFile} ../mods/ra2" workingdir="${ProjectDir}" />
  72. + <Command type="AfterBuild" command="cp ${TargetFile}.mdb ../mods/ra2" workingdir="${ProjectDir}" />
  73. + </CustomCommands>
  74. + </CustomCommands>
  75. </PropertyGroup>
  76. <ItemGroup>
  77. + <Reference Include="System" />
  78. + <Reference Include="System.Core" />
  79. + <Reference Include="System.Drawing" />
  80. + <Reference Include="Eluant">
  81. + <HintPath>..\thirdparty\download\Eluant.dll</HintPath>
  82. + <Private>False</Private>
  83. + </Reference>
  84. + </ItemGroup>
  85. + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  86. + <ItemGroup>
  87. + <ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
  88. + <Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
  89. + <Name>OpenRA.Game</Name>
  90. + <Private>False</Private>
  91. + </ProjectReference>
  92. + <ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
  93. + <Project>{fe6c8cc0-2f07-442a-b29f-17617b3b7fc6}</Project>
  94. + <Name>OpenRA.Mods.Common</Name>
  95. + <Private>False</Private>
  96. + </ProjectReference>
  97. + </ItemGroup>
  98. + <ItemGroup>
  99. + <Compile Include="Stub.cs" />
  100. + </ItemGroup>
  101. + <ItemGroup>
  102. <Reference Include="Microsoft.CSharp">
  103. <RequiredTargetFramework>4.0</RequiredTargetFramework>
  104. </Reference>
  105. @@ -52,8 +93,9 @@
  106. <RequiredTargetFramework>3.5</RequiredTargetFramework>
  107. </Reference>
  108. </ItemGroup>
  109. - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  110. - <ItemGroup>
  111. - <Compile Include="Stub.cs" />
  112. - </ItemGroup>
  113. -</Project>
  114. + <PropertyGroup>
  115. + <PostBuildEvent>mkdir "$(SolutionDir)mods/ra2/"
  116. +copy "$(TargetPath)" "$(SolutionDir)mods/ra2/"
  117. +cd "$(SolutionDir)"</PostBuildEvent>
  118. + </PropertyGroup>
  119. +</Project>
  120. \ No newline at end of file
  121. --- a/Makefile
  122. +++ b/Makefile
  123. @@ -187,6 +187,15 @@
  124. PROGRAMS += mod_ts
  125. mod_ts: $(mod_ts_TARGET)
  126. +# Red Alert 2
  127. +mod_ra2_SRCS := $(shell find OpenRA.Mods.RA2/ -iname '*.cs')
  128. +mod_ra2_TARGET = mods/ra2/OpenRA.Mods.RA2.dll
  129. +mod_ra2_KIND = library
  130. +mod_ra2_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
  131. +mod_ra2_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
  132. +PROGRAMS += mod_ra2
  133. +mod_ra2: $(mod_ra2_TARGET)
  134. +
  135. check-scripts:
  136. @echo
  137. @echo "Checking for Lua syntax errors..."
  138. @@ -222,6 +231,9 @@
  139. @echo "Checking for code style violations in OpenRA.Mods.TS..."
  140. @mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.TS
  141. @echo
  142. + @echo "Checking for code style violations in OpenRA.Mods.RA2..."
  143. + @mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.RA2
  144. + @echo
  145. @echo "Checking for code style violations in OpenRA.Utility..."
  146. @mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Utility
  147. @echo
  148. @@ -255,6 +267,9 @@
  149. @echo "Testing Tiberian Sun mod MiniYAML..."
  150. @mono --debug OpenRA.Utility.exe ts --check-yaml
  151. @echo
  152. + @echo "Testing Red Alert 2 mod MiniYAML..."
  153. + @mono --debug OpenRA.Utility.exe ra2 --check-yaml
  154. + @echo
  155. @echo "Testing Dune 2000 mod MiniYAML..."
  156. @mono --debug OpenRA.Utility.exe d2k --check-yaml
  157. @echo
  158. @@ -320,7 +335,7 @@
  159. package: all-dependencies core tools docs version
  160. -mods: mod_common mod_ra mod_cnc mod_d2k mod_ts
  161. +mods: mod_common mod_ra mod_cnc mod_d2k mod_ts mod_ra2
  162. all: dependencies core tools
  163. @@ -389,6 +404,10 @@
  164. @$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/"
  165. @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) "$(DATA_INSTALL_DIR)/mods/d2k"
  166. @$(CP_R) mods/modchooser "$(DATA_INSTALL_DIR)/mods/"
  167. + @$(CP_R) mods/ts "$(DATA_INSTALL_DIR)/mods/"
  168. + @$(INSTALL_PROGRAM) $(mod_ts_TARGET) "$(DATA_INSTALL_DIR)/mods/ts"
  169. + @$(CP_R) mods/ra2 "$(DATA_INSTALL_DIR)/mods/"
  170. + @$(INSTALL_PROGRAM) $(mod_ra2_TARGET) "$(DATA_INSTALL_DIR)/mods/ra2"
  171. @$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat"
  172. @$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz"
  173. --- a/make.ps1
  174. +++ b/make.ps1
  175. @@ -136,6 +136,8 @@
  176. echo "Testing mods..."
  177. echo "Testing Tiberian Sun mod MiniYAML..."
  178. ./OpenRA.Utility.exe ts --check-yaml
  179. + echo "Testing Red Alert 2 mod MiniYAML..."
  180. + ./OpenRA.Utility.exe ra2 --check-yaml
  181. echo "Testing Dune 2000 mod MiniYAML..."
  182. ./OpenRA.Utility.exe d2k --check-yaml
  183. echo "Testing Tiberian Dawn mod MiniYAML..."
  184. @@ -170,6 +172,8 @@
  185. ./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.D2k
  186. echo "Checking for code style violations in OpenRA.Mods.TS..."
  187. ./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.TS
  188. + echo "Checking for code style violations in OpenRA.Mods.RA2..."
  189. + ./OpenRA.Utility.exe cnc --check-code-style OpenRA.Mods.RA2
  190. echo "Checking for code style violations in OpenRA.Utility..."
  191. ./OpenRA.Utility.exe cnc --check-code-style OpenRA.Utility
  192. echo "Checking for code style violations in OpenRA.Test..."
  193. --- a/mods/all/mod.yaml
  194. +++ b/mods/all/mod.yaml
  195. @@ -20,6 +20,7 @@
  196. d2k:OpenRA.Mods.D2k.dll
  197. ./mods/cnc/OpenRA.Mods.Cnc.dll
  198. ./mods/ts/OpenRA.Mods.TS.dll
  199. + ./mods/ts/OpenRA.Mods.RA2.dll
  200. ChromeLayout:
  201. --- a/mods/ra2/mod.yaml
  202. +++ b/mods/ra2mod.yaml
  203. @@ -5,7 +5,7 @@
  204. Author: RA2 team
  205. RequiresMods:
  206. - modchooser: {DEV_VERSION}
  207. +
  208. Folders:
  209. .
  210. --- a/OpenRA.sln
  211. +++ b/OpenRA.sln
  212. @@ -17,6 +17,8 @@
  213. EndProject
  214. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}"
  215. EndProject
  216. +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.RA2", "OpenRA.Mods.RA2\OpenRA.Mods.RA2.csproj", "{7E1263D2-BA04-48D0-85DB-26C68B782608}"
  217. +EndProject
  218. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Platforms.Default", "OpenRA.Platforms.Default\OpenRA.Platforms.Default.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}"
  219. EndProject
  220. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}"
  221. @@ -139,6 +141,10 @@
  222. {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|x86.Build.0 = Debug|x86
  223. {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|x86.ActiveCfg = Release|x86
  224. {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Release|x86.Build.0 = Release|x86
  225. + {7E1263D2-BA04-48D0-85DB-26C68B782608}.Debug|x86.ActiveCfg = Debug|x86
  226. + {7E1263D2-BA04-48D0-85DB-26C68B782608}.Debug|x86.Build.0 = Debug|x86
  227. + {7E1263D2-BA04-48D0-85DB-26C68B782608}.Release|x86.ActiveCfg = Release|x86
  228. + {7E1263D2-BA04-48D0-85DB-26C68B782608}.Release|x86.Build.0 = Release|x86
  229. {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|x86.ActiveCfg = Debug|x86
  230. {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|x86.Build.0 = Debug|x86
  231. {33D03738-C154-4028-8EA8-63A3C488A651}.Release|x86.ActiveCfg = Release|x86
  232. --- a/utility.cmd
  233. +++ b/utility.cmd
  234. @@ -16,6 +16,7 @@
  235. if /I "%mod%" EQU "ra" (goto help)
  236. if /I "%mod%" EQU "cnc" (goto help)
  237. if /I "%mod%" EQU "ts" (goto help)
  238. +if /I "%mod%" EQU "ra2" (goto help)
  239. if /I "%mod%" EQU "d2k" (goto help)
  240. echo.
  241. echo Unknown mod: %mod%