Skip to content

Commit

Permalink
[msbuild] Repack all iOS Task assemblies into Xamarin.iOS.Tasks.dll (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast authored and spouliot committed Jan 8, 2018
1 parent 8db4cee commit 316948e
Show file tree
Hide file tree
Showing 44 changed files with 186 additions and 154 deletions.
33 changes: 4 additions & 29 deletions msbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ MSBUILD_PRODUCTS =
MSBUILD_DIRECTORIES =
MSBUILD_SYMLINKS =
MSBUILD_TASK_ASSEMBLIES =
MSBUILD_REFERENCE_ASSEMBLIES =

ALL_SOURCES = $(wildcard $(TOP)/msbuild/*/*.cs) $(wildcard $(TOP)/msbuild/*/*/*.cs) $(wildcard $(TOP)/msbuild/*/*/*/*.cs) *.sln $(wildcard */*.csproj) $(wildcard */packages.config)
CONFIG = Debug
Expand All @@ -35,14 +34,7 @@ IOS_TARGETS = \

IOS_BINDING_TARGETS = $(wildcard Xamarin.ObjcBinding.Tasks/*.targets)

IOS_TASK_ASSEMBLIES = \
Xamarin.iOS.Tasks \
Xamarin.iOS.Tasks.Core \
Xamarin.MacDev.Tasks \
Xamarin.MacDev.Tasks.Core \

IOS_TASK_REFERENCE_ASSEMBLIES = \
Xamarin.MacDev
IOS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks

IOS_DIRECTORIES = \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS \
Expand All @@ -65,7 +57,6 @@ IOS_PRODUCTS =
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/FrameworkList.xml \
$(foreach target,$(IOS_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(notdir $(target))) \
$(foreach target,$(IOS_BINDING_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(notdir $(target))) \
$(foreach dll,$(IOS_TASK_REFERENCE_ASSEMBLIES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).dll) \
$(foreach dll,$(IOS_TASK_ASSEMBLIES) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).dll) \
$(IOS_SYMLINKS)

Expand All @@ -77,7 +68,6 @@ MSBUILD_PRODUCTS += all-ios
MSBUILD_DIRECTORIES += $(IOS_DIRECTORIES)
MSBUILD_SYMLINKS += symlinks-ios
MSBUILD_TASK_ASSEMBLIES += $(IOS_TASK_ASSEMBLIES)
MSBUILD_REFERENCE_ASSEMBLIES += $(IOS_TASK_REFERENCE_ASSEMBLIES)
endif

##
Expand Down Expand Up @@ -156,17 +146,10 @@ endif
MAC_TARGETS = $(wildcard Xamarin.Mac.Tasks/*.props) $(wildcard Xamarin.Mac.Tasks/*.targets)
MAC_BINDING_TARGETS =

MAC_TASK_ASSEMBLIES = \
Xamarin.Mac.Tasks \
Xamarin.Mac.Tasks.Core \
Xamarin.MacDev.Tasks \
Xamarin.MacDev.Tasks.Core \
MAC_TASK_ASSEMBLIES = Xamarin.Mac.Tasks

MAC_BINDING_TASK_ASSEMBLIES =

MAC_TASK_REFERENCE_ASSEMBLIES = \
Xamarin.MacDev

MAC_DIRECTORIES = \
$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac \
$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList \
Expand All @@ -178,7 +161,6 @@ MAC_SYMLINKS =
$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList/FrameworkList.xml \
$(foreach target,$(MAC_TARGETS) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(notdir $(target))) \
$(foreach target,$(MAC_BINDING_TARGETS) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(notdir $(target))) \
$(foreach dll,$(MAC_TASK_REFERENCE_ASSEMBLIES),$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(dll).dll) \
$(foreach dll,$(MAC_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(dll).dll) \
$(foreach dll,$(MAC_BINDING_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(dll).dll) \

Expand All @@ -188,7 +170,6 @@ MAC_PRODUCTS =
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/4.5/machine.config \
$(foreach target,$(MAC_TARGETS) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(notdir $(target))) \
$(foreach target,$(MAC_BINDING_TARGETS) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(notdir $(target))) \
$(foreach dll,$(MAC_TASK_REFERENCE_ASSEMBLIES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \
$(foreach dll,$(MAC_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \
$(foreach dll,$(MAC_BINDING_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \
$(MAC_SYMLINKS) \
Expand All @@ -201,7 +182,6 @@ MSBUILD_PRODUCTS += all-mac
MSBUILD_DIRECTORIES += $(MAC_DIRECTORIES)
MSBUILD_SYMLINKS += symlinks-mac
MSBUILD_TASK_ASSEMBLIES += $(MAC_TASK_ASSEMBLIES) $(MAC_BINDING_TASK_ASSEMBLIES)
MSBUILD_REFERENCE_ASSEMBLIES += $(MAC_TASK_REFERENCE_ASSEMBLIES)
endif

##
Expand Down Expand Up @@ -316,7 +296,7 @@ all-local:: $(MSBUILD_PRODUCTS) .stamp-test-xml

.build-stamp: $(ALL_SOURCES)
$(Q) $(SYSTEM_MONO) /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore
$(Q) $(SYSTEM_XBUILD) $(XBUILD_VERBOSITY)
$(Q) $(SYSTEM_MSBUILD) $(XBUILD_VERBOSITY)
$(Q) touch $@

# make all the target assemblies build when any of the sources have changed
Expand All @@ -325,11 +305,6 @@ $(foreach dll,$(MSBUILD_TASK_ASSEMBLIES),$(dll)/bin/$(CONFIG)/$(dll).dll): .buil
# Always remake the symlinks
.PHONY: $(MSBUILD_SYMLINKS)

# Xamarin.MacDev.dll comes from the Xamarin.MacDev repository
# Newtonsoft.Json.dll comes from a NuGet
$(foreach dll,$(sort $(MSBUILD_REFERENCE_ASSEMBLIES)),build/$(notdir $(dll)).dll): .build-stamp | build
$(Q) cp Xamarin.MacDev.Tasks.Core/bin/$(CONFIG)/$(notdir $@) $@

define copyToBuild
build/$(1).dll: $(1)/bin/$(CONFIG)/$(1).dll | build
$$(Q) cp $$< $$@
Expand All @@ -353,4 +328,4 @@ install-local:: $(MSBUILD_PRODUCTS)

# make will automatically consider files created in chained implicit rules as temporary files, and delete them afterwards
# marking those files as .SECONDARY will prevent that deletion.
.SECONDARY: $(foreach file,$(MSBUILD_TASK_ASSEMBLIES) $(MSBUILD_REFERENCE_ASSEMBLIES),unbuild/$(file).dll) $(foreach file,$(MSBUILD_TASK_ASSEMBLIES) $(MSBUILD_REFERENCE_ASSEMBLIES),build/$(file).dll)
.SECONDARY: $(foreach file,$(MSBUILD_TASK_ASSEMBLIES),unbuild/$(file).dll) $(foreach file,$(MSBUILD_TASK_ASSEMBLIES),build/$(file).dll)
6 changes: 3 additions & 3 deletions msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
//
// MmpTask.cs
//
// Author:
Expand Down Expand Up @@ -98,7 +98,7 @@ protected override bool ValidateParameters ()

protected override string GenerateCommandLineCommands ()
{
var args = new ProcessArgumentBuilder ();
var args = new CommandLineArgumentBuilder ();
bool msym;

args.Add ("/verbose");
Expand Down Expand Up @@ -224,7 +224,7 @@ protected override string GenerateCommandLineCommands ()
string GetMonoBundleDirName ()
{
if (!string.IsNullOrEmpty (ExtraArguments)) {
var args = ProcessArgumentBuilder.Parse (ExtraArguments);
var args = CommandLineArgumentBuilder.Parse (ExtraArguments);

for (int i = 0; i < args.Length; i++) {
string arg;
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.Mac.Tasks/Tasks/CodesignVerify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class CodesignVerify : CodesignVerifyTaskBase
{
protected override string GenerateCommandLineCommands ()
{
var args = new ProcessArgumentBuilder ();
var args = new CommandLineArgumentBuilder ();

args.Add ("--verify");
args.Add ("-vvvv");
Expand Down
48 changes: 24 additions & 24 deletions msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ Copyright (C) 2014 Xamarin. All rights reserved.
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.MacDev.Tasks.ArTool" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Codesign" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CollectBundleResources" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CreateInstallerPackage" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CreatePkgInfo" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Ditto" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.FindItemWithLogicalName" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.PackLibraryResources" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.PropertyListEditor" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.SmartCopy" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.UnpackLibraryResources" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.ArTool" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Codesign" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CollectBundleResources" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CreateInstallerPackage" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CreatePkgInfo" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Ditto" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.FindItemWithLogicalName" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.PackLibraryResources" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.PropertyListEditor" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.SmartCopy" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.UnpackLibraryResources" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.ACTool" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.CodesignVerify" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.CompileAppManifest" AssemblyFile="Xamarin.Mac.Tasks.dll" />
Expand All @@ -40,19 +40,19 @@ Copyright (C) 2014 Xamarin. All rights reserved.
<UsingTask TaskName="Xamarin.Mac.Tasks.Mmp" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.ScnTool" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.TextureAtlas" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.GenerateBundleName" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.GetNativeExecutableName" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.GetPropertyListValue" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.SymbolStrip" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Zip" AssemblyFile="Xamarin.MacDev.Tasks.dll" />

<UsingTask TaskName="Microsoft.Build.Tasks.Copy" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Delete" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Exec" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.MakeDir" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Move" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Microsoft.Build.Tasks.RemoveDir" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Touch" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Xamarin.MacDev.Tasks.GenerateBundleName" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.GetNativeExecutableName" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.GetPropertyListValue" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.SymbolStrip" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Zip" AssemblyFile="Xamarin.Mac.Tasks.dll" />

<UsingTask TaskName="Microsoft.Build.Tasks.Copy" AssemblyFile="Xamarin.Mac.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Delete" AssemblyFile="Xamarin.Mac.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Exec" AssemblyFile="Xamarin.Mac.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.MakeDir" AssemblyFile="Xamarin.Mac.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Move" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Microsoft.Build.Tasks.RemoveDir" AssemblyFile="Xamarin.Mac.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Touch" AssemblyFile="Xamarin.Mac.Tasks.dll"/>

<Import Project="$(MSBuildThisFileDirectory)Xamarin.Mac.Common.props"
Condition="'$(_XamarinCommonPropsHasBeenImported)' != 'true'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Copyright (C) 2014 Xamarin Inc. All rights reserved.

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.Mac.Tasks.BTouch" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Zip" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.Zip" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.PrepareNativeReferences" AssemblyFile="Xamarin.Mac.Tasks.dll" />

<UsingTask TaskName="Microsoft.Build.Tasks.Delete" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.Delete" AssemblyFile="Xamarin.Mac.Tasks.dll"/>

<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets"
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Copyright (C) 2014 Xamarin Inc. All rights reserved.
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.MacDev.Tasks.CollectBundleResources" AssemblyFile="Xamarin.MacDev.Tasks.dll" />
<UsingTask TaskName="Xamarin.MacDev.Tasks.CollectBundleResources" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Xamarin.Mac.Tasks.CreateEmbeddedResources" AssemblyFile="Xamarin.Mac.Tasks.dll" />
<UsingTask TaskName="Microsoft.Build.Tasks.RemoveDir" AssemblyFile="Xamarin.MacDev.Tasks.dll"/>
<UsingTask TaskName="Microsoft.Build.Tasks.RemoveDir" AssemblyFile="Xamarin.Mac.Tasks.dll"/>

<Import Project="$(MSBuildThisFileDirectory)Xamarin.Mac.ObjCBinding.Common.props"
Condition="'$(_XamarinCommonPropsHasBeenImported)' != 'true'" />
Expand Down
37 changes: 35 additions & 2 deletions msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -29,7 +29,6 @@
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.Build.Tasks.v4.0" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="Tasks\ACTool.cs" />
<Compile Include="Tasks\BTouch.cs" />
Expand Down Expand Up @@ -111,5 +110,39 @@
<None Include="Xamarin.Mac.AppExtension.Common.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\ILRepack.2.0.13\build\ILRepack.props" Condition="Exists('..\..\packages\ILRepack.2.0.13\build\ILRepack.props')" />
<!-- 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>
-->
<Target Name="ILRepack" AfterTargets="CoreCompile" DependsOnTargets="CoreCompile" Inputs="@(IntermediateAssembly -> '%(FullPath)')" Outputs="$(IntermediateOutputPath)ilrepack.txt" Returns="@(MergedAssemblies)" Condition="Exists(@(IntermediateAssembly -> '%(FullPath)')) And '$(ILRepack)' != 'false'">
<GetReferenceAssemblyPaths BypassFrameworkInstallChecks="False" TargetFrameworkMoniker="$(TargetFrameworkMoniker)">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FullFrameworkReferenceAssemblyPaths" />
</GetReferenceAssemblyPaths>
<ItemGroup>
<MergedAssemblies Include="@(ReferenceCopyLocalPaths)" Condition="$([System.String]::new('%(FileName)').StartsWith('Xamarin')) And '%(Extension)' == '.dll'" />
<MergedAssemblies Include="@(ReferenceCopyLocalPaths)" Condition="$([System.String]::new('%(FileName)').StartsWith('Mono')) And '%(Extension)' == '.dll'" />
<ReferenceCopyLocalDirs Include="@(ReferenceCopyLocalPaths -> '%(RootDir)%(Directory)')" />
<ReferenceCopyLocalPaths Remove="@(MergedAssemblies)" />
<LibDir Include="@(ReferenceCopyLocalDirs -> Distinct())" />
</ItemGroup>
<PropertyGroup>
<ILRepackArgs Condition="'$(AssemblyOriginatorKeyFile)' != ''">/keyfile:"$(AssemblyOriginatorKeyFile)"</ILRepackArgs>
</PropertyGroup>
<Exec Command="&quot;$(ILRepack)&quot; @(LibDir -> '/lib:&quot;%(Identity).&quot;', ' ') $(ILRepackArgs) /out:&quot;@(IntermediateAssembly -> '%(FullPath)')&quot; &quot;@(IntermediateAssembly -> '%(FullPath)')&quot; @(MergedAssemblies -> '&quot;%(FullPath)&quot;', ' ')" WorkingDirectory="$(MSBuildProjectDirectory)\$(OutputPath)" StandardErrorImportance="high" StandardOutputImportance="low" ConsoleToMSBuild="true" ContinueOnError="true">
<Output TaskParameter="ConsoleOutput" PropertyName="ILRepackOutput" />
<Output TaskParameter="ExitCode" PropertyName="ExitCode" />
</Exec>
<Touch AlwaysCreate="true" Files="$(IntermediateOutputPath)ilrepack.txt" />
<Message Importance="high" Text="$(ILRepackOutput)" Condition="'$(ExitCode)' != '0'" />
<Delete Files="$(IntermediateOutputPath)ilrepack.txt" Condition="'$(ExitCode)' != '0'" />
<Error Text="$(ILRepackOutput)" Condition="'$(ExitCode)' != '0' And '$(ContinueOnError)' != 'true'" />
<Delete Files="@(MergedAssemblies -> '$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" Condition="Exists('$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" />
</Target>
</Project>
4 changes: 4 additions & 0 deletions msbuild/Xamarin.Mac.Tasks/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILRepack" version="2.0.13" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Xamarin.MacDev
/// <summary>
/// Builds a process argument string.
/// </summary>
public class ProcessArgumentBuilder
public class CommandLineArgumentBuilder
{
static readonly char[] QuoteSpecials = new char[] { ' ', '\\', '\'', '"', ',', ';' };

Expand All @@ -18,11 +18,11 @@ public string ProcessPath {
get; private set;
}

public ProcessArgumentBuilder ()
public CommandLineArgumentBuilder ()
{
}

public ProcessArgumentBuilder (string processPath)
public CommandLineArgumentBuilder (string processPath)
{
ProcessPath = processPath;
}
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static bool IsMessagesExtension (PDictionary plist)
return id.Value == "com.apple.message-payload-provider";
}

protected override void AppendCommandLineArguments (IDictionary<string, string> environment, ProcessArgumentBuilder args, ITaskItem[] items)
protected override void AppendCommandLineArguments (IDictionary<string, string> environment, CommandLineArgumentBuilder args, ITaskItem[] items)
{
string minimumDeploymentTarget;

Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArToolTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected override string GenerateFullPathToTool ()

protected override string GenerateCommandLineCommands ()
{
var args = new ProcessArgumentBuilder ();
var args = new CommandLineArgumentBuilder ();

args.Add ("-r");
args.AddQuoted (Archive.ItemSpec);
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArchiveTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected string CreateArchiveDirectory ()

protected static int Ditto (string source, string destination)
{
var args = new ProcessArgumentBuilder ();
var args = new CommandLineArgumentBuilder ();

args.Add ("-rsrc");

Expand Down
Loading

0 comments on commit 316948e

Please sign in to comment.