Permalink
Browse files

Using ILMerge to merge FSharpx.Core into FSharpx.TypeProviders.dll - …

…issue #91
  • Loading branch information...
1 parent e0b4d80 commit 3ee9e4a88f39102b964a4278a1c63b760eed9e09 @forki forki committed Sep 20, 2012
@@ -5,6 +5,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.bat = build.bat
build.fsx = build.fsx
FSharpx.Core.nuspec = FSharpx.Core.nuspec
+ ILMergeExcludes.txt = ILMergeExcludes.txt
LICENSE.md = LICENSE.md
README.md = README.md
EndProjectSection
View
@@ -0,0 +1 @@
+FSharpx.TypeProviders.*
View
@@ -6,7 +6,7 @@ open System.IO
// properties
let currentDate = System.DateTime.UtcNow
let projectName = "FSharpx"
-let version = if isLocalBuild then "1.6.48" else buildVersion
+let version = if isLocalBuild then "1.6.56" else buildVersion
let coreSummary = "FSharpx is a library for the .NET platform implementing general functional constructs on top of the F# core library."
let projectSummary = "FSharpx is a library for the .NET platform implementing general functional constructs on top of the F# core library."
let authors = ["Steffen Forkmann"; "Daniel Mohl"; "Tomas Petricek"; "Ryan Riley"; "Mauricio Scheffer"; "Phil Trelford" ]
@@ -25,7 +25,7 @@ let testDir = "./test/"
let deployDir = "./deploy/"
let docsDir = "./docs/"
-let targetPlatformDir = getTargetPlatformDir "4.0.30319"
+let targetPlatformDir = getTargetPlatformDir "v4.0.30319"
let nugetDir package = sprintf "./nuget/%s/" package
let nugetLibDir package = nugetDir package @@ "lib"
@@ -166,18 +166,43 @@ let prepareNugetTarget = TargetTemplate (fun frameworkVersion ->
packages
|> Seq.iter (fun package ->
let frameworkSubDir = nugetLibDir package @@ normalizeFrameworkVersion frameworkVersion
- CleanDir frameworkSubDir
-
- [for ending in ["dll";"pdb";"xml"] ->
- sprintf "%sFsharpx.%s.%s" buildDir package ending]
- |> Seq.filter (fun f -> File.Exists f)
- |> CopyTo frameworkSubDir
-
- if package = "TypeProviders" then // TODO: Remove when we have a .NET 4.5 Core package
- [for ending in ["dll";"pdb";"xml"] ->
- sprintf "%sFsharpx.%s.%s" buildDir "Core" ending]
- |> Seq.filter (fun f -> File.Exists f)
- |> CopyTo frameworkSubDir)
+ if package <> "TypeProviders" || buildTypeProviders frameworkVersion then
+ CleanDir frameworkSubDir
+
+ [for ending in ["dll";"pdb";"xml"] ->
+ sprintf "%sFsharpx.%s.%s" buildDir package ending]
+ |> Seq.filter (fun f -> File.Exists f)
+ |> CopyTo frameworkSubDir
+
+ if package = "TypeProviders" && buildTypeProviders frameworkVersion then
+ [for ending in ["dll";"pdb";"xml"] do
+ yield sprintf "%sFsharp.%s.%s" buildDir "Core" ending
+ yield sprintf "%sFsharpx.%s.%s" buildDir "Core" ending]
+ |> Seq.filter (fun f -> File.Exists f)
+ |> CopyTo frameworkSubDir
+
+ Rename (frameworkSubDir @@ "Fsharpx.TypeProviders.Partial.dll") (frameworkSubDir @@ "Fsharpx.TypeProviders.dll")
+
+ ILMerge
+ (fun p ->
+ {p with
+ Libraries = [buildDir + "FSharpx.Core.dll"]
+ Internalize = InternalizeExcept "ILMergeExcludes.txt"
+ ToolPath = @"lib\ILMerge\IlMerge.exe"
+ TargetPlatform = sprintf @"v4,%s" targetPlatformDir})
+
+ (frameworkSubDir @@ "Fsharpx.TypeProviders.dll")
+ (frameworkSubDir @@ "Fsharpx.TypeProviders.Partial.dll")
+
+ ["Fsharp.Core.dll";
+ "Fsharp.Core.pdb";
+ "Fsharp.Core.xml";
+ "Fsharpx.Core.dll";
+ "Fsharpx.Core.pdb";
+ "Fsharpx.Core.xml";
+ "Fsharpx.TypeProviders.Partial.dll"]
+ |> Seq.map (fun a -> frameworkSubDir @@ a)
+ |> DeleteFiles)
)
let buildFrameworkVersionTarget = TargetTemplate (fun frameworkVersion -> ())

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.
View
Binary file not shown.
@@ -0,0 +1,5 @@
+<configuration>
+ <startup useLegacyV2RuntimeActivationPolicy="true">
+ <requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
+ </startup>
+</configuration>
@@ -64,11 +64,13 @@
<ItemGroup>
<Reference Include="FSharp.Data.TypeProviders, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\..\lib\FSharp\Net45\FSharp.Data.TypeProviders.dll</HintPath>
+ <Private>True</Private>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core">
<HintPath>..\..\lib\FSharp\Net45\FSharp.Core.dll</HintPath>
+ <Private>True</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />

0 comments on commit 3ee9e4a

Please sign in to comment.