Use new packInclude feature to include native assets
- Now Kestrel won't break when people overwrite the build.cmd
This commit is contained in:
parent
3470c6206a
commit
891b991a34
|
|
@ -9,7 +9,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Server.Kes
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7972A5D6-3385-4127-9277-428506DD44FF}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\_custom-goals.shade = build\_custom-goals.shade
|
||||
build.cmd = build.cmd
|
||||
global.json = global.json
|
||||
makefile.shade = makefile.shade
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
use assembly="System.IO.Compression.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
use assembly="System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
use namespace="System.IO"
|
||||
use namespace="System.IO.Compression"
|
||||
use namespace="System.Net"
|
||||
|
||||
#add-files target="compile"
|
||||
var each='var nupkgFile in Files.Include("artifacts\\build\\Microsoft.AspNet.Server.Kestrel.*.nupkg").Where(x=>!x.EndsWith("symbols.nupkg"))'
|
||||
log info='Adding content to ${nupkgFile}'
|
||||
var archive='${ZipFile.Open(nupkgFile, ZipArchiveMode.Update)}'
|
||||
@{
|
||||
archive.CreateEntryFromFile(
|
||||
"src/Microsoft.AspNet.Server.Kestrel/native/windows/amd64/libuv.dll",
|
||||
"native/windows/amd64/libuv.dll");
|
||||
archive.CreateEntryFromFile(
|
||||
"src/Microsoft.AspNet.Server.Kestrel/native/windows/x86/libuv.dll",
|
||||
"native/windows/x86/libuv.dll");
|
||||
archive.CreateEntryFromFile(
|
||||
"src/Microsoft.AspNet.Server.Kestrel/native/darwin/universal/libuv.dylib",
|
||||
"native/darwin/universal/libuv.dylib");
|
||||
|
||||
XDocument doc;
|
||||
var entry = archive.GetEntry("[Content_Types].xml");
|
||||
using (var stream = entry.Open())
|
||||
{
|
||||
doc = XDocument.Load(stream);
|
||||
}
|
||||
doc.Root.Add(
|
||||
new XElement(
|
||||
XName.Get("Default", "http://schemas.openxmlformats.org/package/2006/content-types"),
|
||||
new XAttribute("Extension", "dylib"),
|
||||
new XAttribute("ContentType", "application/octet")
|
||||
));
|
||||
using (var stream = entry.Open())
|
||||
{
|
||||
doc.Save(stream);
|
||||
}
|
||||
|
||||
archive.Dispose();
|
||||
}
|
||||
|
|
@ -1,48 +1,53 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "ASP.NET 5 cross platform development web server.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/kestrelhttpserver"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-*",
|
||||
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Framework.Logging.Abstractions": "1.0.0-*",
|
||||
"Microsoft.StandardsPolice": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "build"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11-beta-*",
|
||||
"System.Diagnostics.Debug": "4.0.11-beta-*",
|
||||
"System.Diagnostics.TraceSource": "4.0.0-beta-*",
|
||||
"System.Diagnostics.Tracing": "4.0.21-beta-*",
|
||||
"System.Globalization": "4.0.11-beta-*",
|
||||
"System.IO": "4.0.11-beta-*",
|
||||
"System.Linq": "4.0.1-beta-*",
|
||||
"System.Net.Primitives": "4.0.11-beta-*",
|
||||
"System.Runtime.Extensions": "4.0.11-beta-*",
|
||||
"System.Runtime.InteropServices": "4.0.21-beta-*",
|
||||
"System.Text.Encoding": "4.0.11-beta-*",
|
||||
"System.Threading": "4.0.11-beta-*",
|
||||
"System.Threading.Tasks": "4.0.11-beta-*",
|
||||
"System.Threading.Thread": "4.0.0-beta-*",
|
||||
"System.Threading.ThreadPool": "4.0.10-beta-*"
|
||||
}
|
||||
}
|
||||
},
|
||||
"compilationOptions": {
|
||||
"allowUnsafe": true
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": [
|
||||
"dnu restore ../../tools/Microsoft.AspNet.Server.Kestrel.GeneratedCode",
|
||||
"dnx --appbase ../../tools/Microsoft.AspNet.Server.Kestrel.GeneratedCode Microsoft.Dnx.ApplicationHost run Http/FrameHeaders.Generated.cs"
|
||||
]
|
||||
"version": "1.0.0-*",
|
||||
"description": "ASP.NET 5 cross platform development web server.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/kestrelhttpserver"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-*",
|
||||
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Framework.Logging.Abstractions": "1.0.0-*",
|
||||
"Microsoft.StandardsPolice": {
|
||||
"version": "1.0.0-*",
|
||||
"type": "build"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11-beta-*",
|
||||
"System.Diagnostics.Debug": "4.0.11-beta-*",
|
||||
"System.Diagnostics.TraceSource": "4.0.0-beta-*",
|
||||
"System.Diagnostics.Tracing": "4.0.21-beta-*",
|
||||
"System.Globalization": "4.0.11-beta-*",
|
||||
"System.IO": "4.0.11-beta-*",
|
||||
"System.Linq": "4.0.1-beta-*",
|
||||
"System.Net.Primitives": "4.0.11-beta-*",
|
||||
"System.Runtime.Extensions": "4.0.11-beta-*",
|
||||
"System.Runtime.InteropServices": "4.0.21-beta-*",
|
||||
"System.Text.Encoding": "4.0.11-beta-*",
|
||||
"System.Threading": "4.0.11-beta-*",
|
||||
"System.Threading.Tasks": "4.0.11-beta-*",
|
||||
"System.Threading.Thread": "4.0.0-beta-*",
|
||||
"System.Threading.ThreadPool": "4.0.10-beta-*"
|
||||
}
|
||||
}
|
||||
},
|
||||
"compilationOptions": {
|
||||
"allowUnsafe": true
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": [
|
||||
"dnu restore ../../tools/Microsoft.AspNet.Server.Kestrel.GeneratedCode",
|
||||
"dnx --appbase ../../tools/Microsoft.AspNet.Server.Kestrel.GeneratedCode Microsoft.Dnx.ApplicationHost run Http/FrameHeaders.Generated.cs"
|
||||
]
|
||||
},
|
||||
"packInclude": {
|
||||
"native/darwin/universal/": "native/darwin/universal/*",
|
||||
"native/windows/amd64/": "native/windows/amd64/*",
|
||||
"native/windows/x86/": "native/windows/x86/*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue