Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 125b0ba

Browse files
committed
Merge pull request #215 from richardTowers/mono-unix
Issue #341: Getting CCNet to build with mono under unix
2 parents 6890700 + 2294462 commit 125b0ba

File tree

6 files changed

+167
-39
lines changed

6 files changed

+167
-39
lines changed

Tools/NAnt/NAnt.exe.config

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,6 +3112,115 @@
31123112
</task>
31133113
</tasks>
31143114
</framework>
3115+
<framework
3116+
name="mono-4.5"
3117+
family="mono"
3118+
version="4.5"
3119+
description="Mono 4.5 Profile"
3120+
sdkdirectory="${toolDirectory}"
3121+
frameworkdirectory="${toolDirectory}"
3122+
frameworkassemblydirectory="${path::combine(prefix, 'lib/mono/4.5')}"
3123+
clrversion="4.0.30319"
3124+
clrtype="Desktop"
3125+
vendor="Mono"
3126+
>
3127+
<runtime>
3128+
<probing-paths>
3129+
<directory name="lib/mono/2.0" />
3130+
<directory name="lib/mono/neutral" />
3131+
<directory name="lib/common/2.0" />
3132+
<directory name="lib/common/neutral" />
3133+
</probing-paths>
3134+
<modes>
3135+
<auto>
3136+
<engine program="${path::combine(prefix, 'bin/mono')}" />
3137+
</auto>
3138+
<strict>
3139+
<engine program="${path::combine(prefix, 'bin/mono')}">
3140+
<arg value="--runtime=v4.0.30319" />
3141+
</engine>
3142+
</strict>
3143+
</modes>
3144+
</runtime>
3145+
<reference-assemblies basedir="${path::combine(prefix, 'lib/mono/4.5')}">
3146+
<include name="*.dll" />
3147+
</reference-assemblies>
3148+
<reference-assemblies basedir="${path::combine(prefix, 'lib/mono/4.0')}">
3149+
<include name="*.dll" />
3150+
</reference-assemblies>
3151+
<reference-assemblies basedir="${path::combine(prefix, 'lib/mono/3.5')}">
3152+
<include name="*.dll" />
3153+
</reference-assemblies>
3154+
<reference-assemblies basedir="${path::combine(prefix, 'lib/mono/3.0')}">
3155+
<include name="*.dll" />
3156+
</reference-assemblies>
3157+
<reference-assemblies basedir="${path::combine(prefix, 'lib/mono/2.0')}">
3158+
<include name="*.dll" />
3159+
</reference-assemblies>
3160+
<task-assemblies>
3161+
<!-- include Mono version-neutral assemblies -->
3162+
<include name="extensions/mono/neutral/**/*.dll" />
3163+
<!-- include Mono 2.0 specific assemblies -->
3164+
<include name="extensions/mono/2.0/**/*.dll" />
3165+
<!-- include .NET 2.0 specific assemblies -->
3166+
<include name="extensions/common/2.0/**/*.dll" />
3167+
</task-assemblies>
3168+
<tool-paths>
3169+
<directory name="${toolDirectory}" />
3170+
<directory name="${path::combine(prefix, 'lib/mono/3.5')}" />
3171+
<directory name="${path::combine(prefix, 'lib/mono/2.0')}" />
3172+
<directory name="${path::combine(prefix, 'lib/mono/1.0')}" />
3173+
<!-- unmanaged tools -->
3174+
<directory name="${prefix}/bin" />
3175+
</tool-paths>
3176+
<project>
3177+
<if test="${not pkg-config::exists('mono')}">
3178+
<fail>Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.</fail>
3179+
</if>
3180+
<property name="resgen.supportsexternalfilereferences" value="false" />
3181+
<property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}" />
3182+
<property name="toolDirectory" value="${path::combine(prefix, 'lib/mono/4.5')}" />
3183+
</project>
3184+
<tasks>
3185+
<task name="al">
3186+
<attribute name="managed">true</attribute>
3187+
</task>
3188+
<task name="csc">
3189+
<attribute name="exename">dmcs</attribute>
3190+
<attribute name="managed">true</attribute>
3191+
<attribute name="langversion">linq</attribute>
3192+
<attribute name="supportspackagereferences">true</attribute>
3193+
<attribute name="supportsnowarnlist">true</attribute>
3194+
<attribute name="supportsdocgeneration">true</attribute>
3195+
<attribute name="supportskeycontainer">true</attribute>
3196+
<attribute name="supportskeyfile">true</attribute>
3197+
<attribute name="supportsdelaysign">true</attribute>
3198+
<attribute name="supportslangversion">true</attribute>
3199+
</task>
3200+
<task name="jsc">
3201+
<attribute name="exename">mjs</attribute>
3202+
<attribute name="managed">strict</attribute>
3203+
</task>
3204+
<task name="vbc">
3205+
<attribute name="exename">vbnc</attribute>
3206+
<attribute name="managed">true</attribute>
3207+
</task>
3208+
<task name="resgen">
3209+
<attribute name="managed">true</attribute>
3210+
<attribute name="supportsexternalfilereferences">true</attribute>
3211+
</task>
3212+
<task name="delay-sign">
3213+
<attribute name="exename">sn</attribute>
3214+
<attribute name="managed">true</attribute>
3215+
</task>
3216+
<task name="license">
3217+
<attribute name="hascommandlinecompiler">false</attribute>
3218+
</task>
3219+
<task name="ilasm">
3220+
<attribute name="managed">true</attribute>
3221+
</task>
3222+
</tasks>
3223+
</framework>
31153224
<framework
31163225
name="moonlight-2.0"
31173226
family="moonlight"

project/CCTray/CCTray.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,11 @@
182182
</ItemGroup>
183183
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
184184
<PropertyGroup>
185-
<PreBuildEvent>
186-
</PreBuildEvent>
187-
<PostBuildEvent>copy "$(ProjectDir)..\..\tools\cm17a\cm17a.exe" "$(TargetDir)"</PostBuildEvent>
185+
<PostBuildEvent Condition=" '$(OS)' != 'Unix' ">
186+
copy "$(ProjectDir)..\..\Tools\cm17a\cm17a.exe" "$(TargetDir)"
187+
</PostBuildEvent>
188+
<PostBuildEvent Condition=" '$(OS)' == 'Unix' ">
189+
cp "$(ProjectDir)../../Tools/cm17a/cm17a.exe" "$(TargetDir)"
190+
</PostBuildEvent>
188191
</PropertyGroup>
189-
</Project>
192+
</Project>

project/Core.Extensions/Core.Extensions.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@
133133
</Target>
134134
-->
135135
<PropertyGroup>
136-
<PostBuildEvent>if not "$(ConfigurationName)" == "Build" xcopy /Y "$(TargetPath)" "$(SolutionDir)console\bin\$(ConfigurationName)\"</PostBuildEvent>
136+
<PostBuildEvent Condition=" '$(OS)' != 'Unix' ">
137+
if not "$(ConfigurationName)" == "Build" xcopy /Y "$(TargetPath)" "$(SolutionDir)console/bin/$(ConfigurationName)/"
138+
</PostBuildEvent>
139+
<PostBuildEvent Condition=" '$(OS)' == 'Unix' ">
140+
if [ "$(ConfigurationName)" != "Build" ]; then
141+
cp "$(TargetPath)" "$(SolutionDir)console/bin/$(ConfigurationName)/"
142+
fi
143+
</PostBuildEvent>
137144
</PropertyGroup>
138145
</Project>

