I have been writing some samples using GTK4 using GirCore
so its time to reduce the manual project setup steps and turn it into a dotnet new
project template.
Project Template
Time to follow the excellent article by Syed Ibrahim.
I have taken out the project setup section from my GTK 4 tutorials and turned it into the template. I have created a console application, added GirCore.Gtk-4.0
nuget package to the project and updated the Program.cs
to create a main Gtk window with Hello World
label.
Next tutorial for GTK4 hopefully I will use this template to bootstrap the project. And I will keep it updated with new releases of GirCore
.
Usage
- Clone repository locally
- Build nuget package
dotnet pack -o .
- Install template for
dotnet new
using following commanddotnet new install Gtk4.Templates.1.0.0.nupkg
- Create new project using template
dotnet new gtk4-app --param:name [ProjectName]
ORdotnet new gtk4-app -p:n [ProjectName]
- Uninstall template using following command
dotnet new uninstall Gtk4.Templates
Source
Source code for the template is available on GitHub in gtk4-dotnet-template repository.
Top comments (0)