Upgrade CAKE build system (#325)

* Upgrade CAKE build system

* fix paths
This commit is contained in:
Harry 2022-01-26 21:15:32 +01:00 committed by GitHub
parent b9826da789
commit 4710fa1d06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 89 additions and 87 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,16 @@
<Project>
<PropertyGroup>
<PackageType>Template</PackageType>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageIcon>Icon.png</PackageIcon>
<Authors>GtkSharp Contributors</Authors>
<PackageProjectUrl>https://github.com/GtkSharp/GtkSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/GtkSharp/GtkSharp</RepositoryUrl>
<OutputPath>..\..\..\BuildOutput\$(Configuration)</OutputPath>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoWarn>NU5128</NoWarn>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Gtk templates for CSharp</Title>
<PackageId>GtkSharp.Template.CSharp</PackageId>
<Description>A set of C# templates for your .Net Gtk Application.</Description>
</PropertyGroup>
<ItemGroup>
<Content Include="content/**/*" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)../../Libs/GtkSharp/Icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>GtkSharp.Template.CSharp</id>
<version>3.0.0</version>
<title>Gtk templates for CSharp</title>
<iconUrl>https://raw.githubusercontent.com/GtkSharp/GtkSharp/develop/Source/Libs/GtkSharp/Icon.png</iconUrl>
<summary>A set of C# templates for your .Net Core Gtk Application.</summary>
<description>A set of C# templates for your .Net Core Gtk Application.</description>
<authors>GtkSharp Contributors</authors>
<owners>GtkSharp Contributors</owners>
<projectUrl>https://github.com/GtkSharp/GtkSharp</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes></releaseNotes>
<tags>gtk gtksharp gtk-sharp app dotnet new template c# csharp</tags>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Gtk templates for FSharp</Title>
<PackageId>GtkSharp.Template.FSharp</PackageId>
<Description>A set of F# templates for your .Net Gtk Application.</Description>
</PropertyGroup>
<ItemGroup>
<Content Include="content/**/*" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)../../Libs/GtkSharp/Icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>GtkSharp.Template.FSharp</id>
<version>3.0.0</version>
<title>Gtk templates for FSharp</title>
<iconUrl>https://raw.githubusercontent.com/GtkSharp/GtkSharp/develop/Source/Libs/GtkSharp/Icon.png</iconUrl>
<summary>A set of F# templates for your .Net Core Gtk Application.</summary>
<description>A set of F# templates for your .Net Core Gtk Application.</description>
<authors>GtkSharp Contributors</authors>
<owners>GtkSharp Contributors</owners>
<projectUrl>https://github.com/GtkSharp/GtkSharp</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes></releaseNotes>
<tags>gtk gtksharp gtk-sharp app dotnet new template f# fsharp</tags>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Gtk templates for Visual Basic</Title>
<PackageId>GtkSharp.Template.VBNet</PackageId>
<Description>A set of Visual Basic templates for your .Net Gtk Application.</Description>
</PropertyGroup>
<ItemGroup>
<Content Include="content/**/*" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)../../Libs/GtkSharp/Icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>GtkSharp.Template.VBNet</id>
<version>3.0.0</version>
<title>Gtk templates for VBNet</title>
<iconUrl>https://raw.githubusercontent.com/GtkSharp/GtkSharp/develop/Source/Libs/GtkSharp/Icon.png</iconUrl>
<summary>A set of VB templates for your .Net Core Gtk Application.</summary>
<description>A set of VB templates for your .Net Core Gtk Application.</description>
<authors>GtkSharp Contributors</authors>
<owners>GtkSharp Contributors</owners>
<projectUrl>https://github.com/GtkSharp/GtkSharp</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes></releaseNotes>
<tags>gtk gtksharp gtk-sharp app dotnet new template vbnet vb</tags>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>

View file

