diff --git a/docs/docs/faq.md b/docs/docs/faq.md index 312f91a9a..af1ec3c5c 100644 --- a/docs/docs/faq.md +++ b/docs/docs/faq.md @@ -76,5 +76,8 @@ GTK composite templates allow creating a subclass from a `Gtk.Widget` and associ [!code-csharp[](../../src/Samples/Gtk-4.0/CompositeTemplate/CompositeBoxWidget.cs)] +## How to embed template files in the assemby? +To easily embed template files in the assembly GirCore provides the MSBuild property `GirCoreEmbedTemplateFiles`. Setting it to `true` will automatically embed all files with the extension `.ui` in the assembly with the same name. The folder structure of the template file will not be taken over. Meaning a template file must have a unique name in the assembly. + ## How to distribute desktop applications on Linux? A good option is [Flatpak](https://flatpak.org/) - a framework for distributing desktop applications across various Linux distributions. Refer to the [Dotnet](https://github.com/gircore/gir.core/edit/main/docs/docs/faq.md) page for .Net specific guide. diff --git a/src/Extensions/Gtk-4.0.Integration/Build/Template.Build.props b/src/Extensions/Gtk-4.0.Integration/Build/Template.Build.props new file mode 100644 index 000000000..3e02c0be6 --- /dev/null +++ b/src/Extensions/Gtk-4.0.Integration/Build/Template.Build.props @@ -0,0 +1,12 @@ + + + false + + + + + + %(Filename)%(Extension) + + + \ No newline at end of file diff --git a/src/Extensions/Gtk-4.0.Integration/GirCore.Gtk-4.0.Integration.props b/src/Extensions/Gtk-4.0.Integration/GirCore.Gtk-4.0.Integration.props new file mode 100644 index 000000000..7079cb2bd --- /dev/null +++ b/src/Extensions/Gtk-4.0.Integration/GirCore.Gtk-4.0.Integration.props @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Extensions/Gtk-4.0.Integration/Gtk-4.0.Integration.csproj b/src/Extensions/Gtk-4.0.Integration/Gtk-4.0.Integration.csproj index 8ce9abbdf..7de2dfcb5 100644 --- a/src/Extensions/Gtk-4.0.Integration/Gtk-4.0.Integration.csproj +++ b/src/Extensions/Gtk-4.0.Integration/Gtk-4.0.Integration.csproj @@ -4,4 +4,9 @@ Gtk.Integration Source Generator to make it easy to integrate C# with Gtk. + + + + + diff --git a/src/Samples/Directory.Build.props b/src/Samples/Directory.Build.props index a2119370e..dcf3035d5 100644 --- a/src/Samples/Directory.Build.props +++ b/src/Samples/Directory.Build.props @@ -1,4 +1,5 @@ + false diff --git a/src/Samples/Gtk-4.0/CompositeTemplate/CompositeTemplate.csproj b/src/Samples/Gtk-4.0/CompositeTemplate/CompositeTemplate.csproj index bbc449251..9a2679f57 100644 --- a/src/Samples/Gtk-4.0/CompositeTemplate/CompositeTemplate.csproj +++ b/src/Samples/Gtk-4.0/CompositeTemplate/CompositeTemplate.csproj @@ -11,13 +11,8 @@ net8.0 enable true + + true - - - - - %(Filename)%(Extension) - -