diff --git a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/Gtk.Template.CSharp.nuspec b/Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec
similarity index 67%
rename from Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/Gtk.Template.CSharp.nuspec
rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec
index 756efe36a..65fbdf14b 100755
--- a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/Gtk.Template.CSharp.nuspec
+++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec
@@ -1,19 +1,19 @@
- Gtk.Template.CSharp
+ GtkSharp.Template.CSharp
3.0.0
Gtk template for CSharp
A simple C# template for your .Net Core Gtk Application.
A simple C# template for your .Net Core Gtk Application.
- GLibSharp Team
- GLibSharp Team
- https://github.com/GLibSharp/GtkSharp
+ cra0zy
+ cra0zy
+ https://github.com/cra0zy/GtkSharp
false
- gtk app dotnet new template
+ gtk gtksharp gtk-sharp app dotnet new template
-
+
\ No newline at end of file
diff --git a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/.template.config/template.json b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/.template.config/template.json
similarity index 60%
rename from Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/.template.config/template.json
rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/.template.config/template.json
index fd1594716..c022053bc 100755
--- a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/.template.config/template.json
+++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/.template.config/template.json
@@ -1,10 +1,12 @@
{
"$schema": "http://json.schemastore.org/template",
- "author": "GLibSharp Team",
- "classifications": [ "Console" ],
+ "author": "cra0zy",
+ "classifications": [
+ "Console"
+ ],
"name": "Gtk Application",
- "identity": "Gtk.Template.CSharp",
- "groupIdentity": "Gtk.Template",
+ "identity": "GtkSharp.Template.CSharp",
+ "groupIdentity": "GtkSharp.Template",
"shortName": "gtkapp",
"tags": {
"language": "C#",
@@ -12,4 +14,4 @@
},
"sourceName": "GtkNamespace",
"preferNameDirectory": true
-}
+}
\ No newline at end of file
diff --git a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/GtkNamespace.csproj b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkNamespace.csproj
similarity index 100%
rename from Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/GtkNamespace.csproj
rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkNamespace.csproj
diff --git a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/MainWindow.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.cs
similarity index 100%
rename from Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/MainWindow.cs
rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.cs
diff --git a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/MainWindow.glade b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.glade
similarity index 100%
rename from Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/MainWindow.glade
rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.glade
diff --git a/Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/Program.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/Program.cs
similarity index 100%
rename from Source/Templates/NetCoreTemplates/Gtk.Template.CSharp/content/Program.cs
rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/Program.cs
diff --git a/Source/Templates/NetCore/test/MainWindow.cs b/Source/Templates/NetCore/test/MainWindow.cs
new file mode 100755
index 000000000..4ae890980
--- /dev/null
+++ b/Source/Templates/NetCore/test/MainWindow.cs
@@ -0,0 +1,37 @@
+using System;
+using Gtk;
+using UI = Gtk.Builder.ObjectAttribute;
+
+namespace test
+{
+ class MainWindow : Window
+ {
+#pragma warning disable 0649
+ [UI] private Label _label1;
+ [UI] private Button _button1;
+#pragma warning restore 0649
+
+ private int _counter;
+
+ public MainWindow() : this(new Builder("MainWindow.glade")) { }
+
+ private MainWindow(Builder builder) : base(builder.GetObject("MainWindow").Handle)
+ {
+ builder.Autoconnect(this);
+
+ DeleteEvent += OnDeleteEvent;
+ _button1.Clicked += Button1_Clicked;
+ }
+
+ private void OnDeleteEvent(object sender, DeleteEventArgs a)
+ {
+ Application.Quit();
+ }
+
+ private void Button1_Clicked(object sender, EventArgs a)
+ {
+ _counter++;
+ _label1.Text = "Hello World! This button has been clicked " + _counter + " time(s).";
+ }
+ }
+}
diff --git a/Source/Templates/NetCore/test/MainWindow.glade b/Source/Templates/NetCore/test/MainWindow.glade
new file mode 100755
index 000000000..a13c41b20
--- /dev/null
+++ b/Source/Templates/NetCore/test/MainWindow.glade
@@ -0,0 +1,46 @@
+
+
+
+
+
diff --git a/Source/Templates/NetCore/test/Program.cs b/Source/Templates/NetCore/test/Program.cs
new file mode 100755
index 000000000..4132e2997
--- /dev/null
+++ b/Source/Templates/NetCore/test/Program.cs
@@ -0,0 +1,23 @@
+using System;
+using Gtk;
+
+namespace test
+{
+ class Program
+ {
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ Application.Init();
+
+ var app = new Application("org.test.test", GLib.ApplicationFlags.None);
+ app.Register(GLib.Cancellable.Current);
+
+ var win = new MainWindow();
+ app.AddWindow(win);
+
+ win.Show();
+ Application.Run();
+ }
+ }
+}
diff --git a/Source/Templates/NetCore/test/test.csproj b/Source/Templates/NetCore/test/test.csproj
new file mode 100755
index 000000000..7a37f7744
--- /dev/null
+++ b/Source/Templates/NetCore/test/test.csproj
@@ -0,0 +1,14 @@
+
+
+ Exe
+ netcoreapp2.0
+
+
+
+ MainWindow.glade
+
+
+
+
+
+
diff --git a/build.cake b/build.cake
index f26b65253..1dc85bdb3 100755
--- a/build.cake
+++ b/build.cake
@@ -106,6 +106,19 @@ Task("PackageNuGet")
DotNetCorePack(gassembly.Csproj, settings);
});
+Task("PackageTemplates")
+ .IsDependentOn("Init")
+ .Does(() =>
+{
+ var settings = new NuGetPackSettings
+ {
+ BasePath = "Source/Templates/NetCore/GtkSharp.Template.CSharp",
+ OutputDirectory = "BuildOutput/NugetPackages"
+ };
+
+ NuGetPack("Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec", settings);
+});
+
// TASK TARGETS
Task("Default")