@ -11,7 +11,7 @@ Settings.BuildTarget = Argument("BuildTarget", "Default");
Settings.Assembly = Argument("Assembly", "");
var configuration = Argument("Configuration", "Release");
var msbuildsettings = new DotNetCoreMSBuildSettings();
var msbuildsettings = new DotNetMSBuildSettings();
var list = new List<GAssembly>();
// TASKS
@ -46,19 +46,19 @@ Task("Prepare")
.Does(() =>
{
// Build tools
DotNetCoreRestore("Source/Tools/Tools.sln");
DotNetCoreBuild("Source/Tools/Tools.sln", new DotNetCoreBuildSettings {
Verbosity = DotNetCoreVerbosity.Minimal,
DotNetRestore("Source/Tools/Tools.sln");
DotNetBuild("Source/Tools/Tools.sln", new DotNetBuildSettings {
Verbosity = DotNetVerbosity.Minimal,
Configuration = configuration
});
// Generate code and prepare libs projects
foreach(var gassembly in list)
gassembly.Prepare();
DotNetCoreRestore("Source/GtkSharp.sln");
DotNetRestore("Source/GtkSharp.sln");
// Addin
DotNetCoreRestore("Source/Addins/MonoDevelop.GtkSharp.Addin/MonoDevelop.GtkSharp.Addin.sln");
DotNetRestore("Source/Addins/MonoDevelop.GtkSharp.Addin/MonoDevelop.GtkSharp.Addin.sln");
});
Task("Clean")
@ -83,18 +83,18 @@ Task("Build")
.IsDependentOn("Prepare")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings
var settings = new DotNetBuildSettings
{
Configuration = configuration,
MSBuildSettings = msbuildsettings
};
if (list.Count == Settings.AssemblyList.Count)
DotNetCoreBuild("Source/GtkSharp.sln", settings);
DotNetBuild("Source/GtkSharp.sln", settings);
else
{
foreach(var gassembly in list)
DotNetCoreBuild(gassembly.Csproj, settings);
DotNetBuild(gassembly.Csproj, settings);
}
});
@ -102,51 +102,46 @@ Task("RunSamples")
.IsDependentOn("Build")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings
var settings = new DotNetBuildSettings
{
Configuration = configuration,
MSBuildSettings = msbuildsettings
};
DotNetCoreBuild("Source/Samples/Samples.csproj", settings);
DotNetCoreRun("Source/Samples/Samples.csproj");
DotNetBuild("Source/Samples/Samples.csproj", settings);
DotNetRun("Source/Samples/Samples.csproj");
});
Task("PackageNuGet")
.IsDependentOn("Build")
.Does(() =>
{
var settings = new DotNetCorePackSettings
var settings = new DotNetPackSettings
{
MSBuildSettings = msbuildsettings,
Configuration = configuration,
OutputDirectory = "BuildOutput/NugetPackages",
NoBuild = true,
NoBuild = true
};
foreach(var gassembly in list)
DotNetCorePack(gassembly.Csproj, settings);
DotNetPack(gassembly.Csproj, settings);
});
Task("PackageTemplates")
.IsDependentOn("Init")
.Does(() =>
{
var settings = new NuGetPackSettings
var settings = new DotNetPackSettings
{
OutputDirectory = "BuildOutput/NugetPackages",
Version = Settings.Version
MSBuildSettings = msbuildsettings,
Configuration = configuration,
OutputDirectory = "BuildOutput/NugetPackages"
};
settings.BasePath = "Source/Templates/GtkSharp.Template.CSharp";
NuGetPack("Source/Templates/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec", settings);
settings.BasePath = "Source/Templates/GtkSharp.Template.FSharp";
NuGetPack("Source/Templates/GtkSharp.Template.FSharp/GtkSharp.Template.FSharp.nuspec", settings);
settings.BasePath = "Source/Templates/GtkSharp.Template.VBNet";
NuGetPack("Source/Templates/GtkSharp.Template.VBNet/GtkSharp.Template.VBNet.nuspec", settings);
DotNetPack("Source/Templates/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.csproj", settings);
DotNetPack("Source/Templates/GtkSharp.Template.FSharp/GtkSharp.Template.FSharp.csproj", settings);
DotNetPack("Source/Templates/GtkSharp.Template.VBNet/GtkSharp.Template.VBNet.csproj", settings);
});
// TASK TARGETS