Update to the linux build to reduce the size and improve scripts

This commit is contained in:
Matthew Leibowitz 2017-01-29 16:36:02 +02:00
Родитель e99559d1ea
Коммит 9ef45356e0
3 изменённых файлов: 96 добавлений и 122 удалений

Просмотреть файл

@ -19,6 +19,16 @@ var TestConsoleToolPath_x64 = GetToolPath ("xunit.runner.console/tools/xunit.con
var GenApiToolPath = GetToolPath ("Microsoft.DotNet.BuildTools.GenAPI/tools/GenAPI.exe");
var MDocPath = GetToolPath ("mdoc/mdoc.exe");
var VERSION_ASSEMBLY = "1.56.0.0";
var VERSION_FILE = "1.56.0.0";
var VERSION_SONAME = VERSION_FILE.Substring(VERSION_FILE.IndexOf(".") + 1);
var VERSION_PACKAGES = new Dictionary<string, string> {
{ "SkiaSharp", "1.56.0" },
{ "SkiaSharp.Views", "1.56.0" },
{ "SkiaSharp.Views.Forms", "1.56.0" },
{ "SkiaSharp.Svg", "1.56.0-beta1" },
};
DirectoryPath ROOT_PATH = MakeAbsolute(Directory("."));
DirectoryPath DEPOT_PATH = MakeAbsolute(ROOT_PATH.Combine("externals/depot_tools"));
DirectoryPath SKIA_PATH = MakeAbsolute(ROOT_PATH.Combine("externals/skia"));
@ -512,16 +522,6 @@ Task ("set-versions")
sha = "{GIT_SHA}";
}
// the versions
var version = "1.56.0.0";
var fileVersion = "1.56.0.0";
var versions = new Dictionary<string, string> {
{ "SkiaSharp", "1.56.0" },
{ "SkiaSharp.Views", "1.56.0" },
{ "SkiaSharp.Views.Forms", "1.56.0" },
{ "SkiaSharp.Svg", "1.56.0-beta1" },
};
var files = new List<string> ();
var add = new Action<string> (glob => {
files.AddRange (GetFiles (glob).Select (p => MakeAbsolute (p).ToString ()));
@ -542,22 +542,22 @@ Task ("set-versions")
add ("./samples/*/*/*.csproj");
// update
foreach (var file in files) {
UpdateSkiaSharpVersion (file, versions);
UpdateSkiaSharpVersion (file, VERSION_PACKAGES);
}
// assembly infos
UpdateAssemblyInfo (
"./binding/Binding/Properties/SkiaSharpAssemblyInfo.cs",
version, fileVersion, sha);
VERSION_ASSEMBLY, VERSION_FILE, sha);
UpdateAssemblyInfo (
"./source/SkiaSharp.Views/SkiaSharp.Views.Shared/Properties/SkiaSharpViewsAssemblyInfo.cs",
version, fileVersion, sha);
VERSION_ASSEMBLY, VERSION_FILE, sha);
UpdateAssemblyInfo (
"./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/Properties/SkiaSharpViewsFormsAssemblyInfo.cs",
version, fileVersion, sha);
VERSION_ASSEMBLY, VERSION_FILE, sha);
UpdateAssemblyInfo (
"./source/SkiaSharp.Svg/SkiaSharp.Svg.Shared/Properties/SkiaSharpSvgAssemblyInfo.cs",
version, fileVersion, sha);
VERSION_ASSEMBLY, VERSION_FILE, sha);
});
////////////////////////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -140,7 +140,9 @@ Task ("externals-native")
if (IsRunningOnLinux ()) {
if (!DirectoryExists ("./output/linux/x64/")) CreateDirectory ("./output/linux/x64/");
if (!DirectoryExists ("./output/linux/x86/")) CreateDirectory ("./output/linux/x86/");
CopyFileToDirectory ("./native-builds/lib/linux/x64/libSkiaSharp.so", "./output/linux/x64/");
CopyFileToDirectory ("./native-builds/lib/linux/x64/libSkiaSharp.so." + VERSION_SONAME, "./output/linux/x64/");
// the second copy excludes the file version
CopyFile ("./native-builds/lib/linux/x64/libSkiaSharp.so." + VERSION_SONAME, "./output/linux/x64/libSkiaSharp.so");
}
});
@ -448,15 +450,9 @@ Task ("externals-linux")
});
// build libSkiaSharp
RunProcess ("make", new ProcessSettings {
Arguments = "",
Arguments = "ARCH=" + folder + " VERSION=" + VERSION_FILE,
WorkingDirectory = "native-builds/libSkiaSharp_linux",
});
// strip
RunProcess ("strip", new ProcessSettings {
Arguments = "libSkiaSharp.so",
WorkingDirectory = "native-builds/libSkiaSharp_linux/bin/" + folder,
});
});
buildArch ("x86_64", "x64");
@ -466,7 +462,7 @@ Task ("externals-linux")
if (!DirectoryExists ("native-builds/lib/linux/" + folder)) {
CreateDirectory ("native-builds/lib/linux/" + folder);
}
CopyFileToDirectory ("native-builds/libSkiaSharp_linux/bin/" + folder + "/libSkiaSharp.so", "native-builds/lib/linux/" + folder);
CopyFileToDirectory ("native-builds/libSkiaSharp_linux/bin/" + folder + "/libSkiaSharp.so." + VERSION_SONAME, "native-builds/lib/linux/" + folder);
}
});

Различия файлов скрыты, потому что одна или несколько строк слишком длинны