Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2014-01-06 23:45:27 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2014-01-08 03:39:32 +0400
commit794e185592ac26354df9aa066e098e2e43a9932c (patch)
tree3e48521916ab817d74e699bfa0cf89f28b8fcab1 /mcs/class
parentb22bf8cbbf7b8508cb84ab15cf9650efb54e8982 (diff)
[xbuild] Remove Silverlight targets, they don't work w/o framework
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/Makefile12
-rw-r--r--mcs/class/Moonlight.Build.Tasks/ChangeLog3
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Makefile57
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_2_0.csproj110
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_0.csproj110
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_5.csproj110
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks.dll.sources6
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/ChangeLog23
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/CreateTestPage.cs79
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateMoonlightManifest.cs179
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateXap.cs140
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GetMoonlightFrameworkPath.cs91
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/PreviewTemplate.html76
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/Respack.cs120
-rw-r--r--mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/XamlG.cs378
15 files changed, 2 insertions, 1492 deletions
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index 1776ecff1c2..1cdaf5092af 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -222,25 +222,17 @@ net_4_5_dirs := \
System.Xml.Serialization \
$(pcl_facade_dirs)
-xbuild_common_dirs := \
+xbuild_2_0_dirs := \
Microsoft.Build.Framework \
Microsoft.Build.Utilities \
Microsoft.Build.Engine \
Mono.XBuild.Tasks \
Microsoft.Build.Tasks
-xbuild_2_0_dirs := \
- $(xbuild_common_dirs) \
- Moonlight.Build.Tasks
-
xbuild_4_0_dirs := \
$(xbuild_2_0_dirs) \
Microsoft.Build
-xbuild_12_dirs := \
- $(xbuild_common_dirs) \
- Microsoft.Build
-
net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
monotouch_SUBDIRS := $(mobile_dirs)
@@ -250,7 +242,7 @@ mobile_SUBDIRS := $(mobile_dirs)
net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
net_4_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
net_4_5_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
-xbuild_12_SUBDIRS := $(xbuild_12_dirs)
+xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
include ../build/rules.make
diff --git a/mcs/class/Moonlight.Build.Tasks/ChangeLog b/mcs/class/Moonlight.Build.Tasks/ChangeLog
deleted file mode 100644
index 7e630808bab..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/ChangeLog
+++ /dev/null
@@ -1,3 +0,0 @@
-2010-04-13 Ankit Jain <jankit@novell.com>
-
- * Initial commit.
diff --git a/mcs/class/Moonlight.Build.Tasks/Makefile b/mcs/class/Moonlight.Build.Tasks/Makefile
deleted file mode 100644
index 5452bf8ed5b..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-thisdir = class/Moonlight.Build.Tasks
-SUBDIRS =
-include ../../build/rules.make
-
-LIBRARY = Moonlight.Build.Tasks.dll
-LIBRARY_NAME = Moonlight.Build.Tasks.dll
-
-ifeq (3.5, $(FRAMEWORK_VERSION))
-NAME_SUFFIX = .v3.5
-else
-ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-NAME_SUFFIX = .v4.0
-endif
-endif
-
-NO_INSTALL = yes
-NO_TEST = yes
-NO_SIGN_ASSEMBLY = yes
-
-REFERENCES = \
- /r:$(corlib) \
- /r:System.dll \
- /r:System.Xml.dll \
- /r:Microsoft.Build.Engine.dll \
- /r:Microsoft.Build.Framework.dll \
- /r:Microsoft.Build.Utilities$(NAME_SUFFIX).dll \
- /r:Microsoft.Build.Tasks$(NAME_SUFFIX).dll \
- /r:ICSharpCode.SharpZipLib.dll
-
-LIB_MCS_FLAGS = \
- $(REFERENCES) \
- $(RESOURCE_FILES:%=-resource:%)
-
-RESOURCE_FILES = Moonlight.Build.Tasks/PreviewTemplate.html
-
-EXTRA_DISTFILES = $(RESOURCE_FILES)
-
-XBUILD_DIR=../../tools/xbuild
-include $(XBUILD_DIR)/xbuild_targets.make
-
-include ../../build/library.make
-
-SILVERLIGHT_DIR = $(DESTDIR)$(mono_libdir)/mono/xbuild/Microsoft/Silverlight
-
-install-local: install-lib
-
-install-lib: $(the_lib)
- -$(MKINSTALLDIRS) $(SILVERLIGHT_DIR)/v2.0
- -$(MKINSTALLDIRS) $(SILVERLIGHT_DIR)/v3.0
- $(INSTALL_DATA) $(topdir)/class/lib/$(PROFILE)/$(LIBRARY_NAME) $(SILVERLIGHT_DIR)/v2.0
- $(INSTALL_DATA) $(topdir)/class/lib/$(PROFILE)/$(LIBRARY_NAME) $(SILVERLIGHT_DIR)/v3.0
-
-uninstall-local: uninstall-lib
-
-uninstall-lib:
- -rm -f $(SILVERLIGHT_DIR)/v2.0/$(LIBRARY_NAME)
- -rm -f $(SILVERLIGHT_DIR)/v3.0/$(LIBRARY_NAME)
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_2_0.csproj b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_2_0.csproj
deleted file mode 100644
index 2c390895e7d..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_2_0.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A397D71E-CB6B-4442-91BC-4F1C801584C1}</ProjectGuid>
- <OutputType>Library</OutputType>
- <NoWarn>1699</NoWarn>
- <OutputPath>bin\Debug\Moonlight.Build.Tasks-net_2_0</OutputPath>
- <NoStdLib>True</NoStdLib>
- <NoConfig>True</NoConfig>
-
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>
- </RootNamespace>
- <AssemblyName>Moonlight.Build.Tasks</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>false</Optimize>
- <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>true</Optimize>
- <DefineConstants>NET_1_1;NET_2_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
- Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
- is a problem to compile the Mono mscorlib.dll -->
- <PropertyGroup>
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
- </PropertyGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Compile Include="Moonlight.Build.Tasks\CreateTestPage.cs" />
- <Compile Include="Moonlight.Build.Tasks\GenerateMoonlightManifest.cs" />
- <Compile Include="Moonlight.Build.Tasks\GenerateXap.cs" />
- <Compile Include="Moonlight.Build.Tasks\GetMoonlightFrameworkPath.cs" />
- <Compile Include="Moonlight.Build.Tasks\Respack.cs" />
- <Compile Include="Moonlight.Build.Tasks\XamlG.cs" /> </ItemGroup>
- <!-- 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>
- -->
- <PropertyGroup>
- <PreBuildEvent>
-
- </PreBuildEvent>
- <PostBuildEvent>
- xcopy $(TargetName).* $(ProjectDir)..\lib\net_2_0\ /Y /R /D
- </PostBuildEvent>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\corlib\corlib-net_2_0.csproj">
- <Project>{EB7444A6-C3E6-4224-BDB0-63CA3B4F2B87}</Project>
- <Name>corlib\corlib-net_2_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\System\System-net_2_0-2.csproj">
- <Project>{79F25FD7-0D76-4526-AF39-1A648649A827}</Project>
- <Name>System\System-net_2_0-2</Name>
- </ProjectReference>
- <ProjectReference Include="..\System.XML\System.Xml-net_2_0-1.csproj">
- <Project>{D9776E38-7673-45F6-BF19-7B77830DF9CA}</Project>
- <Name>System.XML\System.Xml-net_2_0-1</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Engine\Microsoft.Build.Engine-net_2_0.csproj">
- <Project>{E8E948B8-6DCF-48F2-A6BC-04309AED8740}</Project>
- <Name>Microsoft.Build.Engine\Microsoft.Build.Engine-net_2_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-net_2_0.csproj">
- <Project>{AB5EDD8C-84A4-4F96-80EE-1B6F3A86785B}</Project>
- <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_2_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_2_0.csproj">
- <Project>{4AC4EDEE-4895-4CF9-84DF-9419E6980F38}</Project>
- <Name>Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_2_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Tasks\Microsoft.Build.Tasks-net_2_0.csproj">
- <Project>{3DD52713-DB38-4D0D-8692-650B8821B047}</Project>
- <Name>Microsoft.Build.Tasks\Microsoft.Build.Tasks-net_2_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_2_0.csproj">
- <Project>{065A843F-C16B-4F2E-9560-69440147EDB2}</Project>
- <Name>ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_2_0</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Moonlight.Build.Tasks/PreviewTemplate.html">
- <LogicalName>PreviewTemplate.html</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
-</Project>
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_0.csproj b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_0.csproj
deleted file mode 100644
index 7469cf39158..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_0.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{8B495C4E-D5D2-4642-9481-F761DDD47ABD}</ProjectGuid>
- <OutputType>Library</OutputType>
- <NoWarn>1699</NoWarn>
- <OutputPath>bin\Debug\Moonlight.Build.Tasks-net_4_0</OutputPath>
- <NoStdLib>True</NoStdLib>
- <NoConfig>True</NoConfig>
-
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>
- </RootNamespace>
- <AssemblyName>Moonlight.Build.Tasks</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>false</Optimize>
- <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>true</Optimize>
- <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
- Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
- is a problem to compile the Mono mscorlib.dll -->
- <PropertyGroup>
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
- </PropertyGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Compile Include="Moonlight.Build.Tasks\CreateTestPage.cs" />
- <Compile Include="Moonlight.Build.Tasks\GenerateMoonlightManifest.cs" />
- <Compile Include="Moonlight.Build.Tasks\GenerateXap.cs" />
- <Compile Include="Moonlight.Build.Tasks\GetMoonlightFrameworkPath.cs" />
- <Compile Include="Moonlight.Build.Tasks\Respack.cs" />
- <Compile Include="Moonlight.Build.Tasks\XamlG.cs" /> </ItemGroup>
- <!-- 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>
- -->
- <PropertyGroup>
- <PreBuildEvent>
-
- </PreBuildEvent>
- <PostBuildEvent>
- xcopy $(TargetName).* $(ProjectDir)..\lib\net_4_0\ /Y /R /D
- </PostBuildEvent>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\corlib\corlib-net_4_0.csproj">
- <Project>{3874F10B-9AE4-4A7E-873B-42FFDCE80CB7}</Project>
- <Name>corlib\corlib-net_4_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\System\System-net_4_0-2.csproj">
- <Project>{8260E24F-1471-4320-AB5B-7CC7B68521E3}</Project>
- <Name>System\System-net_4_0-2</Name>
- </ProjectReference>
- <ProjectReference Include="..\System.XML\System.Xml-net_4_0-1.csproj">
- <Project>{51720A26-B4D9-4B84-8CB5-9CBA57477FBB}</Project>
- <Name>System.XML\System.Xml-net_4_0-1</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Engine\Microsoft.Build.Engine-net_4_0.csproj">
- <Project>{9B0AC297-CB85-43C1-8C18-12997CF1B78D}</Project>
- <Name>Microsoft.Build.Engine\Microsoft.Build.Engine-net_4_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_0.csproj">
- <Project>{1D4BCF4D-31D1-4F92-A2B2-D9E41A640649}</Project>
- <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_4_0.csproj">
- <Project>{A20F004B-16AC-44DE-A14E-2C2B5E9F72BE}</Project>
- <Name>Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_4_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Tasks\Microsoft.Build.Tasks-net_4_0.csproj">
- <Project>{0F2C25D7-DF2E-4F4B-85D8-7EFC4DCD3B0C}</Project>
- <Name>Microsoft.Build.Tasks\Microsoft.Build.Tasks-net_4_0</Name>
- </ProjectReference>
- <ProjectReference Include="..\ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_4_0.csproj">
- <Project>{2DE2CFB0-3166-41D9-B0B5-EFBE309DD7B7}</Project>
- <Name>ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_4_0</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Moonlight.Build.Tasks/PreviewTemplate.html">
- <LogicalName>PreviewTemplate.html</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
-</Project>
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_5.csproj b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_5.csproj
deleted file mode 100644
index 66141f048f6..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks-net_4_5.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{C1BA77F3-938B-4598-BD75-5E9578827F47}</ProjectGuid>
- <OutputType>Library</OutputType>
- <NoWarn>1699</NoWarn>
- <OutputPath>bin\Debug\Moonlight.Build.Tasks-net_4_5</OutputPath>
- <NoStdLib>True</NoStdLib>
- <NoConfig>True</NoConfig>
-
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>
- </RootNamespace>
- <AssemblyName>Moonlight.Build.Tasks</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>false</Optimize>
- <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>true</Optimize>
- <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
- Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
- is a problem to compile the Mono mscorlib.dll -->
- <PropertyGroup>
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
- </PropertyGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Compile Include="Moonlight.Build.Tasks\CreateTestPage.cs" />
- <Compile Include="Moonlight.Build.Tasks\GenerateMoonlightManifest.cs" />
- <Compile Include="Moonlight.Build.Tasks\GenerateXap.cs" />
- <Compile Include="Moonlight.Build.Tasks\GetMoonlightFrameworkPath.cs" />
- <Compile Include="Moonlight.Build.Tasks\Respack.cs" />
- <Compile Include="Moonlight.Build.Tasks\XamlG.cs" /> </ItemGroup>
- <!-- 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>
- -->
- <PropertyGroup>
- <PreBuildEvent>
-
- </PreBuildEvent>
- <PostBuildEvent>
- xcopy $(TargetName).* $(ProjectDir)..\lib\net_4_5\ /Y /R /D
- </PostBuildEvent>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\corlib\corlib-net_4_5.csproj">
- <Project>{07C1F58B-9E99-47F8-A847-79EDA5157DA8}</Project>
- <Name>corlib\corlib-net_4_5</Name>
- </ProjectReference>
- <ProjectReference Include="..\System\System-net_4_5-2.csproj">
- <Project>{38FCD731-0E11-46F7-A31B-DCBE853AD8D7}</Project>
- <Name>System\System-net_4_5-2</Name>
- </ProjectReference>
- <ProjectReference Include="..\System.XML\System.Xml-net_4_5-1.csproj">
- <Project>{4ED6CCE8-8E8A-4D82-8BCA-3EA4D4203AA4}</Project>
- <Name>System.XML\System.Xml-net_4_5-1</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Engine\Microsoft.Build.Engine-net_4_5.csproj">
- <Project>{0DA63190-E6E1-41C5-B683-A54FADBE61CB}</Project>
- <Name>Microsoft.Build.Engine\Microsoft.Build.Engine-net_4_5</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_5.csproj">
- <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>
- <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_5</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_4_5.csproj">
- <Project>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</Project>
- <Name>Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_4_5</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.Build.Tasks\Microsoft.Build.Tasks-net_4_5.csproj">
- <Project>{B0995E00-BF37-4B8A-8229-285C060E5957}</Project>
- <Name>Microsoft.Build.Tasks\Microsoft.Build.Tasks-net_4_5</Name>
- </ProjectReference>
- <ProjectReference Include="..\ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_4_5.csproj">
- <Project>{039AD56A-E91B-4803-8328-287F70B61D14}</Project>
- <Name>ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_4_5</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Moonlight.Build.Tasks/PreviewTemplate.html">
- <LogicalName>PreviewTemplate.html</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
-</Project>
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks.dll.sources b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks.dll.sources
deleted file mode 100644
index 74c3a27a725..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks.dll.sources
+++ /dev/null
@@ -1,6 +0,0 @@
-Moonlight.Build.Tasks/GenerateXap.cs
-Moonlight.Build.Tasks/XamlG.cs
-Moonlight.Build.Tasks/GetMoonlightFrameworkPath.cs
-Moonlight.Build.Tasks/GenerateMoonlightManifest.cs
-Moonlight.Build.Tasks/CreateTestPage.cs
-Moonlight.Build.Tasks/Respack.cs
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/ChangeLog b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/ChangeLog
deleted file mode 100644
index f6220729048..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/ChangeLog
+++ /dev/null
@@ -1,23 +0,0 @@
-2010-07-16 Ankit Jain <jankit@novell.com>
-
- * XamlG.cs (Execute): Fix earlier commit, include the filename.
-
-2010-07-16 Ankit Jain <jankit@novell.com>
-
- * Respack.cs (Execute): Skip if output file is up-to-date wrt
- the input files. Bug reported by Rolf.
-
-2010-07-16 Ankit Jain <jankit@novell.com>
-
- * XamlG.cs: Fix arg to XamlGCompiler, to use path relative to project
- dir. Bug uncovered by Rolf.
-
-2010-04-13 Ankit Jain <jankit@novell.com>
-
- * CreateTestPage.cs:
- * GenerateMoonlightManifest.cs:
- * GetMoonlightFrameworkPath.cs:
- * GenerateXap.cs:
- * Respack.cs:
- * XamlG.cs:
- MSBuild tasks for building silverlight projects.
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/CreateTestPage.cs b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/CreateTestPage.cs
deleted file mode 100644
index 28051694eed..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/CreateTestPage.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// CreateTestPage.cs: Generates test page for moonlight app
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-// Ankit Jain <jankit@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using System;
-using System.IO;
-using System.Reflection;
-using System.Text;
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Moonlight.Build.Tasks {
- public class CreateTestPage : Task {
-
- public override bool Execute ()
- {
- Log.LogMessage (MessageImportance.Low, "Generating test page {0}", XapFilename);
-
- var sb = new StringBuilder ();
- using (var sr = new StreamReader (Assembly.GetExecutingAssembly ().GetManifestResourceStream ("PreviewTemplate.html")))
- sb.Append (sr.ReadToEnd ());
-
- sb.Replace ("@TITLE@", Title);
- sb.Replace ("@XAP_FILE@", XapFilename);
-
- try{
- File.WriteAllText (TestPageFilename, sb.ToString ());
- } catch (IOException e) {
- Log.LogError (String.Format (
- "Error generating test page file {0}: {1}", TestPageFilename, e.Message));
- return false;
- }
-
- return true;
- }
-
- [Required]
- public string XapFilename {
- get; set;
- }
-
- [Required]
- public string Title {
- get; set;
- }
-
- [Required]
- [Output]
- public string TestPageFilename {
- get; set;
- }
- }
-}
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateMoonlightManifest.cs b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateMoonlightManifest.cs
deleted file mode 100644
index 4b7e7a30dfa..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateMoonlightManifest.cs
+++ /dev/null
@@ -1,179 +0,0 @@
-//
-// GenerateMoonlightManifest.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-// Ankit Jain <jankit@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using System.Xml;
-
-using Microsoft.CSharp;
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Moonlight.Build.Tasks {
- public class GenerateMoonlightManifest : Task {
-
- public override bool Execute ()
- {
- return GenerateManifest ();
- }
-
- bool GenerateManifest ()
- {
- const string depNS = "http://schemas.microsoft.com/client/2007/deployment";
-
- string template = null;
- var manifest = ManifestFile.ItemSpec;
- Log.LogMessage (MessageImportance.Normal, "Generating manifest file {0}", manifest);
-
- if (SilverlightManifestTemplate != null)
- template = String.IsNullOrEmpty (SilverlightManifestTemplate.ItemSpec) ?
- null :
- SilverlightManifestTemplate.GetMetadata ("FullPath");
-
- XmlDocument doc = new XmlDocument ();
- if (template != null) {
- if (!File.Exists (template)) {
- Log.LogError ("Could not find manifest template '" + template + "'.");
- return false;
- }
-
- try {
- doc.Load (template);
- } catch (XmlException ex) {
- Log.LogError (null, null, null, template, ex.LineNumber, ex.LinePosition, 0, 0,
- "Error loading manifest template '" + ex.Source);
- return false;
- } catch (Exception ex) {
- Log.LogError ("Could not load manifest template '" + template + "'.");
- Log.LogMessage (MessageImportance.Low, "Could not load manifest template '" + template + "': " + ex.ToString ());
- return false;
- }
-
- } else {
- doc.LoadXml (@"<Deployment xmlns=""http://schemas.microsoft.com/client/2007/deployment"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""></Deployment>");
- }
-
- try {
- XmlNode deploymentNode = doc.DocumentElement;
- if (deploymentNode == null || deploymentNode.Name != "Deployment" || deploymentNode.NamespaceURI != depNS) {
- Log.LogError ("Missing or invalid root <Deployment> element in manifest template '" + template + "'.");
- return false;
- }
- if (deploymentNode.Attributes["EntryPointAssembly"] == null)
- deploymentNode.Attributes.Append (doc.CreateAttribute ("EntryPointAssembly")).Value =
- EntryPointAssembly.GetMetadata ("Filename");
-
- if (!String.IsNullOrEmpty (SilverlightAppEntry) && deploymentNode.Attributes["EntryPointType"] == null)
- deploymentNode.Attributes.Append (doc.CreateAttribute ("EntryPointType")).Value = SilverlightAppEntry;
-
- if (deploymentNode.Attributes["RuntimeVersion"] == null) {
- //FIXME:
- /*string fxVersion = MoonlightFrameworkBackend.GetFxVersion (proj.TargetFramework);
-
- if (proj.TargetRuntime is MonoDevelop.Core.Assemblies.MonoTargetRuntime) {
- var package = proj.TargetRuntime.RuntimeAssemblyContext.GetPackage ("moonlight-web-" + fxVersion);
- if (package != null && package.IsFrameworkPackage) {
- runtimeVersion = package.Version;
- } else {
- LoggingService.LogWarning ("Moonlight core framework package not found, cannot determine " +
- "runtime version string. Falling back to default value.");
- }
- }*/
-
- deploymentNode.Attributes.Append (doc.CreateAttribute ("RuntimeVersion")).Value =
- String.IsNullOrEmpty (RuntimeVersion) ? "2.0.31005.0" : RuntimeVersion;
- }
-
- XmlNamespaceManager mgr = new XmlNamespaceManager (doc.NameTable);
- mgr.AddNamespace ("dep", depNS);
- XmlNode partsNode = deploymentNode.SelectSingleNode ("dep:Deployment.Parts", mgr);
- if (partsNode == null)
- partsNode = deploymentNode.AppendChild (doc.CreateElement ("Deployment.Parts", depNS));
-
- AddAssemblyPart (doc, partsNode, EntryPointAssembly);
-
- foreach (ITaskItem ref_item in References)
- AddAssemblyPart (doc, partsNode, ref_item);
- } catch (XmlException ex) {
- Log.LogError (null, null, null, template, ex.LineNumber, ex.LinePosition, 0, 0,
- "Error processing manifest template: '" + ex.Source);
- return false;
- }
-
- doc.Save (manifest);
-
- return true;
- }
-
- static void AddAssemblyPart (XmlDocument doc, XmlNode partsNode, ITaskItem filename)
- {
- XmlNode child = doc.CreateElement ("AssemblyPart", "http://schemas.microsoft.com/client/2007/deployment");
- child.Attributes.Append (doc.CreateAttribute (
- "Name", "http://schemas.microsoft.com/winfx/2006/xaml")).Value = filename.GetMetadata ("Filename");
- string subdir = filename.GetMetadata ("DestinationSubdirectory");
- child.Attributes.Append (doc.CreateAttribute ("Source")).Value = Path.Combine (subdir ?? String.Empty, Path.GetFileName (filename.ItemSpec));
- partsNode.AppendChild (child);
- }
-
- [Required]
- [Output]
- public ITaskItem ManifestFile {
- get; set;
- }
-
- [Required]
- // with extension
- public ITaskItem EntryPointAssembly {
- get; set;
- }
-
- [Required]
- public ITaskItem[] References {
- get; set;
- }
-
- public ITaskItem SilverlightManifestTemplate {
- get; set;
- }
-
- public string SilverlightAppEntry {
- get; set;
- }
-
- public string RuntimeVersion {
- get; set;
- }
- }
-
-}
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateXap.cs b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateXap.cs
deleted file mode 100644
index 92082ac0efb..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GenerateXap.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-//
-// GenerateXap.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-// Ankit Jain <jankit@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using System.Xml;
-
-using Microsoft.CSharp;
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Moonlight.Build.Tasks {
- public class GenerateXap : Task {
-
- public override bool Execute ()
- {
- if (InputFiles.Length == 0)
- return true;
-
- return Zip ();
- }
-
- bool Zip ()
- {
- var xapName = XapFilename.ItemSpec;
- if (File.Exists (xapName)) {
- DateTime lastMod = File.GetLastWriteTime (xapName);
- bool needsWrite = false;
- foreach (ITaskItem file_item in InputFiles) {
- if (File.GetLastWriteTime (file_item.ItemSpec) > lastMod) {
- needsWrite = true;
- break;
- }
- }
- if (!needsWrite) {
- Log.LogMessage (MessageImportance.Low, "Skipping xap file {0} generation, its up-to date");
- return true;
- }
- }
-
- Log.LogMessage (MessageImportance.Normal, "Generating compressed xap file {0}", xapName);
- try {
- using (FileStream fs = new FileStream (xapName, FileMode.Create)) {
- var zip_stream = new ICSharpCode.SharpZipLib.Zip.ZipOutputStream (fs);
- zip_stream.SetLevel (9);
-
- AddFilesToZip (InputFiles, zip_stream);
- AddFilesToZip (LocalCopyReferences, zip_stream);
-
- zip_stream.Finish ();
- zip_stream.Close ();
- }
- } catch (IOException ex) {
- Log.LogError ("Error writing xap file.", ex);
- Log.LogMessage (MessageImportance.Low, "Error writing xap file:" + ex.ToString ());
-
- try {
- if (File.Exists (xapName))
- File.Delete (xapName);
- } catch {}
-
- return false;
- }
-
- return true;
- }
-
- void AddFilesToZip (ITaskItem [] files, ICSharpCode.SharpZipLib.Zip.ZipOutputStream zipStream)
- {
- if (files == null)
- return;
-
- foreach (ITaskItem item in files) {
- string target_path = item.GetMetadata ("TargetPath");
- if (String.IsNullOrEmpty (target_path))
- target_path = Path.GetFileName (item.ItemSpec);
-
- zipStream.PutNextEntry (new ICSharpCode.SharpZipLib.Zip.ZipEntry (target_path));
- using (FileStream inStream = File.OpenRead (item.ItemSpec)) {
- int readCount;
- byte[] buffer = new byte[4096];
-
- do {
- readCount = inStream.Read (buffer, 0, buffer.Length);
- zipStream.Write (buffer, 0, readCount);
- } while (readCount > 0);
- }
- }
- }
-
- [Output]
- [Required]
- public ITaskItem XapFilename {
- get; set;
- }
-
- [Required]
- public ITaskItem[] InputFiles {
- get; set;
- }
-
- public ITaskItem[] LocalCopyReferences {
- get; set;
- }
-
- }
-
-
-}
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GetMoonlightFrameworkPath.cs b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GetMoonlightFrameworkPath.cs
deleted file mode 100644
index 91de54407be..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/GetMoonlightFrameworkPath.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// GetMoonlightFrameworkPath.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-// Ankit Jain <jankit@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using SI = System.IO;
-
-using System;
-using System.Text;
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Moonlight.Build.Tasks {
- public class GetMoonlightFrameworkPath : Task {
-
- public override bool Execute ()
- {
- return true;
- }
-
- [Required]
- public string SilverlightVersion {
- get; set;
- }
-
- [Output]
- public string FrameworkPath {
- get {
- if (string.IsNullOrEmpty (SilverlightVersion))
- return FrameworkVersion30Path;
-
- return SI.Path.GetFullPath (
- PathCombine (ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20),
- "..", "..", "moonlight", SilverlightVersion));
- }
- }
-
- [Output]
- public string FrameworkVersion20Path {
- get {
- return SI.Path.GetFullPath (
- PathCombine (ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20),
- "..", "..", "moonlight", "2.0"));
- }
- }
-
- [Output]
- public string FrameworkVersion30Path {
- get {
- return SI.Path.GetFullPath (
- PathCombine (ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20),
- "..", "..", "moonlight", "3.0"));
- }
- }
-
- static string PathCombine (string path1, params string[] parts)
- {
- StringBuilder sb = new StringBuilder ();
- sb.Append (path1);
- foreach (string part in parts)
- sb.AppendFormat ("{0}{1}", SI.Path.DirectorySeparatorChar, part);
-
- return sb.ToString ();
- }
- }
-}
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/PreviewTemplate.html b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/PreviewTemplate.html
deleted file mode 100644
index 2be05759952..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/PreviewTemplate.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" >
-<head>
- <title>@TITLE@</title>
-
- <style type="text/css">
- html, body {
- height: 100%;
- overflow: auto;
- }
- body {
- padding: 0;
- margin: 0;
- }
- #silverlightControlHost {
- height: 100%;
- }
- </style>
-
- <script type="text/javascript">
- function onSilverlightError(sender, args) {
-
- var appSource = "";
- if (sender != null && sender != 0) {
- appSource = sender.getHost().Source;
- }
- var errorType = args.ErrorType;
- var iErrorCode = args.ErrorCode;
-
- var errMsg = "Unhandled Error in Silverlight 2 Application " + appSource + "\n" ;
-
- errMsg += "Code: "+ iErrorCode + " \n";
- errMsg += "Category: " + errorType + " \n";
- errMsg += "Message: " + args.ErrorMessage + " \n";
-
- if (errorType == "ParserError")
- {
- errMsg += "File: " + args.xamlFile + " \n";
- errMsg += "Line: " + args.lineNumber + " \n";
- errMsg += "Position: " + args.charPosition + " \n";
- }
- else if (errorType == "RuntimeError")
- {
- if (args.lineNumber != 0)
- {
- errMsg += "Line: " + args.lineNumber + " \n";
- errMsg += "Position: " + args.charPosition + " \n";
- }
- errMsg += "MethodName: " + args.methodName + " \n";
- }
-
- throw new Error(errMsg);
- }
- </script>
-</head>
-
-<body>
- <!-- Runtime errors from Silverlight will be displayed here.
- This will contain debugging information and should be removed or hidden when debugging is completed -->
- <div id='errorLocation' style="font-size: small;color: Gray;"></div>
-
- <div id="silverlightControlHost">
- <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
- <param name="source" value="@XAP_FILE@"/>
- <param name="onerror" value="onSilverlightError" />
- <param name="background" value="white" />
- <param name="minRuntimeVersion" value="2.0.31005.0" />
- <param name="autoUpgrade" value="true" />
- <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
- <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
- </a>
- </object>
- <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
- </div>
-</body>
-</html>
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/Respack.cs b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/Respack.cs
deleted file mode 100644
index 4efcb41b0fc..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/Respack.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// Respack.cs
-//
-// Author:
-// Ankit Jain (jankit@novell.com)
-//
-// Copyright 2010 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using System;
-using System.Diagnostics;
-using System.IO;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Tasks;
-using Microsoft.Build.Utilities;
-using Mono.XBuild.Utilities;
-
-namespace Moonlight.Build.Tasks {
- public class Respack : ToolTask
- {
- public override bool Execute ()
- {
- if (!ValidateParameters ()) {
- // not generating any resource file
- OutputFile = null;
- return true;
- }
-
- return BuildRequired () ? base.Execute () : true;
- }
-
- bool BuildRequired ()
- {
- if (!File.Exists (OutputFile.ItemSpec))
- return true;
-
- DateTime outputFileTime = File.GetLastWriteTime (OutputFile.ItemSpec);
- foreach (var res in Resources) {
- string file = res.ItemSpec;
- if (File.Exists (file) && File.GetLastWriteTime (file) > outputFileTime)
- return true;
- }
-
- return false;
- }
-
- void AddCommandLineCommands (CommandLineBuilderExtension commandLine)
- {
- if (Resources.Length == 0)
- return;
-
- commandLine.AppendFileNameIfNotNull (OutputFile);
-
- commandLine.AppendFileNamesIfNotNull (Resources, " ");
- }
-
- protected override string GenerateCommandLineCommands ()
- {
- CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();
- AddCommandLineCommands (clbe);
- return clbe.ToString ();
- }
-
- protected override string GenerateFullPathToTool ()
- {
- return Path.Combine (ToolPath, ToolExe);
- }
-
- protected override bool ValidateParameters()
- {
- return Resources.Length > 0;
- }
-
- [Required]
- [Output]
- public ITaskItem OutputFile {
- get; set;
- }
-
- [Required]
- public ITaskItem[] Resources {
- get; set;
- }
-
- protected override string ToolName {
- get {
- return RunningOnWindows ? "respack.bat" : "respack";
- }
- }
-
- static bool RunningOnWindows {
- get {
- // Code from Mono.GetOptions/Options.cs
- // check for non-Unix platforms - see FAQ for more details
- // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
- int platform = (int) Environment.OSVersion.Platform;
- return ((platform != 4) && (platform != 128));
- }
-
- }
- }
-}
diff --git a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/XamlG.cs b/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/XamlG.cs
deleted file mode 100644
index bacd62da207..00000000000
--- a/mcs/class/Moonlight.Build.Tasks/Moonlight.Build.Tasks/XamlG.cs
+++ /dev/null
@@ -1,378 +0,0 @@
-//
-// XamlG.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-// Ankit Jain <jankit@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using System.Xml;
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Moonlight.Build.Tasks {
- public class XamlG : Task {
-
- public override bool Execute ()
- {
- if (Sources.Length == 0)
- return true;
-
- if (OutputFiles == null || Sources.Length != OutputFiles.Length) {
- Log.LogError ("Number of OutputFiles must match the number of Source files");
- return false;
- }
-
- var codedom_provider = GetCodeDomProviderForLanguage (Language);
- if (codedom_provider == null) {
- Log.LogError ("Language {0} not supported for code generation.", Language);
- return false;
- }
-
- for (int i = 0; i < Sources.Length; i ++) {
- ITaskItem source_item = Sources [i];
- ITaskItem dest_item = OutputFiles [i];
- if (!File.Exists (dest_item.ItemSpec) ||
- File.GetLastWriteTime (dest_item.ItemSpec) < File.GetLastWriteTime (source_item.ItemSpec)) {
- Log.LogMessage (MessageImportance.Low, "Generating codebehind accessors for {0}...", source_item.ItemSpec);
-
- string full_source_path = source_item.GetMetadata ("FullPath");
- try {
- if (!XamlGCompiler.GenerateFile (codedom_provider, AssemblyName, full_source_path,
- Path.Combine (source_item.GetMetadata ("RelativeDir"),
- Path.GetFileName (source_item.ItemSpec)),
- dest_item.ItemSpec, Log)) {
- Log.LogError ("Error generating {0} from {1}", full_source_path, dest_item.ItemSpec);
- return false;
- }
- } catch (Exception e) {
- Log.LogError ("Error generating {0} from {1}: {2}", full_source_path, dest_item.ItemSpec, e.Message);
- Log.LogMessage (MessageImportance.Low, "Error generating {0} from {1}: {2}",
- full_source_path, dest_item.ItemSpec, e.ToString ());
- return false;
- }
- }
- }
-
- return true;
- }
-
- CodeDomProvider GetCodeDomProviderForLanguage (string lang)
- {
- switch (lang.ToLower ()) {
- case "c#": return new Microsoft.CSharp.CSharpCodeProvider ();
- case "vb": return new Microsoft.VisualBasic.VBCodeProvider ();
- }
-
- return null;
- }
-
- [Required]
- public ITaskItem [] Sources {
- get; set;
- }
-
- [Required]
- public string Language {
- get; set;
- }
-
- [Required]
- public string AssemblyName {
- get; set;
- }
-
- [Output]
- public ITaskItem [] OutputFiles {
- get; set;
- }
-
- bool HasFileChanged (string source, string dest)
- {
- if (!File.Exists (dest))
- return true;
-
- FileInfo sourceInfo = new FileInfo (source);
- FileInfo destinationInfo = new FileInfo (dest);
-
- return !(sourceInfo.Length == destinationInfo.Length &&
- File.GetLastWriteTime(source) <= File.GetLastWriteTime (dest));
- }
-
- }
-
- static class XamlGCompiler
- {
- private static bool sl2 = true;
-
- public static bool GenerateFile (CodeDomProvider provider, string app_name,
- string xaml_file, string xaml_path_in_project, string out_file, TaskLoggingHelper log)
- {
- XmlDocument xmldoc = new XmlDocument ();
- xmldoc.Load (xaml_file);
-
- XmlNamespaceManager nsmgr = new XmlNamespaceManager (xmldoc.NameTable);
- nsmgr.AddNamespace("x", "http://schemas.microsoft.com/winfx/2006/xaml");
-
- XmlNode root = xmldoc.SelectSingleNode ("/*", nsmgr);
- if (root == null) {
- log.LogError ("{0}: No root node found.", xaml_file);
- return false;
- }
-
- XmlAttribute root_class = root.Attributes ["x:Class"];
- if (root_class == null) {
- File.WriteAllText (out_file, "");
- return true;
- }
-
- bool is_application = root.LocalName == "Application";
- string root_ns;
- string root_type;
- string root_asm;
-
- ParseXmlns (root_class.Value, out root_type, out root_ns, out root_asm);
-
- Hashtable names_and_types = GetNamesAndTypes (root, nsmgr);
-// Hashtable keys_and_types = GetKeysAndTypes (root, nsmgr);
-
- CodeCompileUnit ccu = new CodeCompileUnit ();
- CodeNamespace decl_ns = new CodeNamespace (root_ns);
- ccu.Namespaces.Add (decl_ns);
-
- decl_ns.Imports.Add (new CodeNamespaceImport ("System"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Controls"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Documents"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Input"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Media"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Media.Animation"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Shapes"));
- decl_ns.Imports.Add (new CodeNamespaceImport ("System.Windows.Controls.Primitives"));
-
- CodeTypeDeclaration decl_type = new CodeTypeDeclaration (root_type);
- decl_type.IsPartial = true;
-
- decl_ns.Types.Add (decl_type);
-
- CodeMemberMethod initcomp = new CodeMemberMethod ();
- initcomp.Name = "InitializeComponent";
- decl_type.Members.Add (initcomp);
-
- if (sl2) {
- CodeMemberField field = new CodeMemberField ();
- field.Name = "_contentLoaded";
- field.Type = new CodeTypeReference (typeof (bool));
-
- decl_type.Members.Add (field);
-
- CodeConditionStatement is_content_loaded = new CodeConditionStatement (new CodeVariableReferenceExpression ("_contentLoaded"),
- new CodeStatement [] { new CodeMethodReturnStatement () });
- initcomp.Statements.Add (is_content_loaded);
-
- CodeAssignStatement set_content_loaded = new CodeAssignStatement (new CodeVariableReferenceExpression ("_contentLoaded"),
- new CodePrimitiveExpression (true));
-
- initcomp.Statements.Add (set_content_loaded);
-
- string component_path = String.Format ("/{0};component/{1}", app_name, xaml_path_in_project);
- CodeMethodInvokeExpression load_component = new CodeMethodInvokeExpression (
- new CodeTypeReferenceExpression ("System.Windows.Application"), "LoadComponent",
- new CodeExpression [] { new CodeThisReferenceExpression (),
- new CodeObjectCreateExpression (new CodeTypeReference ("System.Uri"), new CodeExpression [] {
- new CodePrimitiveExpression (component_path),
- new CodeFieldReferenceExpression (new CodeTypeReferenceExpression ("System.UriKind"), "Relative") })
- });
- initcomp.Statements.Add (load_component);
- }
-
- if (!is_application) {
- foreach (DictionaryEntry entry in names_and_types) {
- string name = (string) entry.Key;
- CodeTypeReference type = (CodeTypeReference) entry.Value;
-
- CodeMemberField field = new CodeMemberField ();
-
- if (sl2)
- field.Attributes = MemberAttributes.Assembly;
-
- field.Name = name;
- field.Type = type;
-
- decl_type.Members.Add (field);
-
- CodeMethodInvokeExpression find_invoke = new CodeMethodInvokeExpression (
- new CodeThisReferenceExpression(), "FindName",
- new CodeExpression[] { new CodePrimitiveExpression (name) } );
-
- CodeCastExpression cast = new CodeCastExpression (type, find_invoke);
-
- CodeAssignStatement assign = new CodeAssignStatement (
- new CodeVariableReferenceExpression (name), cast);
-
- initcomp.Statements.Add (assign);
- }
- }
-
-
- using (StreamWriter writer = new StreamWriter (out_file)) {
- provider.GenerateCodeFromCompileUnit (ccu, writer, new CodeGeneratorOptions ());
- }
-
- return true;
- }
-
- private static Hashtable GetNamesAndTypes (XmlNode root, XmlNamespaceManager nsmgr)
- {
- Hashtable res = new Hashtable ();
-
- XmlNodeList names = root.SelectNodes ("//*[@x:Name]", nsmgr);
- foreach (XmlNode node in names) {
-
- // Don't take the root canvas
- if (node == root)
- continue;
-
- XmlAttribute attr = node.Attributes ["x:Name"];
- string name = attr.Value;
- string ns = GetNamespace (node);
- string member_type = node.LocalName;
-
- if (ns != null)
- member_type = String.Concat (ns, ".", member_type);
-
- CodeTypeReference type = new CodeTypeReference (member_type);
- if (ns != null)
- type.Options |= CodeTypeReferenceOptions.GlobalReference;
-
- res [name] = type;
- }
-
- return res;
- }
-
- /*
- private static Hashtable GetKeysAndTypes (XmlNode root, XmlNamespaceManager nsmgr)
- {
- Hashtable res = new Hashtable ();
-
- XmlNodeList keys = root.SelectNodes ("//*[@x:Key]", nsmgr);
- foreach (XmlNode node in keys) {
-
- // Don't take the root canvas
- if (node == root)
- continue;
-
- XmlAttribute attr = node.Attributes ["x:Key"];
- string key = attr.Value;
- string ns = GetNamespace (node);
- string member_type = node.LocalName;
-
- if (ns != null)
- member_type = String.Concat (ns, ".", member_type);
-
- res [key] = member_type;
- }
-
- return res;
- }
- */
-
- internal static string GetNamespace (XmlNode node)
- {
- if (!IsCustom (node.NamespaceURI))
- return null;
-
- return ParseNamespaceFromXmlns (node.NamespaceURI);
- }
-
- private static bool IsCustom (string ns)
- {
- switch (ns) {
- case "http://schemas.microsoft.com/winfx/2006/xaml":
- case "http://schemas.microsoft.com/winfx/2006/xaml/presentation":
- case "http://schemas.microsoft.com/client/2007":
- return false;
- }
-
- return true;
- }
-
- private static string ParseNamespaceFromXmlns (string xmlns)
- {
- string type_name = null;
- string ns = null;
- string asm = null;
-
- ParseXmlns (xmlns, out type_name, out ns, out asm);
-
- return ns;
- }
-
-// private static string ParseTypeFromXmlns (string xmlns)
-// {
-// string type_name = null;
-// string ns = null;
-// string asm = null;
-//
-// ParseXmlns (xmlns, out type_name, out ns, out asm);
-//
-// return type_name;
-// }
-
- internal static void ParseXmlns (string xmlns, out string type_name, out string ns, out string asm)
- {
- type_name = null;
- ns = null;
- asm = null;
-
- string [] decls = xmlns.Split (';');
- foreach (string decl in decls) {
- if (decl.StartsWith ("clr-namespace:")) {
- ns = decl.Substring (14, decl.Length - 14);
- continue;
- }
- if (decl.StartsWith ("assembly=")) {
- asm = decl.Substring (9, decl.Length - 9);
- continue;
- }
- int nsind = decl.LastIndexOf (".");
- if (nsind > 0) {
- ns = decl.Substring (0, nsind);
- type_name = decl.Substring (nsind + 1, decl.Length - nsind - 1);
- } else {
- type_name = decl;
- }
- }
- }
- }
-
-}