project/UnitTests/UnitTests.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,12 +1455,17 @@
14551455
</ItemGroup>
14561456
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
14571457
<PropertyGroup>
1458-
<PreBuildEvent>mkdir "$(TargetDir)xsl"
1458+
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">mkdir "$(TargetDir)xsl"
14591459
copy "$(ProjectDir)test.config" "$(TargetPath).config"
14601460
xcopy /y/q "$(SolutionDir)\xsl\*.*" "$(TargetDir)xsl"
14611461
xcopy "$(ProjectDir)\resources\*.*" "$(TargetDir)" /S /Y /Q
14621462
copy "$(ProjectDir)..\..\tools\sleeper.exe" "$(TargetDir)"</PreBuildEvent>
1463+
<PreBuildEvent Condition=" '$(OS)' == 'Unix' ">mkdir -p "$(TargetDir)xsl"
1464+
cp "$(ProjectDir)test.config" "$(TargetPath).config"
1465+
cp "$(SolutionDir)xsl"/* "$(TargetDir)xsl"
1466+
cp -R "$(ProjectDir)resources"/* "$(TargetDir)"
1467+
cp "$(ProjectDir)../../Tools/sleeper.exe" "$(TargetDir)"</PreBuildEvent>
14631468
<PostBuildEvent>
14641469
</PostBuildEvent>
14651470
</PropertyGroup>
1466-
</Project>
1471+
</Project>

project/WebDashboard/WebDashboard.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,8 +933,10 @@
933933
<PropertyGroup>
934934
<PreBuildEvent>
935935
</PreBuildEvent>
936-
<PostBuildEvent>mkdir "$(ProjectDir)\xsl"
936+
<PostBuildEvent Condition=" '$(OS)' != 'Unix' ">mkdir "$(ProjectDir)\xsl"
937937
xcopy/y/q "$(SolutionDir)\xsl\*.xsl" "$(ProjectDir)\xsl"</PostBuildEvent>
938+
<PostBuildEvent Condition=" '$(OS)' == 'Unix' ">mkdir -p "$(ProjectDir)xsl"
939+
cp "$(SolutionDir)xsl"/* "$(ProjectDir)xsl"</PostBuildEvent>
938940
</PropertyGroup>
939941
<ProjectExtensions>
940942
<VisualStudio>

project/core/core.csproj

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -188,34 +188,34 @@
188188
</Compile>
189189
<Compile Include="Config\ConfigurationTrace.cs" />
190190
<Compile Include="Config\ConfigurationValidationUtils.cs" />
191-
<Compile Include="Config\Preprocessor\Evaluator.cs" />
192-
<Compile Include="Config\Preprocessor\DebuggingWriter.cs" />
193-
<Compile Include="Config\Preprocessor\ElementProcessors\ConditionalProcessor.cs" />
194-
<Compile Include="Config\Preprocessor\ElementProcessors\ConfigTemplateProcessor.cs" />
195-
<Compile Include="Config\Preprocessor\ElementProcessors\CountProcessor.cs" />
196-
<Compile Include="Config\Preprocessor\ElementProcessors\CreateElementProcessor.cs" />
197-
<Compile Include="Config\Preprocessor\ElementProcessors\DefaultProcessor.cs" />
198-
<Compile Include="Config\Preprocessor\ElementProcessors\DefineProcessor.cs" />
199-
<Compile Include="Config\Preprocessor\ElementProcessors\ElementProcessor.cs" />
200-
<Compile Include="Config\Preprocessor\ElementProcessors\EvalProcessor.cs" />
201-
<Compile Include="Config\Preprocessor\ElementProcessors\ExpandSymbolProcessor.cs" />
202-
<Compile Include="Config\Preprocessor\ElementProcessors\ForEachProcessor.cs" />
203-
<Compile Include="Config\Preprocessor\ElementProcessors\ForProcessor.cs" />
204-
<Compile Include="Config\Preprocessor\ElementProcessors\IfDefProcessor.cs" />
205-
<Compile Include="Config\Preprocessor\ElementProcessors\IfNDefProcessor.cs" />
206-
<Compile Include="Config\Preprocessor\ElementProcessors\IfProcessor.cs" />
207-
<Compile Include="Config\Preprocessor\ElementProcessors\IgnoreProcessor.cs" />
208-
<Compile Include="Config\Preprocessor\ElementProcessors\ImportProcessor.cs" />
209-
<Compile Include="Config\Preprocessor\ElementProcessors\IncludeProcessor.cs" />
210-
<Compile Include="Config\Preprocessor\ElementProcessors\ProcessingInstructionProcessor.cs" />
211-
<Compile Include="Config\Preprocessor\ElementProcessors\ScopeProcessor.cs" />
212-
<Compile Include="Config\Preprocessor\Exceptions.cs" />
213-
<Compile Include="Config\Preprocessor\ConfigPreprocessor.cs" />
214-
<Compile Include="Config\Preprocessor\PreprocessorEnvironment.cs" />
215-
<Compile Include="Config\Preprocessor\PreprocessorSettings.cs" />
216-
<Compile Include="Config\Preprocessor\SymbolicDef.cs" />
217-
<Compile Include="Config\Preprocessor\Validation.cs" />
218-
<Compile Include="Config\Preprocessor\XHelpers.cs" />
191+
<Compile Include="Config\preprocessor\Evaluator.cs" />
192+
<Compile Include="Config\preprocessor\DebuggingWriter.cs" />
193+
<Compile Include="Config\preprocessor\ElementProcessors\ConditionalProcessor.cs" />
194+
<Compile Include="Config\preprocessor\ElementProcessors\ConfigTemplateProcessor.cs" />
195+
<Compile Include="Config\preprocessor\ElementProcessors\CountProcessor.cs" />
196+
<Compile Include="Config\preprocessor\ElementProcessors\CreateElementProcessor.cs" />
197+
<Compile Include="Config\preprocessor\ElementProcessors\DefaultProcessor.cs" />
198+
<Compile Include="Config\preprocessor\ElementProcessors\DefineProcessor.cs" />
199+
<Compile Include="Config\preprocessor\ElementProcessors\ElementProcessor.cs" />
200+
<Compile Include="Config\preprocessor\ElementProcessors\EvalProcessor.cs" />
201+
<Compile Include="Config\preprocessor\ElementProcessors\ExpandSymbolProcessor.cs" />
202+
<Compile Include="Config\preprocessor\ElementProcessors\ForEachProcessor.cs" />
203+
<Compile Include="Config\preprocessor\ElementProcessors\ForProcessor.cs" />
204+
<Compile Include="Config\preprocessor\ElementProcessors\IfDefProcessor.cs" />
205+
<Compile Include="Config\preprocessor\ElementProcessors\IfNDefProcessor.cs" />
206+
<Compile Include="Config\preprocessor\ElementProcessors\IfProcessor.cs" />
207+
<Compile Include="Config\preprocessor\ElementProcessors\IgnoreProcessor.cs" />
208+
<Compile Include="Config\preprocessor\ElementProcessors\ImportProcessor.cs" />
209+
<Compile Include="Config\preprocessor\ElementProcessors\IncludeProcessor.cs" />
210+
<Compile Include="Config\preprocessor\ElementProcessors\ProcessingInstructionProcessor.cs" />
211+
<Compile Include="Config\preprocessor\ElementProcessors\ScopeProcessor.cs" />
212+
<Compile Include="Config\preprocessor\Exceptions.cs" />
213+
<Compile Include="Config\preprocessor\ConfigPreprocessor.cs" />
214+
<Compile Include="Config\preprocessor\PreprocessorEnvironment.cs" />
215+
<Compile Include="Config\preprocessor\PreprocessorSettings.cs" />
216+
<Compile Include="Config\preprocessor\SymbolicDef.cs" />
217+
<Compile Include="Config\preprocessor\Validation.cs" />
218+
<Compile Include="Config\preprocessor\XHelpers.cs" />
219219
<Compile Include="ConsoleRunnerArguments.cs">
220220
<SubType>Code</SubType>
221221
</Compile>
@@ -269,7 +269,7 @@
269269
<Compile Include="Config\NetReflectorConfigurationReader.cs">
270270
<SubType>Code</SubType>
271271
</Compile>
272-
<Compile Include="Config\Preprocessor\Utils.cs" />
272+
<Compile Include="Config\preprocessor\Utils.cs" />
273273
<Compile Include="Config\ServerConfiguration.cs" />
274274
<Compile Include="Config\ServerConfigurationHandler.cs" />
275275
<Compile Include="Config\XmlValidatingLoader.cs">
@@ -1215,7 +1215,9 @@
12151215
<PropertyGroup>
12161216
<PreBuildEvent>
12171217
</PreBuildEvent>
1218-
<PostBuildEvent>mkdir "$(TargetDir)xsl"
1218+
<PostBuildEvent Condition=" '$(OS)' != 'Unix' ">mkdir "$(TargetDir)xsl"
12191219
xcopy /q /y "$(SolutionDir)\xsl\*.*" "$(TargetDir)xsl"</PostBuildEvent>
1220+
<PostBuildEvent Condition=" '$(OS)' == 'Unix' ">mkdir -p "$(TargetDir)xsl"
1221+
cp "$(SolutionDir)xsl"/* "$(TargetDir)xsl"</PostBuildEvent>
12201222
</PropertyGroup>
1221-
</Project>
1223+
</Project>

0 commit comments

Comments
 (0)